mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-25 00:06:16 +00:00
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 EventSetFocusId (0x17650fac, 0x19f85dde);
|
||||
const CClassId EventDestroyWindowId (0x69be73fe, 0x4b07603b);
|
||||
const CClassId EventCloseWindowId (0xb5cb1333, 0xd092e63a);
|
||||
|
||||
// Mouse events
|
||||
const CClassId EventMouseMoveId (0x3dd12fdb, 0x472f548b);
|
||||
|
@ -504,6 +505,19 @@ public:
|
|||
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
|
||||
*/
|
||||
|
|
|
@ -281,6 +281,9 @@ bool CWinEventEmitter::processMessage (HWND hWnd, uint32 msg, WPARAM wParam, LPA
|
|||
case WM_DESTROY:
|
||||
server->postEvent (new CEventDestroyWindow (this));
|
||||
break;
|
||||
case WM_CLOSE:
|
||||
server->postEvent (new CEventCloseWindow (this));
|
||||
return true;
|
||||
case WM_DISPLAYCHANGE:
|
||||
server->postEvent (new CEventDisplayChange (LOWORD(lParam), HIWORD(lParam), (uint)wParam, this));
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue