Is ANSI_VAR_FONT always MS Sans Serif, or more important - is
MS Sans Serif always called MS Sans Serif? Guess not. I used an
exact string to create some fonts for new version of Poffs and a
few has reported weird fonts on some buttons. Wrote the following
routine to make sure in the future, maybe someone can benefit from it:
------------------
MS Sans Serif always called MS Sans Serif? Guess not. I used an
exact string to create some fonts for new version of Poffs and a
few has reported weird fonts on some buttons. Wrote the following
routine to make sure in the future, maybe someone can benefit from it:
Code:
LOCAL hDC AS LONG, tFont AS LONG, zs AS ASCIIZ * %LF_FACESIZE hDC = GetDC (hDlg) 'Get correct %ANSI_VAR_FONT name tFont = SelectObject(hDC, GetStockObject(%ANSI_VAR_FONT)) CALL GetTextFace(hDC, SIZEOF(zs), zs) SelectObject hDC, tFont CALL ReleaseDC (hDlg, hDC) 'zs should now hold the name we are looking for..
------------------
Comment