Date: 02-16-2022
Return to Index
created by gbSnippets
'Compilable Example: (Jose Includes)
#Compile Exe
#Include "win32api.inc"
%IDC_InputTextBox = 500
%IDC_InputOk = 501
%IDC_InputCancel = 502
Global hDlgI As Dword, InputReturn$
Function PBMain() As Long 'CustomInputBox(temp$) As String
Dialog Default Font "Tahoma", 10, 0
Dialog New Pixels, 0, "GoTo Thread/String",50,50,200,80, %WS_SysMenu To hDlgI
Dialog Set Icon hDlgI, "aaa"
Control Add TextBox, hDlgI, %IDC_InputTextBox,"init_value", 20,10,160,25
Control Add Button, hDlgI, %IDC_InputOk, "Ok", 20,45,50,25
Control Add Button, hDlgI, %IDC_InputCancel, "Cancel", 90,45,80,25
InputReturn$ = ""
Dialog Show Modal hdlgI Call hDlgIProc
? InputReturn$
End Function
CallBack Function hDlgIProc() As Long
Select Case Cb.Msg
Case %WM_Command
Select Case Cb.Ctl
Case %IdOk , %IDC_InputOk : Control Get Text hDlgI, %IDC_InputTextBox To InputReturn$ : Dialog End hDlgI
Case %IdCancel, %IDC_InputCancel : Dialog End hDlgI
End Select
End Select
End Function
http://www.garybeene.com/sw/gbsnippets.htm