News:

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

Hi All__Fill combobox

Started by 5k3l3t0r, July 23, 2007, 10:28:57 AM

Previous topic - Next topic

5k3l3t0r

Hi, I need to fill a combobox with some values from the registry...in ASM
i now whow to fill a simple text box whith one value but what i need is: when i click the dropdown list it will be filled whith values to choose one... it,s possible?
can someone hellpme please?

bye all, sorry about my english...

ramguru

Simple as that:

.if uMsg == WM_COMMAND

mov    ecx, wParam
shr    ecx, 10h ; get high-order word
cmp    ecx, CBN_DROPDOWN ; check if the event ocured
jnz    @F ; jmp if no event
; assuming 1001 is the ID of combobox
invoke SendDlgItemMessage, hWin, 1001, CB_RESETCONTENT, 0, 0
; fill combobox
; use some registry API to get str_item1 and str_item2 strings
invoke SendDlgItemMessage, hWin, 1001, CB_ADDSTRING, 0, ADDR str_item1
invoke SendDlgItemMessage, hWin, 1001, CB_ADDSTRING, 0, ADDR str_item2
@@:
.else
...

5k3l3t0r

hi ramguru tkyou vry much... i will tri...