case WM_NOTIFY:
{
LPNMHDR pNMHDR = (LPNMHDR)lParam;
switch(pNMHDR->code) {
case NM_CUSTOMDRAW:
LPNMCUSTOMDRAW pNMCustomDraw = (LPNMCUSTOMDRAW)lParam;
switch(pNMCustomDraw->dwDrawStage) {
case CDDS_PREPAINT:
return CDRF_NOTIFYPOSTPAINT;
case CDDS_POSTPAINT:
//Paint icon
}
}
break;
}
Does anyone know a solution to this/what's causing it?
Icon button
I'm trying to create a button control with a transparent icon overlay in a c++ application that is using the xp visual style. However, when I set the icon parameter of the button control using the BM_SETIMAGE message the button is rendered as a flat windows 98 style button.
What's the easiest way of creating a xp style button with a transparent icon overlay? I've been trying to use NM_CUSTOMDRAW to paint the icon onto the button but it wont send the CDDS_POSTPAINT draw state message. Here's the code that I'm using:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement