flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
coconut 12 Apr 2005, 02:23
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 12 Apr 2005, 02:29
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 12 Apr 2005, 08:41
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 12 Apr 2005, 21:01
Still doesn't work, but thanks for the extra info IronFelix. I didn't know that.
|
|||
![]() |
|
coconut 12 Apr 2005, 22:44
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 13 Apr 2005, 02:36
Thanks for all the help, works fine now.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.