67 questions
0 votes
0 answers
75 views
How do you update all the TreeView items full area when the vertical scrollbar shows up or goes away?
I am using NM_CUSTOMDRAW to draw tree view items. My items right justify parts of it by using a right margin based on the RECT area reported available. The issue I have is that when the vertical ...
0 votes
0 answers
155 views
CDialogEx:: OnNCPaint() increases the size of dialog window
I need to draw custom title bar, using Win10, VS2017, MFC, SDK10.0.16299.0. When MyDialog::OnNcPaint() does not call CDialogEx::OnNcPaint(), the dialog frame is drawn incorrectly - the top corners are ...
1 vote
1 answer
557 views
Default selection color when TreeView is not focused
How can I set the TreeView's selected node to the default clHighlight color when the TreeView is not focused? I tried this code in the CustomDrawItem and AdvancedCustomDrawItem events - no luck: if (...
0 votes
0 answers
86 views
Measure ToolStripItem in custom ToolStrip renderer
I have a WinForms app for .NET Framework in which the text of items in context menus based on the the ContextMenuStrip component are drawn using Graphics.DrawString() to provide consistent look with ...
5 votes
0 answers
363 views
How to convince CListCtrl to view selection for each column (subitem)
I have my own CListCtrl (MyList : public CListCtrl) and I want to show selection for each column, not for entire row. I changed WM_LBUTTONDOWN message and WM_KEYDOWNMESSAGE and set current column to ...
0 votes
0 answers
132 views
How to make TreeView send CDDS_*ERASE events?
I'm implementing a customized TreeView with win32. Have the following custom draw code: void treeCustomDraw(NMHDR* pNMHDR, LRESULT* pResult) { NMCUSTOMDRAW* pNMCustomDraw = (NMCUSTOMDRAW*)pNMHDR; ...
0 votes
0 answers
112 views
How is a tooltip custom-drawn if it's always a popup?
The tooltip docs say that A tooltip control always has the WS_POPUP and WS_EX_TOOLWINDOW window styles, regardless of whether you specify them when creating the control. Meanwhile, the way to custom ...
0 votes
1 answer
276 views
win32 ListView CustomDraw , why dwDrawStage value is alway equal to 1
i'm working on win32 listview controls,Want to achieve CustomDraw, but i got something strange。 I wonder why this dwDrawStage value is always equal to 1 bool rst = CreateWinEx(WC_LISTVIEW, NULL, ...
2 votes
1 answer
1k views
TabControl Custom Tab Bar Background Color
I have a TabControl where I needed to have custom tab colors. To do this, I set the DrawMode to OwnerDrawFixed, and overwrote the DrawItem event. However, when I change the DrawMode, it appears that ...
1 vote
1 answer
820 views
Custom trackbar ticks
I'm using the stock Trackbar control. I would like to custom draw the ticks. Here I made an experiment, just trying to draw in the right place: case WM_NOTIFY: { NMHDR* nMhdr = (NMHDR*) lParam; ...
-3 votes
1 answer
381 views
Delphi TTreeView OnCustomDrawItem event slows it down
I have an outliner application (in Delphi 10.2 Tokyo) that I use for taking notes (I'll call it NoteApp). I have another application that I use for editing plain text (TextApp). Since I switch between ...
0 votes
1 answer
909 views
How can I resize an application menu bar in a MFC application?
I am working with MFC and I have created succesfully custom-drawn menus. Each menu-item is measured and drawn correctly, except the mainlevel-items. The only thing I can't get done is redrawing the ...
1 vote
1 answer
801 views
Strange drawing with DrawingContext
I'm working on a custom WPF control that should visualize thousands of graphical primitives in a scrollable area. The core part of the control's template is the following: <Setter Property="...
0 votes
1 answer
589 views
Force a repaint of a custom drawn UIElement in a custom WPF control
I'm working on a custom WPF control. The main purpose of this control is to visualize thousands of graphical primitives in a scrollable area. The core part of the control's template looks like this: &...
2 votes
0 answers
819 views
Processing NM_CUSTOMDRAW on a pushbutton - but Windows still draws the text
I'm experimenting with using NM_CUSTOMDRAW instead of WM_DRAWITEM for bitmap buttons in my win32 app. The WM_DRAWITEM stuff works fine - except that it doesn't work under WINE with a desktop theme ...