Edit Box small problem

Started by
0 comments, last by White Rabbit 21 years, 3 months ago
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]
"Follow the white rabbit."
Advertisement
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.

This topic is closed to new replies.

Advertisement