Click here to Skip to main content
15,926,062 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: A question about thread programming Pin
Joaquín M López Muñoz1-Oct-01 8:26
Joaquín M López Muñoz1-Oct-01 8:26 
GeneralBitmap question Pin
#realJSOP1-Oct-01 8:13
professional#realJSOP1-Oct-01 8:13 
GeneralRe: Bitmap question Pin
Mike Nordell1-Oct-01 9:52
Mike Nordell1-Oct-01 9:52 
GeneralRe: Bitmap question Pin
Paolo Messina1-Oct-01 12:33
professionalPaolo Messina1-Oct-01 12:33 
Generalcreating COM objects in Visual C++ to work in vbscript Pin
David Higgins1-Oct-01 7:39
David Higgins1-Oct-01 7:39 
GeneralRe: creating COM objects in Visual C++ to work in vbscript Pin
Andres Manggini1-Oct-01 8:09
Andres Manggini1-Oct-01 8:09 
GeneralDebugging ISAPI Tools Pin
CHERCHALI KARIM1-Oct-01 7:03
CHERCHALI KARIM1-Oct-01 7:03 
GeneralSimple !?! How to wait for OK Pin
Josh Knox1-Oct-01 6:55
Josh Knox1-Oct-01 6:55 
Hi,

I've got a function that launches a simple dialog. How do I get the function to wait for the OK button to be pressed before returning?

<br />
void Import_Shader_Dialog::OnImportShaders() <br />
	{<br />
	Some_Dlg Progress;<br />
        Progress.Create(IDD_IMPORT_SHADER_PROGRESS, NULL);	<br />
	Progress.ShowWindow(SW_SHOW);<br />
<br />
        /*--------<br />
        Do Stuff......<br />
        ----------*/<br />
	//----------------HOW DO I:-----------------------<br />
	// !!!!!!wait until OK button has been pressed!!!!!<br />
	//------------------------------------------------<br />
        while(its_not_ok);     //wait<br />
<br />
	<br />
return;<br />
	}<br />


I've tried making the dialog modal but then of course none of the function gets executed while the dialog is up.

The way it is, it just appears as long as the function is executing(very quick).

So how can I get my child dialog to stay up and receive messages from my program until the OK button is pressed?

Thanks

Josh
josh@that-guy.net
GeneralRe: Simple !?! How to wait for OK Pin
Stan Shannon1-Oct-01 7:09
Stan Shannon1-Oct-01 7:09 
GeneralRe: Simple !?! How to wait for OK Pin
Josh Knox1-Oct-01 8:09
Josh Knox1-Oct-01 8:09 
GeneralRe: Simple !?! How to wait for OK Pin
Stan Shannon1-Oct-01 8:19
Stan Shannon1-Oct-01 8:19 
GeneralRe: Simple !?! How to wait for OK Pin
Tomasz Sowinski1-Oct-01 7:16
Tomasz Sowinski1-Oct-01 7:16 
GeneralRe: Simple !?! How to wait for OK Pin
Josh Knox1-Oct-01 8:18
Josh Knox1-Oct-01 8:18 
GeneralRe: Simple !?! How to wait for OK Pin
Eric Jacobsen9-Jan-02 10:27
Eric Jacobsen9-Jan-02 10:27 
GeneralWM_DRAWITEM & CFrameWnd Pin
AJ1231-Oct-01 6:25
AJ1231-Oct-01 6:25 
GeneralRe: WM_DRAWITEM & CFrameWnd Pin
Tomasz Sowinski1-Oct-01 7:24
Tomasz Sowinski1-Oct-01 7:24 
GeneralAdding Menus to Dialog Boxes Pin
1-Oct-01 6:21
suss1-Oct-01 6:21 
GeneralRe: Adding Menus to Dialog Boxes Pin
JerzyPeter1-Oct-01 6:46
JerzyPeter1-Oct-01 6:46 
GeneralFancy text in ListCtrl cell Pin
john john mackey1-Oct-01 6:11
john john mackey1-Oct-01 6:11 
GeneralRe: Fancy text in ListCtrl cell Pin
Tomasz Sowinski1-Oct-01 7:22
Tomasz Sowinski1-Oct-01 7:22 
GeneralWindow's message queue Pin
1-Oct-01 6:01
suss1-Oct-01 6:01 
GeneralRe: Window's message queue Pin
Tim Deveaux1-Oct-01 6:52
Tim Deveaux1-Oct-01 6:52 
GeneralRe: Window's message queue Pin
1-Oct-01 15:51
suss1-Oct-01 15:51 
GeneralImporting a TLB Problem Pin
Joseph Dempsey1-Oct-01 5:59
Joseph Dempsey1-Oct-01 5:59 
GeneralProblem with CTreeCtrl in Windows98 Pin
Yolanda1-Oct-01 5:33
Yolanda1-Oct-01 5:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.