Hey, I was working on a program in windows API where there are multiple edit boxes and there are push buttons. If a pushbutton is clicked, I want the program to find the edit box that the cursor is in and add the character to that edit box. Now I know how to add the character to the box but I don't know how to determine which edit box that the cursor is in. Any Help?
goody11 -2
Junior Poster
Recommended Answers
Jump to PostYea, try this...
GetFocus The GetFocus function retrieves the handle to the window that has the keyboard focus, if the window is associated with the calling thread's message queue. HWND GetFocus(VOID) Parameters This function has no parameters. Return Values The return value is the handle to the …
Jump to PostAhh! goody, sorry about that! You are right. It doesn't work. I'm afraid the solution is a bit more complex. Basically, when a textbox has the focus and you click some other control such as a button, the edit control will lose the keyboard focus and windows will send it …
All 6 Replies
Frederick2 189
Posting Whiz
goody11 -2
Junior Poster
Frederick2 189
Posting Whiz
Frederick2 189
Posting Whiz
goody11 -2
Junior Poster
Frederick2 189
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.