Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Is it possible to custom_draw the chevron button on the CRebar?

Is it possible to custom_draw the chevron button on the CRebar?

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    benben
    wrote on last edited by
    #1

    I want to customize the rebar's appearance(gripper, background...).I catch the NM_CUSTOMDRAW notification to do some processing, For example: BOOL CMyReBar::OnNotify( WPARAM wParam, LPARAM lParam, LRESULT* pResult ) { ......... NMHDR* pNMHDR = ( NMHDR* )lParam; switch ( pNMHDR->code ) { case NM_CUSTOMDRAW: { //DWORD dwStyle = GetDrawStyle(); //if (dwStyle>DRAW_ORIGINAL) *pResult=DoCustomDrawXP(pNMHDR); break; } ........... } ........ } LRESULT CMyReBar::DoCustomDrawXP( NMHDR* pNMHDR) { LPNMCUSTOMDRAW lpNMCustomDraw = ( LPNMCUSTOMDRAW )pNMHDR; LRESULT pResult = CDRF_DODEFAULT; switch ( lpNMCustomDraw->dwDrawStage ) { case CDDS_PREPAINT: pResult = CDRF_NOTIFYITEMDRAW; break; case CDDS_ITEMPREPAINT: //here I try to owner-draw the rebar control's appearance DrawItem(lpNMCustomDraw); pResult = CDRF_SKIPDEFAULT; break; } return pResult; } But I find in this way I can only custom-draw the gripper. If there is a chevron button on the rebar, it is disappeared. How could I get the similar notification to draw the chevron button by myself?

    Thanks Benben

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups