pobwest
asked on
More dialogs
what running dialogs boxes in TPW 1.5 i need to know how to put in values to edit boxes as soom as they are run.
do you mean the default values that appear in an edit box as soon as the dialog appears?
ASKER
no, i can put in default values using the workshop, i need to know how to pass variables into them when they are executed.
If you are programming with object pascal then you have a PEdit object and you can call the setText method.
If you are programming with raw windows (à la Petzold as I say) then we are going to write SendDlgItemMessage(hDlg,ID D_ITEM,EM_ SETTEXT,0, Long(PChar (@Text))); or something similar!
If you are programming with raw windows (à la Petzold as I say) then we are going to write SendDlgItemMessage(hDlg,ID
ASKER
not quite what i meant.
When i run a dialog with:
Application^.ExecDialog(Ne w(PMyDialo g, Init(@Self, DIALOG_2')));
I want value to appear staight away, ie loaded from suitable variables.
I know how to send the data there:
setdlgitemint(Hwindow,250, Share_Poin ter,false) ;
for example; but i need this to be run as soon as the dialog box is initiated.
When i run a dialog with:
Application^.ExecDialog(Ne
I want value to appear staight away, ie loaded from suitable variables.
I know how to send the data there:
setdlgitemint(Hwindow,250,
for example; but i need this to be run as soon as the dialog box is initiated.
You have a type TMyDialog and PMyDialog = ^TMyDialog. The object TMyDialog is probably extended from TDialog. The method SetupWindow is called on WM_INITDIALOG and at this point the "handle to window" TMyDialog.hWindow is valid and you can call setdlgitemint if you want.
ASKER
I'm still a bit lost with this dialog thing malarky.
Could you write down how you would run a dialog designed in resource work shop and enter values in it to see if I'm on the right lines?
Could you write down how you would run a dialog designed in resource work shop and enter values in it to see if I'm on the right lines?
ASKER
ha, stumped you all hey?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.