flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
coconut
does your control proc return the handle of the newly created combobox? the sendmessage calls look ok, perhaps the error is elsewhere. show some more code, like the control proc
|
|||
![]() |
|
Razneb
My control procedure returns the control's handle to the target variable's address.
Code: proc control,Handle,Class,lpText,Style,hParent,x,y,w,h,ID invoke CreateWindowEx,0,[Class],[lpText],[Style],[x],[y],[w],[h],[hParent],[ID],[hInstance],NULL mov ebx,[Handle] mov [ebx],eax invoke SendMessage,eax,WM_SETFONT,[hFont],0 return endp |
|||
![]() |
|
IronFelix
Try to use EDX or ECX register instead of EBX (EBX,ESI,EDI must be saved and restored in function, if you use them).
Regards. |
|||
![]() |
|
Razneb
Still doesn't work, but thanks for the extra info IronFelix. I didn't know that.
|
|||
![]() |
|
coconut
i have modified your code as follows. the problem was in the height of the combobox, make it large enough to display items inside it
calling create_control: Code: stdcall create_control,hwnd_cb,_class_cb,0,WS_CHILD+WS_VISIBLE+CBS_DROPDOWNLIST,[hwnd],16,40,130,100,1005 ;invoke SendMessage,[hwnd_cb],CB_SETITEMDATA,0,_title invoke SendMessage,[hwnd_cb],CB_ADDSTRING,0,_class invoke SendMessage,[hwnd_cb],CB_ADDSTRING,0,_class and the create_control proc: Code: proc create_control,handle,_class_name,_caption,style,parent,x,y,w,h,control_id push ebx esi edi invoke CreateWindowEx,0,[_class_name],[_caption],[style],[x],[y],[w],[h],[parent],0,[hinstance],[control_id] mov ecx,[handle] mov [ecx],eax ;invoke SendMessage,eax,WM_SETFONT,[hFont],0 pop edi esi ebx return endp
|
|||||||||||
![]() |
|
Razneb
Thanks for all the help, works fine now.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.