This may not be only a win32asm problem but anyway...
I'm unable to add items to a combobox! Can someone please tell me the correct way do this?
Gliptic,
Try,
invoke SendMessage, cb_handle, CB_ADDSTRING, 0, ADDR string_to_add
Farrier
Have a look at this thread, try to size the combobox's height a bit larger;)
Using Combobox?
invoke SendMessage, cb_handle, CB_ADDSTRING, 0, ADDR string_to_add
It's exactly like this I have done. The problem is that no items are added to the list. SendMessage returns 0,1,2 and so on indicating that the items are added but they aren't showed in the list!
High,
;------------------------------------------------------------------------------
; API "SendMessageA" sends a CB_INSERTSTRING to the combo box
;------------------------------------------------------------------------------
push OFFSET DialviaNumber ;lParam, lpsz, address of string to insert
push 0h ;wParam, index, item index
push 14Ah ;uMsg, CB_INSERTSTRING
push hWnd_Work1 ;hwnd, handle of destination window
call SendMessageA ;- API Function -
OK ?
so long Test
Gliptic,
As RVA was saying, when you set the screen dimensions for your
combobox, you must set the vertical--height--dimension to the
size you want to display when the combobox is "dropped down".
Otherwise, when the combobox is activated it will never "drop down.
Check your resource editor or .rc file for the size of your
combobox resource. Your program logic may be perfectly okay,
and you just can't see the thing.
Farrier
Ohh, thank you very much! That must be my problem.