473,503 Members | 939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

help with custom combobox and WndProc

hi:

i am developing a custom combobox for my company's needs that is made
up of a textbox, listbox, button. i am using c#. everything is fine
except for one issue.

in a normal combobox, when the dropdown is visible and the user clicks
anywhere else, the dropdown gets hidden. i am trying to replicate
this behavior and have tried using the Leave and LostFocus events. i
have had marginal success when my dropdown is visible and i click on
another button, for example. since the focus goes to the button (i'm
assuming), the desired behavior is had.

however, if my dropdown is visible and i click on part of the form
that has nothing on it, nothing happens. i tried to override WndProc
to listen for the WM_CAPTURECHANGED message, but that message never
seems to get generated. i then put a normal windows combobox on the
same form and listened to its events. i notice that when i click away
from the standadr combobox and the dropdown is showing, a message
numbered 2111 (that's in hex, the decimal is 8465) is sent out.

i then monitored the messages on the listbox ( = dropdown) portion of
my custom combobox and i see this 2111 message appearing as well when
i manually close the dropdown.

so it looks like this message is what i want to be listening for,
however, no messages at all get generated when i click away from my
custom combobox. if no messages are being generated, then i don't see
how overriding WndProc is the answer to my problem.

what can i do here? i've done extensive research online and haven't
found the solution - there must be others who have written their own
comboboxes. how did you get around this problem?

thanks in advance,
jean
Jul 21 '05 #1
0 2041

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
18322
by: Timo Kunze | last post by:
Hi! If you move the mouse over an item that's part of a treeview and wider than the treeview, a tooltip showing the full item text will be displayed. I try to do this for ListBoxes and...
2
15546
by: Simon Verona | last post by:
If I have a combobox set enabled=false then by default it will have dark grey text on a grey background. I want it to show as blue on white. I'm trying code such as : combobox.enabled=false...
0
375
by: jean | last post by:
hi: i am developing a custom combobox for my company's needs that is made up of a textbox, listbox, button. i am using c#. everything is fine except for one issue. in a normal combobox,...
9
6163
by: Duncan Barnes-Ceeney | last post by:
I’m having problems with a custom Combo box. The main problem is that I want to modify the look of the combo which includes the size of the button. To do this I have inherited from the standard...
6
2840
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
5
19632
by: Blue | last post by:
We have a custom word processing type editor built with C# and .NET 2.0 and we need to support typing in languages other than English. I want to be able to use the Windows IME to enter in text...
1
3653
by: Saww | last post by:
Hello lately i have been trying to make a custom combobox with a few targets. 1. to create a disabled items 2. to create a seperator item I already managed both properties items. i also managed...
2
3240
by: Andrus | last post by:
SWF DataGridView contains combobox control. Activating combobox and pressing F4 to open dropdown menu causes strange NRE (see below). When I enter some valid value to combobox, press tab,...
3
3524
by: - HAL9000 | last post by:
I am trying to get an event when the drop-down Combo Box goes away / reverts back to showing a single item. For example, clicking the box's down arrow, to remove the drop-down window, doesn't...
0
7203
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7089
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.