CAcUiLineWeightComboBox Owner Draw Problem

CAcUiLineWeightComboBox Owner Draw Problem

Kyudos
Collaborator Collaborator
593 Views
3 Replies
Message 1 of 4

CAcUiLineWeightComboBox Owner Draw Problem

Kyudos
Collaborator
Collaborator

I'm using a combo derived from CAcUiLineWeightComboBox on my MFC dialogs, but it seems to have problems re-drawing when the control doesn't have focus (it is generally blank until selected). I have the control set to "Owner Draw Fixed", "Has Strings" is true and I'm using the "Drop List" style. The lines and text draw correctly in the drop down, but the combo itself only draw intermittently.

 

If I turn off the owner draw or switch to "Dropdown" style the combo redraws correctly, but displays only the text. I need the drop-list style to 'enforce' a selection (and it would be nice to graphically display the weight).

 

Is this a known issue?

 

 

0 Likes
Accepted solutions (1)
594 Views
3 Replies
Replies (3)
Message 2 of 4

Kyudos
Collaborator
Collaborator

This similar issue suggests the class is not processing WM_PAINT messages properly:

 

http://stackoverflow.com/questions/1658620/why-is-my-owner-drawn-combobox-shown-empty

 

 

0 Likes
Message 3 of 4

Virupaksha_aithal
Autodesk Support
Autodesk Support
Accepted solution

Hi,

 

can you please test the attached sample? 

 

lineweight.png



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes
Message 4 of 4

Kyudos
Collaborator
Collaborator

Hi Viru,


Thanks...yes that works. It seems using a derived combo was the problem - see attached project.

 

I may just have neglected to override something necessary, but in the mean time I can switch to using "pure" CAcUiLineWeightComboBox members.

 

 

 

 

0 Likes