Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

White Rabbit

Edit Box small problem

This topic is 5686 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi there, I've looked on a complete win32 api reference and a win32 api book and i can't seem to find a solution for this, i want to make a edit box similiar to those found on mIRC, you write whatever you want, you press enter, the info is processed and the text field clear. Now, the problem is, i can get the text inside the edit box just fine, but i can't capture the enter keypress, i also can't capture the tab and the escape, i tryed to do this by capturing the WM_KEYDOWN message on the main window peocedure, and it didn't work, i'm a bit confused i don't know what's wrong, some of what i read on source, on my book and my reference sugest this should be correct. Can someone show me some light? What's wrong? Do i need a separate procedure to capture the edit box messages? How do i capture the enter key in a single line edit box using c/c++? [edited by - white rabbit on January 23, 2003 2:23:47 AM]

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
i''m not familiar with mIRC. is the control a multi-line control?

if so, are you using an edit control from a resource? if so, use the resource editor to make sure the "want return" style is selected. if you''re creating the edit control window via code, make sure you''re using the ES_WANTRETURN flag in the edit control''s window style during your CreateWindow/Ex call.

if your edit control is not within a window that was created via one of the standard create dialog api calls, then you may have to add a call to IsDialogMessage within your msg processing loop. this is the function that normally gets called to "translate" key presses for certain keys (tab, arrow keys, etc.) into their appropriate msg posts to a dialog window''s controls.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!