Friday, 15 June 2012

C++ Windows Forms Operating System Message capture -



C++ Windows Forms Operating System Message capture -

i have c++ windows form can capture messages sent within application using next code:

protected: virtual void wndproc(message% m) override { switch (m.msg) { case wm_user: messagebox::show("encountered wm_user message"); break; case wm_destroy: messagebox::show("closing application.."); break; default: break; } __super::wndproc(m); }

this correctly fires when wm_user message or wm_destroy message sent in application, not capture messages when sent other applications. need able access messages not explicitly meant window in application.

the form created , executed using application::run(gcnew form1()); starts message loop.

is possible access operating scheme messages in method of using c++ , windows forms?

you wndproc method execute whenever message processed window. if method not executing, obvious conclusion messages hoping capture not beingness sent window.

c++ windows winforms

No comments:

Post a Comment