You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
#COMPILE EXE
#DIM ALL
#REGISTER NONE
#INCLUDE "WIN32API.INC"
CALLBACK FUNCTION MainCallback
IF CBCTL = 100 THEN
DIALOG END CBHNDL, 0
END IF
END FUNCTION
FUNCTION EnumFontsProc(pLogFont AS LOGFONT PTR, BYVAL pFontMetrics AS LONG, BYVAL dwFontType AS DWORD, BYVAL lNotUsed AS LONG) PRIVATE AS LONG
DIM ghDlg AS GLOBAL LONG
DIM tLogFont AS LOCAL LOGFONT
tLogFont = @pLogFont
COMBOBOX ADD ghDlg, 200, tLogFont.lfFaceName
FUNCTION = 1
END FUNCTION
FUNCTION PBMain AS LONG
DIM ghDlg AS GLOBAL LONG
DIM hDC AS LOCAL LONG
DIALOG NEW 0,"FONTS",,,100,100, TO ghDlg
CONTROL ADD BUTTON, ghDlg, 100, "Done", 25, 80, 50, 14
CONTROL ADD COMBOBOX, ghDlg, 200,, 0,0, 100, 75
DIALOG SHOW MODELESS ghDlg, CALL MainCallback
hDC = GetDC(ghDlg)
EnumFonts hDC, BYVAL 0, CODEPTR(EnumFontsProc), 0
ReleaseDC ghDlg, hDC
DIALOG SHOW MODAL ghDlg, CALL Maincallback
END FUNCTION
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment