Changed: Added a new event EventCloseWindowId when system reports window should be closed
This commit is contained in:
parent
8e867a08a4
commit
cfad8b1ecb
2 changed files with 17 additions and 0 deletions
|
@ -65,6 +65,7 @@ const CClassId EventStringId (0x49b5af8f, 0x7f52cd26);
|
||||||
const CClassId EventActivateId (0x7da66b0a, 0x1ef74519);
|
const CClassId EventActivateId (0x7da66b0a, 0x1ef74519);
|
||||||
const CClassId EventSetFocusId (0x17650fac, 0x19f85dde);
|
const CClassId EventSetFocusId (0x17650fac, 0x19f85dde);
|
||||||
const CClassId EventDestroyWindowId (0x69be73fe, 0x4b07603b);
|
const CClassId EventDestroyWindowId (0x69be73fe, 0x4b07603b);
|
||||||
|
const CClassId EventCloseWindowId (0xb5cb1333, 0xd092e63a);
|
||||||
|
|
||||||
// Mouse events
|
// Mouse events
|
||||||
const CClassId EventMouseMoveId (0x3dd12fdb, 0x472f548b);
|
const CClassId EventMouseMoveId (0x3dd12fdb, 0x472f548b);
|
||||||
|
@ -504,6 +505,19 @@ public:
|
||||||
virtual CEvent *clone() const {return new CEventDestroyWindow(*this);}
|
virtual CEvent *clone() const {return new CEventDestroyWindow(*this);}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CEventCloseWindow
|
||||||
|
*/
|
||||||
|
class CEventCloseWindow : public CEvent
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CEventCloseWindow (IEventEmitter* emitter) : CEvent (emitter, EventCloseWindowId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual CEvent *clone() const {return new CEventCloseWindow(*this);}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CEventIME
|
* CEventIME
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -281,6 +281,9 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPA
|
||||||
case WM_DESTROY:
|
case WM_DESTROY:
|
||||||
server->postEvent (new CEventDestroyWindow (this));
|
server->postEvent (new CEventDestroyWindow (this));
|
||||||
break;
|
break;
|
||||||
|
case WM_CLOSE:
|
||||||
|
server->postEvent (new CEventCloseWindow (this));
|
||||||
|
return true;
|
||||||
case WM_DISPLAYCHANGE:
|
case WM_DISPLAYCHANGE:
|
||||||
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this));
|
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this));
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue