News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

WM_DRAWITEM

Started by HellOfMice, November 22, 2024, 03:52:55 PM

Previous topic - Next topic

HellOfMice

Hello the World,

I want to draw an ownerdraw TAB
Like I did it runs but does not have the good colors.
Only when selected.



int Theme_Tab_WMDRAWITEM(LPDRAWITEMSTRUCT __lpDis)
{
   if((__lpDis->itemAction & ODA_SELECT) && (__lpDis->itemState & ODS_SELECTED))
         Theme_Tab_DrawSelectedAndSelected(hTabControl,__lpDis) ;
   else
   {
      if((__lpDis->itemAction & ODA_DRAWENTIRE) && (__lpDis->itemState & ODS_SELECTED))
         Theme_Tab_DrawSelectedAndSelected(hTabControl,__lpDis) ;
      else
         Theme_Tab_DrawFullAndNotSelected(hTabControl,__lpDis) ;
   }

   return (TRUE) ;
}


int Main_OnWmDrawItem(HWND __hWnd,WPARAM __wParam,LPARAM __lParam)
{
if(__wParam == IDC_TAB_01)
return (Theme_Tab_WMDRAWITEM(_lpDis)) ;
}


I join the full source code maybe that can help you
Please help to understand this message.
Merci

Philippe

HellOfMice

#1
I join an image it's easier to understand

After I will come back for the NMCUSTOMDRAW.

Philippe