Click here to Skip to main content
15,909,445 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:58
Mark Salsbery2-Oct-07 13:58 
GeneralRe: Erasing a button Pin
cp98762-Oct-07 16:42
cp98762-Oct-07 16:42 
Questionfunction pointers part 2 Pin
Mustafa Ismail Mustafa2-Oct-07 10:59
Mustafa Ismail Mustafa2-Oct-07 10:59 
AnswerRe: function pointers part 2 Pin
Chris Losinger2-Oct-07 11:15
professionalChris Losinger2-Oct-07 11:15 
GeneralRe: function pointers part 2 Pin
Mustafa Ismail Mustafa2-Oct-07 11:28
Mustafa Ismail Mustafa2-Oct-07 11:28 
GeneralRe: function pointers part 2 Pin
Stephen Hewitt2-Oct-07 17:27
Stephen Hewitt2-Oct-07 17:27 
AnswerRe: function pointers part 2 [modified] Pin
Stephen Hewitt2-Oct-07 13:25
Stephen Hewitt2-Oct-07 13:25 
AnswerRe: function pointers part 2 Pin
Cedric Moonen2-Oct-07 20:15
Cedric Moonen2-Oct-07 20:15 
GeneralRe: function pointers part 2 Pin
Stephen Hewitt2-Oct-07 21:40
Stephen Hewitt2-Oct-07 21:40 
QuestionSorting a value from file Pin
Herboren2-Oct-07 10:23
Herboren2-Oct-07 10:23 
AnswerRe: Sorting a value from file Pin
Stephen Hewitt2-Oct-07 13:46
Stephen Hewitt2-Oct-07 13:46 
AnswerRe: Sorting a value from file Pin
zakkas24832-Oct-07 19:14
zakkas24832-Oct-07 19:14 
AnswerRe: Sorting a value from file [modified] Pin
David Crow3-Oct-07 3:07
David Crow3-Oct-07 3:07 
GeneralRe: Sorting a value from file Pin
Herboren3-Oct-07 6:21
Herboren3-Oct-07 6:21 
Questionwhat is the difference between macro, pragma, and inline? Pin
Gofur Halmurat2-Oct-07 10:18
Gofur Halmurat2-Oct-07 10:18 
AnswerRe: what is the difference between macro, pragma, and inline? Pin
Mark Salsbery2-Oct-07 10:38
Mark Salsbery2-Oct-07 10:38 
Questionva_copy? Pin
DQNOK2-Oct-07 7:32
professionalDQNOK2-Oct-07 7:32 
AnswerRe: va_copy? Pin
Mark Salsbery2-Oct-07 8:19
Mark Salsbery2-Oct-07 8:19 
AnswerRe: va_copy? Pin
David Crow2-Oct-07 8:20
David Crow2-Oct-07 8:20 
GeneralRe: va_copy? Pin
DQNOK2-Oct-07 8:57
professionalDQNOK2-Oct-07 8:57 
QuestionHaving a the processID how to get the application instance (HINSTANCE) ? Pin
carabutnicolae12342-Oct-07 7:22
carabutnicolae12342-Oct-07 7:22 
AnswerRe: Having a the processID how to get the application instance (HINSTANCE) ? Pin
Maxwell Chen3-Oct-07 0:11
Maxwell Chen3-Oct-07 0:11 
QuestionCustom ComboBox Control - Need Advice [modified] Pin
Leslie Sanford2-Oct-07 6:45
Leslie Sanford2-Oct-07 6:45 
As I've mentioned here in earlier posts, I've been writing a set of custom controls. They're finished for the most part, but there is one control left to do that has me stumped. I need a custom ComboBox.

The top of the combobox is an image. That is to say, the part of the combobox that displays the current selection as well as the down arrow that you click on to make a selection is a PNG image. What I need to figure out is how to provide the rest of the combobox functionality, specifically, the drop-down part.

The drop-down part doesn't have to be skinable. So I was thinking about using a standard list box. When the user clicks on the combobox's down arrow, a list box appears beneath it. Once the user selects an item, the list box is hidden. If the list box loses focus at any time, it is also hidden.

I've yet to try this, but it seems to be an ok solution. However, I'm looking for better ideas, so I thought I would ask here. Thanks.

[EDIT]
I think I found a better solution. I can subclass the CComboBox class making sure to leave out the WS_VISIBLE style. That way the combo box is invisible. I'll provide the top part image as described above. When the user clicks the down arrow on my image, I'll call ShowDropDown to show only the drop-down list. This seems to give me what I want.
[/EDIT]


-- modified at 13:17 Tuesday 2nd October, 2007
QuestionRe: Custom ComboBox Control - Need Advice Pin
Mark Salsbery2-Oct-07 8:21
Mark Salsbery2-Oct-07 8:21 
AnswerRe: Custom ComboBox Control - Need Advice [modified] Pin
Leslie Sanford2-Oct-07 8:25
Leslie Sanford2-Oct-07 8:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.