c++ - window without wndproc -
i curious possible create window without using wndproc.
so register window-class lpfnwndproc field set null; , using msg ( given translatemessage(&msg) ) in own way.
is there disadvantages of this?
thanks ahead, , sorry grammar.
edit #1: okay, have window, wrong somewhere.
msg msg; while(peekmessage(&msg,null,null,null,pm_remove)) { if (msg.message == wm_quit) return false; else { translatemessage(&msg); switch (msg.message) { case wm_create: createcontext(); break; default: dispatchmessage(&msg); break; } } } return true;
the createcontext not getting called. why? wrong? yeah, maybe wm_create message sent wndproc (defwindowproc now), there way outside wndproc?
afaik, can't set null
. however, you'll notice defwindowproc
's signature matches windowproc
callback's signature. give defwindowproc
if you'd reasonable default.
Comments
Post a Comment