[WINDOWS] Subclassing + WM_DWMNCRENDERINGCHANGED = crash
-
Hi everybody,
I have a graphic library which is initialized with a control handle to drow on this control :
@graphLib->Initialize(myFrame->winId());@The library needs to get some window messages related to the handle. To get this, I subclass the WNDPROC like this :
@WNDPROC oldproc = (WNDPROC)(GetWindowLongPtr(hwnd, GWLP_WNDPROC);
SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR)newproc);@In newproc, I just receive this events :
WM_NCHITTEST
WM_SETCURSOR
WM_MOUSEFIRSTI tried to subclass the parent like this :
@WNDPROC oldproc = (WNDPROC)(GetWindowLongPtr(GetParent(hwnd), GWLP_WNDPROC);
SetWindowLongPtr(GetParent(hwnd), GWLP_WNDPROC, (LONG_PTR)newproc);@
And now I have events I need, like WN_PAINT (15). Is that normal ?Next, when the graphLib does not handle an message, I translate it to the oldproc. It works until the message WM_DWMNCRENDERINGCHANGED (0x31F) which makes my application crash. If I redirect the message to DefWinProc, it works, but I think it's not correct.
What can I do ? Maybe I have to compile Qt with others options ?
Thank you all,
Kin -
-
Hmmm... how does this relate to Qt at all?