It's ok if using TextOut instead of DrawText.
Hi David, I tried with "\x63", "\x64". "\x72", but it's not work, may be OS problem. My OS is win11 insider version.
From 9.4, DrawCloseButton is changed to use Marlett font to draw "x" and button hover state using "c", "d", "r" character, but in my Win11 laptop, it is not displayed correctly, but using glyph code "\uF063" . "\uF064" and "\uF072" can display in expectation.
I'm working on a file browser, I want to draw folder without icon, and draw file with icon in tree view.
Use inherit way is ok for my scenario, only need to override OnLButtonDown.
Hi David, Thanks for your advices. For this way, overrid OnLButtonDown is simply and ok, but for OnTBNHotItemChange has some complexity, I need to avoid send UWM_POPUPMENU message for menu without menuitems.
Better way is only change in OnTBNHotItemChange handler and OnLButtonDown handler: 1. in OnTBNHotItemChange, change //Always use PostMessage for USER_POPUPMENU (not SendMessage). PostMessage(UWM_POPUPMENU, 0, 0); to //Always use PostMessage for USER_POPUPMENU (not SendMessage). if (::GetSubMenu(m_topMenu, m_hotItem)) PostMessage(UWM_POPUPMENU, 0, 0); 2. in OnLButton, add code before "return 0": if(GetSubMenu(m_topMenu, m_hotItem) == NULL) GetParent().SendMessageW(WM_COMMAND, GetMenuItemID(m_topMenu,...
And need to change code in OnTBNHotItemChange to send UWM_POPUPMENU message only is POPUP like this : if(::GetSubMenu(m_topMenu, m_hotItem)) //Always use PostMessage for USER_POPUPMENU (not SendMessage). PostMessage(UWM_POPUPMENU, 0, 0);