Using FONT NEW statement I detected a problem when Symbol font is used, also happens with other non alphanumeric fonts. Same fonts are displayed correctly using the supplied PBFormsMakeFont function or the old MakeFont function of Dave Navarro.
Run the next sample to see the problem:
At this moment I don't know if mine is wrong or is a product failure or some misunderstanding.
Sample supplied has been tested with PBWin 9.02 under Vista Premium SP2.
Someone that can clarify me this behaviour?
Run the next sample to see the problem:
Code:
#Compile Exe #Dim All #Include "Win32Api.inc" #Include "PBForms.inc" Function PbMain() Local hDlg, hFont1, hfont2 As Dword [COLOR=Red]Font New[/COLOR] "Symbol", 12, 2, 0, 0, 0 To hFont1 'tested with several pitch and charset hFont2 = [COLOR=Red]PBFormsMakeFont[/COLOR]("Symbol", 12, %FW_NORMAL, %FALSE, %FALSE, %FALSE, %SYMBOL_CHARSET) Dialog New 0, "Test", , , 100, 100, %WS_CAPTION Or %WS_SYSMENU, 0 To hDlg Control Add Button, hDlg, 111, "W", 40, 24, 20, 16 Control Add Button, hDlg, 222, "W", 40, 54, 20, 16 Control Send hDlg, 111, %WM_SETFONT, hFont1, 0 Control Send hDlg, 222, %WM_SETFONT, hFont2, 0 Dialog Show Modal hDlg Font End hFont1 If hFont2 Then DeleteObject hFont2 End Function
Sample supplied has been tested with PBWin 9.02 under Vista Premium SP2.
Someone that can clarify me this behaviour?
Comment