The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: 5k3l3t0r on July 23, 2007, 10:28:57 AM

Title: Hi All__Fill combobox
Post by: 5k3l3t0r on July 23, 2007, 10:28:57 AM
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...
Title: Re: Hi All__Fill combobox
Post by: ramguru on July 23, 2007, 10:46:56 AM
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
...
Title: Re: Hi All__Fill combobox
Post by: 5k3l3t0r on July 23, 2007, 11:57:42 AM
hi ramguru tkyou vry much... i will tri...