I'm working with win32API c++. I added the WS_TABSTOP to the edit windows, as well as the WS_EX_CONTROLPARENT and DS_CONTROL to the parent window. Yet any numerous times of punching the tab key does nothing.

Anyone have sample code that works? I've searched for acouple hours and couldnt find anything without MFC. I refuse to use Visual products, hence my problem with the tab key not working.

OK, but are you placing these edit boxes on a Window or on a Dialogue box?

In response to which message to the parent window are you creating these edit boxes, or where with-in the structure of your code?

If you don't wish to use MS software but do wish to write windows programs you may wish to consider using the Dev-C++ which comes with resource editors allowing you to create dialogue boxes in the normal way, as a resource, rather than creating them on the fly at runtime.

I don't know if it helps, but I'm exploring the same issue except I'm using VC++ 5 (stop laughing at the back, I've had it for years and it was cheap.)

Anyway, I've got a class derived from CView which has a number of objects embedded in it representing "lines" of information. Each "line" is itself a class derived from plain old CWnd that contains static text, two CButton controls and two "custom" controls derived from CEdit.

I spite of defining all the controls with WS_TABSTOP & WS_EX_CONTROLPARENT I can't tab between the controls unless I add handlers to look for the "tab" keystrokes in my CEdit derived controls, and I can't do anything with the standard CButtons (and don't really want to create by own simply to handle the tab key.)

So in my case it's definitely CWnd's within CWnd's and not a CDialog box anywhere.

Any help would be much appreciated since I can't find anything in the VC++ online manuals.

Aha: I think I've found the answer to my own problem: Take a look at...

.... http://www.microsoft.com/mind/0499/faq/faq0499.asp

and

.... http://support.microsoft.com/?kbid=165074

... for a description of what's up with tabbing between CWnd child window controls. The first article is specific to "web browsers within other windows" but the descriptions contained of how Windows handles tab keystrokes should prove illumunating.

And just in case anyone's reading this years after it was posted and the links have gone dead, look up "IsDialogMessage" and "PreTranslateMessage" functions in your favourite search engine and hopefully you should find some useful information.

If your problems are inside Dialog boxes, hopefully the original respondant to this post can help you out.