The dialog draws wide but doesn't scroll horizontally. Am really puzzled.
'
====================================
"The right to swing my fist ends
where the other man's nose begins."
Oliver Wendell Holmes (1841-1935)
====================================
'
Code:
'PBWIN 9.01 - WinApi 05/2008 - XP Pro SP3 #Dim All #Compile Exe #Include "WIN32API.INC" #Include "COMDLG32.INC" #Include "InitCtrl.inc" ' Global hdlg As Dword %Id_Exit_Btn = 1000 %Id_Sample_Textbox = 1001 %Id_Show_Result_Btn = 1002 ' Macro Common_Locals 'Macro easier than retyping and maintains coding consistency Global Stile, Dlg_hght, Dlg_Wd As Long 'Global in case want to use in Controls Local Row, col, hght, wd, Longest,ctr, ln, ln1, i As Long Local l, s As String End Macro ' CallBack Function Dialog_Processor Common_Locals Select Case CbMsg 'This is TO determine the message TYPE ' Case %WM_INITDIALOG'<- Initialiaton when the program loads ' Case %WM_SYSCOMMAND 'Traps Any Alt key but only F4 closes ' Case %WM_COMMAND 'This processes command messages Select Case CbCtl Case %Id_Show_Result_Btn Control Get Text CbHndl, %Id_Sample_Textbox To l$ ? l$, , FuncName$ Case %Id_Exit_Btn Select Case CbCtlMsg Case 0 Dialog End CbHndl 'Applikation beenden End Select End Select End Select End Function ' Function PBMain Common_Locals Desktop Get Size To Dlg_Wd, Dlg_Hght Dlg_Hght = Dlg_Hght - 100 'plenty room for taskbar Dlg_Wd = Dlg_Wd * 2 'wider than screen Stile = Stile Or %WS_CAPTION Stile = Stile Or %WS_SYSMENU Stile = Stile Or %WS_THICKFRAME Stile = Stile Or %WM_HELP Stile = Stile Or %WS_Border 'doesn't do anything Stile = Stile Or %WS_HSCROLL Dialog New Pixels, hdlg, "Demo", 0, 0, Dlg_Wd, Dlg_Hght, Stile To hdlg 'centered Row = 0 col = 0 Wd = 40 Hght = 12 Control Add Label, hdlg, -1, " Name & Address ", Col, Row, Wd, Hght s$ = "Hagstrom, Borje" & $CrLf & _ "123 PBWin Avenue" & $CrLf & _ "PowerBasic, FL 12345" Col = Col + Wd + 10 'just past label Hght = 15 * 10 'Plenty room for 10 lines of text Wd = Dlg_Wd - 40 - 30 'minus the label and leave a little Control Add TextBox, hdlg, %Id_Sample_Textbox, s$, Col, Row, Wd, Hght, %ES_WantReturn Or %ES_MultiLine hght = 25 Wd = Dlg_Wd - 20 Col = 10 'center Row = Dlg_hght - (Hght * 2) - 4 Control Add Button, hdlg, %Id_Show_Result_Btn, "Show Textbox Results", col, row, Wd, Hght Row = Dlg_hght - Hght - 2 'Just off bottom Control Add Button, hdlg, %Id_Exit_Btn, "Abandon Ship", col, row, Wd, Hght Dialog Show Modal hDlg Call Dialog_Processor End Function 'Applikation beenden '
"The right to swing my fist ends
where the other man's nose begins."
Oliver Wendell Holmes (1841-1935)
====================================
Comment