Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

KillFocus and ComboBox

Status
Not open for further replies.

Captrick458

Programmer
Mar 27, 2005
37
US
I created a combo box, and then modified the declaration to a class derived from ComboBox that I intend to use to get the State portion of an address. (The derived class has only two extra functions, OnGetFocus to populate the box, and OnKillFocus to do some post processing.) I then imported the .cpp and .h files for the class. All is working correctly except that I am unable to catch the KillFocus Message.

The message map has

ON_CONTROL_REFLECT(CBN_KILLFOCUS, OnKillFocus)

and the function OnKillFocus is declared

afx_msg void OnKillfocus();

OnGetFocus works just fine.


Does anyone have any ideas?
 
What message are you using for OnGetFocus? CBN_KILLFOCUS is a notification. Have you tried WM_NOTIFY and deciphering what you get from there? Bit of a wild shot - I'm normally use SDK which doesn't have this problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top