Hello José,
How can i have the font selector (aka display font in powerbasic)?
Dont find any example with afxnova.
Thanx for any help.
It doesn't need a wrapper. Fill a CHOOSEFONTW structure and call the ChooseFontW function.
type tagCHOOSEFONTW
lStructSize as DWORD
hwndOwner as HWND
hDC as HDC
lpLogFont as LPLOGFONTW
iPointSize as INT_
Flags as DWORD
rgbColors as COLORREF
lCustData as LPARAM
lpfnHook as LPCFHOOKPROC
lpTemplateName as LPCWSTR
hInstance as HINSTANCE
lpszStyle as LPWSTR
nFontType as WORD
___MISSING_ALIGNMENT__ as WORD
nSizeMin as INT_
nSizeMax as INT_
end type
#else
type tagCHOOSEFONTW field = 1
lStructSize as DWORD
hwndOwner as HWND
hDC as HDC
lpLogFont as LPLOGFONTW
iPointSize as INT_
Flags as DWORD
rgbColors as COLORREF
lCustData as LPARAM
lpfnHook as LPCFHOOKPROC
lpTemplateName as LPCWSTR
hInstance as HINSTANCE
lpszStyle as LPWSTR
nFontType as WORD
___MISSING_ALIGNMENT__ as WORD
nSizeMin as INT_
nSizeMax as INT_
end type
#endif
type CHOOSEFONTW as tagCHOOSEFONTW
type LPCHOOSEFONTW as tagCHOOSEFONTW ptr
declare function ChooseFontW(byval as LPCHOOSEFONTW) as WINBOOL
CHOOSEFONTW structure
See Microsoft documentation:
https://learn.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-choosefontw