I am have trubal set an array as global in order to use array data in
more then one sub. I am all so try to put the data in the array in
to a listbox at the cdlick of a button. what do I have to put in
a call back function to make %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX
show up in the uper right on the dialog box.
here is my program as I have it working now
thanks
Joe
#COMPILE EXE
#INCLUDE "win32api.inc"
'all global veribal will be deceard here
%id_nlabel = 100
%id_himsgs = 101
%id_name = 102
%id_disp = 110
GLOBAL lin%
'all callback function will be deceard here
DECLARE CALLBACK FUNCTION dlgpro
DECLARE SUB joe(firstname$)
DECLARE SUB fscreen
FUNCTION PBMAIN 'START PBMAIN FUNCTION
CALL fscreen
END FUNCTION
CALLBACK FUNCTION dlgpro
LOCAL ntext AS STRING
CONTROL GET TEXT CBHNDL, %id_name TO ntext
SELECT CASE CBMSG
CASE %wm_initdialog
CASE %wm_command
SELECT CASE LOWRD(CBWPARAM)
CASE %idok
DIALOG END CBHNDL
CALL joe(ntext$)
CASE %idcancel
DIALOG END CBHNDL
CASE %id_disp
MSGBOX "when done this will display all" & $CR & "entered name in listbox"
DIALOG END CBHNDL
END SELECT
END SELECT
END FUNCTION
SUB joe (firstname$)
MSGBOX "hi " & firstname$
DIM bob$(50)
lin% = lin%+1%
bob$(lin%)=firstname$
MSGBOX bob$(lin%)
CALL fscreen
END SUB
SUB fscreen
LOCAL hdlg AS LONG 'local veribals deceard here
DIALOG NEW 0, "My Program" ,,,250,100, %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX TO hdlg
CONTROL ADD TEXTBOX, hdlg, %id_name, "",75,1,100,14
CONTROL ADD LABEL, hdlg, %id_nlabel, "ENTER YOUR NAME",5,5,70,14
CONTROL ADD LISTBOX, hDlg, 100, , 4, 20, 100, 70, %WS_TABSTOP OR %WS_VSCROLL, %WS_EX_CLIENTEDGE
CONTROL ADD BUTTON, hdlg, %idok, "&OK",175,25,40,14
CONTROL ADD BUTTON, hdlg, %idcancel, "&CANCEL",175,40,40,14
CONTROL ADD BUTTON, hdlg, %id_disp, "&DISPLAY",175,55,40,14
DIALOG SHOW MODAL hdlg CALL dlgpro
END SUB
------------------
more then one sub. I am all so try to put the data in the array in
to a listbox at the cdlick of a button. what do I have to put in
a call back function to make %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX
show up in the uper right on the dialog box.
here is my program as I have it working now
thanks
Joe
#COMPILE EXE
#INCLUDE "win32api.inc"
'all global veribal will be deceard here
%id_nlabel = 100
%id_himsgs = 101
%id_name = 102
%id_disp = 110
GLOBAL lin%
'all callback function will be deceard here
DECLARE CALLBACK FUNCTION dlgpro
DECLARE SUB joe(firstname$)
DECLARE SUB fscreen
FUNCTION PBMAIN 'START PBMAIN FUNCTION
CALL fscreen
END FUNCTION
CALLBACK FUNCTION dlgpro
LOCAL ntext AS STRING
CONTROL GET TEXT CBHNDL, %id_name TO ntext
SELECT CASE CBMSG
CASE %wm_initdialog
CASE %wm_command
SELECT CASE LOWRD(CBWPARAM)
CASE %idok
DIALOG END CBHNDL
CALL joe(ntext$)
CASE %idcancel
DIALOG END CBHNDL
CASE %id_disp
MSGBOX "when done this will display all" & $CR & "entered name in listbox"
DIALOG END CBHNDL
END SELECT
END SELECT
END FUNCTION
SUB joe (firstname$)
MSGBOX "hi " & firstname$
DIM bob$(50)
lin% = lin%+1%
bob$(lin%)=firstname$
MSGBOX bob$(lin%)
CALL fscreen
END SUB
SUB fscreen
LOCAL hdlg AS LONG 'local veribals deceard here
DIALOG NEW 0, "My Program" ,,,250,100, %WS_MAXIMIZEBOX OR %WS_MINIMIZEBOX TO hdlg
CONTROL ADD TEXTBOX, hdlg, %id_name, "",75,1,100,14
CONTROL ADD LABEL, hdlg, %id_nlabel, "ENTER YOUR NAME",5,5,70,14
CONTROL ADD LISTBOX, hDlg, 100, , 4, 20, 100, 70, %WS_TABSTOP OR %WS_VSCROLL, %WS_EX_CLIENTEDGE
CONTROL ADD BUTTON, hdlg, %idok, "&OK",175,25,40,14
CONTROL ADD BUTTON, hdlg, %idcancel, "&CANCEL",175,40,40,14
CONTROL ADD BUTTON, hdlg, %id_disp, "&DISPLAY",175,55,40,14
DIALOG SHOW MODAL hdlg CALL dlgpro
END SUB
------------------
Comment