News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ComboBox in Status Bar

Started by jckl, March 20, 2006, 03:07:30 AM

Previous topic - Next topic

jckl

Ok i was wondering if anyone knew how to place a combo box in a specific section of the status bar. I can place a combo box in the status bar by using the status bars handle as the combo boxs parent handle but say i want it in the 4 part of the status bar? How you i get it there and not in the first part. This my code to create the status bar sections and create the combo box...


        invoke CreateStatusWindow,WS_CHILD or WS_VISIBLE or SBS_SIZEGRIP,NULL, hWnd, 200
        mov hStatus, eax
        mov [sbParts + 0], 223
        mov [sbParts + 4], 313
        mov [sbParts + 8], 403
        mov [sbParts + 12], -1
        invoke SendMessage,hStatus,SB_SETPARTS,4,ADDR sbParts

        invoke CreateWindowEx, 0, addr CBClassName, NULL, WS_CHILD or WS_VISIBLE, 0,0,90,20,hStatus, NULL, hInstance, NULL
        mov hCombo, eax

hutch--

Without some messy undocumented mess to play with, there is no easy way to get a seperate handle for each pane of a status bar but as the divisions are specified in pixels, this is no problem as you just set the left side reference for the combo box in pixels from the left side of the status bar. You can also do this on the blank part of a toolbar.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jckl

Ok i set the left side of the combo box so it sits way over where the 4th section of the status bar is and it works for what i want since my window is locked to one size..  :dance:


Thanks for the idea  :bg