|
Custom Draw with a TreeView control
I'm trying to use Custom Draw with a TreeView control, not trying to draw anything yet! Just trying to get the right notification messages.
I had a look at this code example from the MSDN but it just won't work.
Here it is:
When the stage is CDDS_PREPAINT I "ask" the control to report back information when it draws items, but for some weird reason, it doesn't...
Thanks for your help!
- Goblineye Entertainment
The road to success is always under construction
Edited by - Tornado on May 16, 2001 1:02:06 PM
Goblineye EntertainmentThe road to success is always under construction
This is supported only in later versions of windows (says ComCtl32.dll version 4.7 in MSDN whatever that is - probably is IE4 - you can check by right clicking on this file in system dir and checking its version).
Other than that it looks the same as the example in MSDN to me.
Sometimes there is a style you have to set (I was thinking it was WS_NOTIFY but I couldn''t find that) to get the controls to send WM_NOTIFY at all. I''ll keep looking and post if I find a style for that one
Hope that hlps
DSutherland
Other than that it looks the same as the example in MSDN to me.
Sometimes there is a style you have to set (I was thinking it was WS_NOTIFY but I couldn''t find that) to get the controls to send WM_NOTIFY at all. I''ll keep looking and post if I find a style for that one
Hope that hlps
DSutherland
quote:
This is supported only in later versions of windows (says ComCtl32.dll version 4.7 in MSDN whatever that is - probably is IE4 - you can check by right clicking on this file in system dir and checking its version).
Nope, that''s not it
![](sad.gif)
quote:
Sometimes there is a style you have to set (I was thinking it was WS_NOTIFY but I couldn''t find that) to get the controls to send WM_NOTIFY at all. I''ll keep looking and post if I find a style for that one
The WM_NOTIFY is sent to the parent of an item to notify the parent of... "stuff"
![](wink.gif)
So it needs no settings.
Neither there is a special style for Custom Draw since it''s a service. I "tell" the common control if I want it to provide it for me by returning CDRF_NOTIFYITEMDRAW when the CDDS_PREPAINT stage is sent.
Thanks for your help!
- Goblineye Entertainment
The road to success is always under construction
Goblineye EntertainmentThe road to success is always under construction
OK, the problem is solved ![](smile.gif)
I thought I might have missed something so I had another look at the WM_NOTIFY message I hate so much...![](wink.gif)
Anyway, I just found out that because the message was received in my dialog procedure I need to return a value like this:
Thanks again![](smile.gif)
- Goblineye Entertainment
The road to success is always under construction
Edited by - Tornado on May 17, 2001 10:16:05 AM
![](smile.gif)
I thought I might have missed something so I had another look at the WM_NOTIFY message I hate so much...
![](wink.gif)
Anyway, I just found out that because the message was received in my dialog procedure I need to return a value like this:
|
Thanks again
![](smile.gif)
- Goblineye Entertainment
The road to success is always under construction
Edited by - Tornado on May 17, 2001 10:16:05 AM
Goblineye EntertainmentThe road to success is always under construction
Coolness! I see now - you have one function OnNotify and that gets called from the DlgProc. Doesn''t matter what you return from OnNotify if you let windows call the def dlg proc from DlgProc (does it automatically based on that return value), then it wipes out whatever you did.
![](wink.gif)
Doug Sutherland
![](wink.gif)
Doug Sutherland
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement