flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
VitalOne 08 Apr 2004, 05:10
I haven't tested this, but try this:
Code: wmcreate: invoke CreateWindowEx,WS_EX_CLIENTEDGE,_lb,0,WS_VISIBLE+WS_CHILD+LBS_STANDARD,5,5,110,75,[hwnd],0,[hinstance],NULL or eax,eax jz failed mov [lbhwnd],eax invoke CreateWindowEx,0,_btn,_btn_text,WS_VISIBLE+WS_CHILD+BS_PUSHBUTTON,5,85,55,20,[hwnd],0,[hinstance],NULL or eax,eax jz failed mov [btnhwnd],eax invoke CreateFont,16,0,0,0,0,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_RASTER_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,FIXED_PITCH+FF_DONTCARE,NULL or eax,eax jz failed mov [childfont],eax invoke SendMessage,[lbhwnd],WM_SETFONT,[childfont],FALSE invoke SendMessage,[btnhwnd],WM_SETFONT,[childfont],FALSE xor eax,eax jmp finish failed: or eax,-1 jmp finish |
|||
![]() |
|
coconut 08 Apr 2004, 21:13
changed it, still crashes at the same point.. strange the same code works in the MiniPad example. could it be the type of controls im trying to work with dont support the font being created?
|
|||
![]() |
|
comrade 08 Apr 2004, 21:18
Maybe its because last parameter of CreateFont is zero? needs to point to asciiz string
|
|||
![]() |
|
zenek_tm 08 Apr 2004, 22:31
The last parameter must be a pointer to a string with font name.
|
|||
![]() |
|
coconut 08 Apr 2004, 23:29
how would i send a pointer to
_font db 'Times New Roman',0 is that like using ADDR in masm? |
|||
![]() |
|
comrade 09 Apr 2004, 03:02
just write _font
|
|||
![]() |
|
coconut 10 Apr 2004, 05:37
Code: _sfont db "Times New Roman",0 invoke CreateFont,13,0,0,0,0,0,0,0,0,0,0,0,0,_sfont works - thanks |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.