Here is a problem I cannot seem to figure out. Using PB.DLL 6.0, DDT style:
I have a dialog which I SHOW MODAL ; it works fine.
In a callback function for one of the buttons, I want to create a modeless dialog to show that I am processing a long function.
The idea is to do this:
What is happening is the modeless dialog is launched and dies at the correct time with the caption, but the "LABEL" on that dialog does not appear. I just get a blank "dialog client area" (below the caption).
I have tried using LOCAL and GLOBAL dialog handles, real ID's and -1 for the LABEL control, inserting a DIALOG DOEVENTS, even played with the X and Y of the DIALOG NEW statement itself.
I even tried creating (DIALOG NEW..CONTROL ADD..) the modeless dialog in WinMain when I create the "main" dialog and then just doing the DIALOG SHOW in the above callback function.
On one try and one try only did I get the text to appear, but that was when I made a mistake and did a DIALOG END of the WRONG dialog.
Eventually I want to change the LABEL control into a "progress bar" control, but until I can get a simple label to show up I'm a little reluctant to go hacking up my main processing code (to keep track of the percent done).
Can anyone tell me what I am missing here?
Is it something simple? Will I be saying, "duh?"
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
I have a dialog which I SHOW MODAL ; it works fine.
In a callback function for one of the buttons, I want to create a modeless dialog to show that I am processing a long function.
The idea is to do this:
Code:
GLOBAL ghDlg AS LONG, ghWaitDlg AS LONG ... CALLBACK FUNCTION DoItCallBack() AS LONG IF CBMSG = %BN_CLICKED THEN DIALOG NEW ghDlg, "Caption....",%CW_USEDEFAULT, %CW_USEDEFAULT, 150, 60, %DS_CENTER OR %WS_CAPTION TO ghWaitDlg CONTROL ADD LABEL, ghWaitDlg, -1, "Please Wait...", 10, 30, 100, 14, %SS_LEFT DIALOG SHOW MODELESS ghWaitDlg TO WaitResult ' paints without the caption '>> tried DIALOG DOEVENTS here, tried DIALOG SHOW STATE, too Stat = LongRunningFunctionWhichDoesNOGUI (parms...) DIALOG END ghWaitDlg END IF END FUNCTION
What is happening is the modeless dialog is launched and dies at the correct time with the caption, but the "LABEL" on that dialog does not appear. I just get a blank "dialog client area" (below the caption).
I have tried using LOCAL and GLOBAL dialog handles, real ID's and -1 for the LABEL control, inserting a DIALOG DOEVENTS, even played with the X and Y of the DIALOG NEW statement itself.
I even tried creating (DIALOG NEW..CONTROL ADD..) the modeless dialog in WinMain when I create the "main" dialog and then just doing the DIALOG SHOW in the above callback function.
On one try and one try only did I get the text to appear, but that was when I made a mistake and did a DIALOG END of the WRONG dialog.
Eventually I want to change the LABEL control into a "progress bar" control, but until I can get a simple label to show up I'm a little reluctant to go hacking up my main processing code (to keep track of the percent done).
Can anyone tell me what I am missing here?
Is it something simple? Will I be saying, "duh?"
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Comment