Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Dim All
%Unicode=1
#Include "win32api.inc"
%IDC_TextBox = 500
%IDC_Button = 501
Global hDlg As Dword
Function PBMain() As Long
Dialog New Pixels, 0, "ComboBox Test",300,300,200,200, %WS_OverlappedWindow, 0 To hDlg
Control Add TextBox, hDlg, %IDC_TextBox, "My Test Code", 20,10,75,100
Control Add Button, hDlg, %IDC_Button, "Push",20, 50,75,25
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
Select Case Cb.Msg
Case %WM_Size
Control Set Size hDlg, %IDC_TextBox, 80,25
Case %WM_Command
If Cb.Ctl = %IDC_TextBox And Cb.CtlMsg = %EN_SetFocus Then
Control Send Cb.Hndl, %IDC_TextBox, %EM_SetSel, -1, 0
End If
End Select
End Function
'gbs_00895
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm