CXTPControlComboBox + Ribbon + ownerdraw prob |
Post Reply |
Author | |
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 15 July 2008 at 11:42pm |
I have a Ribbon based app. I am trying to add a CXTPControlComboBox control that will be owner drawn. It does not have the edit field.
I subclass the control. I set the listbox style to (LBS_OWNERDRAWFIXED | LBS_HASSTRINGS)
DrawEditText does gets called whether the style is set or not .
No matter which way the style is set, DrawItem and MeasureItem do not get called. If the style is not set, the listbox will do its default draw. If it is set, the background is filled but that is all.
I've looked at the custom themes example but I think the Ribbon may be causing the problem.
So I am stumped about how to proceed.
|
|
Joe19
Newbie Joined: 11 May 2007 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
OK, figured it out. when creating the CXTPControlComboBox its constructors default parameter is NULL. If this value is set to the CommandBars object, the control message reflection will work allowing ownerdraw to work. You can get the CommandBars object from the ribbonbar with GetCommandBars.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |