flat assembler
Message board for the users of flat assembler.
Index
> Windows > problem with ChooseFontA in 64 bits |
Author |
|
Roman 04 Jan 2021, 13:43
I found this msdn tutorial.
https://docs.microsoft.com/ru-ru/windows/win32/dlgbox/using-common-dialog-boxes?redirectedfrom=MSDN But i not see dialog menu ChooseFontA |
|||
04 Jan 2021, 13:43 |
|
Ali.Z 04 Jan 2021, 14:03
why not debugging your code and see what happens, or at least show what error code you got?
extras: - who is the owner? (hwnd represent what control) - this is definitely not fasmw issue _________________ Asm For Wise Humans |
|||
04 Jan 2021, 14:03 |
|
Walter 04 Jan 2021, 16:07
In the file COMDLG64.inc (CHOOSEFONT), does lCustData have correct definition?
Code:
struct CHOOSEFONT
lStructSize dd ?,?
hwndOwner dq ?
hDC dq ?
lpLogFont dq ?
iPointSize dd ?
Flags dd ?
rgbColors dd ?
lCustData dd ?
lpfnHook dq ?
lpTemplateName dq ?
hInstance dq ?
lpszStyle dq ?
nFontType dw ?
wReserved dw ?
nSizeMin dd ?
nSizeMax dd ?
ends
|
|||
04 Jan 2021, 16:07 |
|
Mikl___ 04 Jan 2021, 16:20
it is masm
Code: WndProc proc hwnd:qword,uMsg:qword,wParam:qword,lParam:qword local cf:CHOOSEFONT local lf:LOGFONT mov hwnd,rcx mov wParam,r8 mov lParam,r9 xor ebx,ebx mov ecx,(sizeof CHOOSEFONT)/4 xor eax,eax lea edi,cf rep stosd mov cf.lStructSize,sizeof CHOOSEFONT mov rax,hwnd mov cf.hwndOwner,rax lea eax,lf mov cf.lpLogFont,rax mov eax,rgbCurrent mov cf.rgbColors,eax mov cf.Flags,CF_SCREENFONTS or CF_EFFECTS lea ecx,cf invoke ChooseFont _________________ wasm.in Last edited by Mikl___ on 12 Jan 2021, 15:35; edited 1 time in total |
|||
04 Jan 2021, 16:20 |
|
Roman 04 Jan 2021, 20:46
Now work in 64 bits ! And now i see dialog choose fonts !
Code: cf CHOOSEFONT tmp_font LOGFONT Code: mov [cf.lStructSize],sizeof.CHOOSEFONT+12 mov [cf.lpLogFont],tmp_font ;mov [cf.Flags], CF_SCREENFONTS + CF_EFFECTS invoke ChooseFont,cf Mikl___ please show masm struct CHOOSEFONT. |
|||
04 Jan 2021, 20:46 |
|
Mikl___ 12 Jan 2021, 15:27
Hi, Roman!
Code: CHOOSEFONTA STRUC lStructSize DWORD ? DWORD ? hwndOwner HWND ? hDC HDC ? lpLogFont LPLOGFONT ? iPointSize UINT ? Flags DWORD ? rgbColors COLORREF ? DWORD ? lCustData LPARAM ? lpfnHook LPCFHOOKPROC ? lpTemplateName LPSTR ? hInstance HINSTANCE ? lpszStyle LPSTR ? nFontType WORD ? WORD ? nSizeMin UINT ? nSizeMax UINT ? DWORD ? CHOOSEFONTA ENDS
_________________ wasm.in |
|||||||||||
12 Jan 2021, 15:27 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.