Solved

Weird CComboBox OnDropDown problem

Posted on 1997-07-24
4
293 Views
Last Modified: 2013-11-20
null
0
Comment
Question by:roelf
  • 2
  • 2
4 Comments
 
LVL 8

Accepted Solution

by:
gelbert earned 100 total points
ID: 1302785
I think your problem is that you tring to bring up MessageBox in CBN_DROPDOWN message handler when MFC is trying to do some painting to fill in listbox of combobox and message box  also trying to do some painting. Possible solution is to use PostMessage to call another function to bring up message box.
0
 

Author Comment

by:roelf
ID: 1302786
I have tried using PostMessage() in the OnDropdownCombo1() function
to call another function to display the messagebox.  The messagebox
comes up allright, but then the list part of the combobox closes,
so no item can be selected.
0
 
LVL 8

Expert Comment

by:gelbert
ID: 1302787
IF you want to have open listbox part ob combobox after message box is closed then as soon as user press "OK" on your message box, send CBN_DROPDOWN message to combobox class to reopen list box and not to display message box this time.
0
 

Author Comment

by:roelf
ID: 1302788
I can do that, but it seems to be such a schlep to keep track of
is this the first ONDROPDOWN or the second one, etc...

Thanks anyway - at least I can get it working now.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
mixString challenge 36 134
sum67 challenge 35 114
fizzArray  challenge 1 107
Increment column based of a FK 8 47
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question