Solved

Weird CComboBox OnDropDown problem

Posted on 1997-07-24
4
308 Views
Last Modified: 2013-11-20
null
0
Comment
Question by:roelf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

688 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