Date: 02-16-2022
Return to Index
created by gbSnippets
'An online TextBox tutorial may be found at:
'http://www.garybeene.com/power/pb-tutor-controls.htm
'Primary Code:
'Syntax: Control Add TextBox, hDlg, id&, txt$, x, y, xx, yy [, [style&] [, [exstyle&]]] [[,] Call CallBack]
Control Add TextBox, hDlg, 100,"Edit Me!", 50,50,100,20
'Compilable Example: (Jose Includes)
#Compiler PBWin 9, PBWin 10
#Compile EXE
#Include "win32api.inc"
%IDC_TextBox = 500
Global hDlg As DWord
Function PBMain() As Long
Local style&
style& = %ws_tabstop Or %ws_border Or %es_left Or %es_autohscroll _
Or %es_multiline Or %es_nohidesel Or %es_wantreturn
Dialog New Pixels, 0, "TextBox Test",300,300,200,200, %WS_SysMenu, 0 To hDlg
Control Add TextBox, hDlg, 100,"Edit Me!", 50,50,100,120, Style&
Control Send hDlg, %IDC_TextBox, %EM_FmtLines, %True, 0
Dialog Show Modal hDlg Call DlgProc
End Function
CallBack Function DlgProc() As Long
End Function
'gbs_00902
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm