hi
i have an ATL Dialog box that launches a window (which is a custom class derived from CWindowImpl) when a button is clicked
now i want that window to be modal = to handle ALL events until it's closed
is it feasible ? can someone tell me how ??
some code ...
my custom class is CMyWindow
the call to the window
LRESULT OnClickedCap(...)
{
CMyWindow m_cwin;
RECT rt;
SetRect(&rt, ...);
m_cwin.Create(GetDesktopWindow(), rt, "test",WS_VISIBLE|WS_POPUP); // getdestopwindow just because i need the c_win to be reaaaaaaaaallly big
m_cwin.SetActiveWindow();
return 0;
}
and in the CMyWindow class, i declare
class CMyWindow : public CWindowImpl<CMyWindow>
{
public:
...
BEGIN_MSG_MAP(CMyWindow)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
END_MSG_MAP()
..
}
so what could i add to make CMyWindow to handle all messages (and return when WM_DESTROY is fired ) ???
i have an ATL Dialog box that launches a window (which is a custom class derived from CWindowImpl) when a button is clicked
now i want that window to be modal = to handle ALL events until it's closed
is it feasible ? can someone tell me how ??
some code ...
my custom class is CMyWindow
the call to the window
LRESULT OnClickedCap(...)
{
CMyWindow m_cwin;
RECT rt;
SetRect(&rt, ...);
m_cwin.Create(GetDesktopWindow(), rt, "test",WS_VISIBLE|WS_POPUP); // getdestopwindow just because i need the c_win to be reaaaaaaaaallly big
m_cwin.SetActiveWindow();
return 0;
}
and in the CMyWindow class, i declare
class CMyWindow : public CWindowImpl<CMyWindow>
{
public:
...
BEGIN_MSG_MAP(CMyWindow)
MESSAGE_HANDLER(WM_PAINT, OnPaint)
MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
MESSAGE_HANDLER(WM_CREATE, OnCreate)
MESSAGE_HANDLER(WM_LBUTTONDOWN, OnLButtonDown)
END_MSG_MAP()
..
}
so what could i add to make CMyWindow to handle all messages (and return when WM_DESTROY is fired ) ???