Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Option ANSIAPI
#Dim All
%Unicode=1
#Include "Win32API.inc"
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "Test Code",300,300,500,750, %WS_OverlappedWindow To hDlg
Control Add Button, hDlg, 100,"Test for Unicode", 10,50,120,20
Control Add Button, hDlg, 201, "Button", 10,100,50,20
Control Add Check3State, hDlg, 202, "Check3State", 10,150,100,20
Control Add CheckBox, hDlg, 203, "CheckBox", 10,200,100,20
Control Add ComboBox, hDlg, 204, , 10,250,100,20
Control Add Frame, hDlg, 205, "Frame", 10,300,100,20
Control Add Graphic, hDlg, 206, "Graphic", 10,350,30,30, %WS_Border
Control Add Header, hDlg, 207, "Header", 10,400,30,20, %WS_Border
Control Add Image, hDlg, 208, "Image", 10,450,30,30, %WS_Border
Control Add ImageX, hDlg, 209, "ImageX", 10,500,30,30, %WS_Border
Control Add ImgButton, hDlg, 210, "ImgButton", 10,550,30,20
Control Add ImgButtonX, hDlg, 211, "ImgButtonX", 10,600,30,20
Control Add Label, hDlg, 212, "Label", 300,100,30,20
Control Add Line, hDlg, 213, "Line", 300,150,30,20
Control Add ListBox, hDlg, 214, , 300,200,100,40
Control Add ListView, hDlg, 215, "ListView", 300,250,100,40
Control Add Option, hDlg, 216, "Option", 300,300,50,20
Control Add Progressbar, hDlg, 217, "ProgressBar", 300,350,100,20
Control Add ScrollBar, hDlg, 218, "ScrollBar", 300,400,100,20
Control Add Statusbar, hDlg, 219, "StatusBar", 300,450,30,20
Control Add Tab, hDlg, 220, "TAB", 300,500,100,20
Control Add TextBox, hDlg, 221, "TextBox", 300,550,100,20
Control Add Toolbar, hDlg, 222, "Toolbar", 300,600,100,20
Control Add Treeview, hDlg, 223, "TreeView", 300,650,100,40
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Local temp$, iResult As Long
Select Case Cb.Msg
Case %WM_Command
Select Case Cb.Ctl
Case 100
temp$ = temp$ + "Button " + Str$(IsWindowUnicode(GetDlgItem(hDlg,201))) + $CRLF
temp$ = temp$ + "Check3State " + Str$(IsWindowUnicode(GetDlgItem(hDlg,202))) + $CRLF
temp$ = temp$ + "CheckBox " + Str$(IsWindowUnicode(GetDlgItem(hDlg,203))) + $CRLF
temp$ = temp$ + "ComboBox " + Str$(IsWindowUnicode(GetDlgItem(hDlg,204))) + $CRLF
temp$ = temp$ + "Frame " + Str$(IsWindowUnicode(GetDlgItem(hDlg,205))) + $CRLF
temp$ = temp$ + "Graphic " + Str$(IsWindowUnicode(GetDlgItem(hDlg,206))) + $CRLF
temp$ = temp$ + "Header " + Str$(IsWindowUnicode(GetDlgItem(hDlg,207))) + $CRLF
temp$ = temp$ + "Image " + Str$(IsWindowUnicode(GetDlgItem(hDlg,208))) + $CRLF
temp$ = temp$ + "ImageX " + Str$(IsWindowUnicode(GetDlgItem(hDlg,209))) + $CRLF
temp$ = temp$ + "ImgButton " + Str$(IsWindowUnicode(GetDlgItem(hDlg,210))) + $CRLF
temp$ = temp$ + "ImbButtonX " + Str$(IsWindowUnicode(GetDlgItem(hDlg,211))) + $CRLF
temp$ = temp$ + "Label " + Str$(IsWindowUnicode(GetDlgItem(hDlg,212))) + $CRLF
temp$ = temp$ + "Line " + Str$(IsWindowUnicode(GetDlgItem(hDlg,213))) + $CRLF
temp$ = temp$ + "ListBox " + Str$(IsWindowUnicode(GetDlgItem(hDlg,214))) + $CRLF
temp$ = temp$ + "ListView " + Str$(IsWindowUnicode(GetDlgItem(hDlg,215))) + $CRLF
temp$ = temp$ + "Option " + Str$(IsWindowUnicode(GetDlgItem(hDlg,216))) + $CRLF
temp$ = temp$ + "ProgressBar " + Str$(IsWindowUnicode(GetDlgItem(hDlg,217))) + $CRLF
temp$ = temp$ + "ScrollBar " + Str$(IsWindowUnicode(GetDlgItem(hDlg,218))) + $CRLF
temp$ = temp$ + "StatusBar " + Str$(IsWindowUnicode(GetDlgItem(hDlg,219))) + $CRLF
temp$ = temp$ + "TAB " + Str$(IsWindowUnicode(GetDlgItem(hDlg,220))) + $CRLF
temp$ = temp$ + "TextBox " + Str$(IsWindowUnicode(GetDlgItem(hDlg,221))) + $CRLF
temp$ = temp$ + "Toolbar " + Str$(IsWindowUnicode(GetDlgItem(hDlg,222))) + $CRLF
temp$ = temp$ + "TreeView " + Str$(IsWindowUnicode(GetDlgItem(hDlg,223)))
MsgBox temp$, %MB_Ok + %MB_IconInformation, "W/O #Option ANSIAPI"
End Select
End Select
End Function
'gbs_01175
'Date: 03-14-2012
http://www.garybeene.com/sw/gbsnippets.htm