From: cui@maccs.mcmaster.ca (Jun Cui)
Subject: How to hold the control to a window object?
Keywords: ObjectWindows, MS-Windows, SDK
Nntp-Posting-Host: maccs.dcss.mcmaster.ca
Organization: Department of Computer Science, McMaster University
Distribution: comp.os.ms-windows.misc comp.windows.ms
Lines: 30

//I'm using BC++'s ObjectWindows (version 3.1) and trying to get some data 
//processed in a window object. However, when the calling program invokes 
//the window object, it gives up the control to the window object, and keeps 
//executing the next statement. I would like the calling program, after 
//invoking the window object, to wait until the window object is closed. 
//Can I do that? My program may look like:

class MyWindow : public TWindow
{
	...
};

void MyCallingProg(...)  // Could the calling program be a C function?
{	...
	MyWindow *MyWinObj;
	MyWinObj = new MyWindow(...);
	GetApplication()->MakeWindow(MyWinObj);
	MyWinObj->Show(SW_SHOWNORMAL);

	next statement;  // I want the program to wait here until MyWinObj
	...              // is closed so that I can get some data back from 
	...              // MyWinObj. I specified the window style to be 
	...              // WS_POPUPWINDOW, didn't help. Is there any other way 
	...              // to execute the window object so that the calling 
   ...              // program won't give up the control? Any help would 
}                   // be appreciated.   Thanks.  -- Jun
To talk to the Lord with PS/2 through MS-Windows



