I have an other question about owner draw buttons.
In my main window everything works fine, but when I use ownerdraw buttons in a dialogbox, I have a huge bug.
at first everything is fine, but when I move the dialobox with its body of the screen, or I put an other window on top, the buttons are gone, shouldn't windows end a WM_DRAWITEM whenever the buttons need to be repainted?
or am I forgetting a function that call the WM_DRAWITEM?
here's the code for WM_DRAWITEM
here is also a pic if I didn't make myself clear.Code:
case WM_DRAWITEM :
lpdis = (LPDRAWITEMSTRUCT) lParam;
hdcMem = CreateCompatibleDC(lpdis->hDC);
lpdis->rcItem.right - lpdis->rcItem.left,
lpdis->rcItem.bottom - lpdis->rcItem.top,
the first one is after I put an other window in front of the dialogbox, the second one is the original: