Question

Hello I was reading through some other posts about my issue on SO that haven't been quite answered yet (like this). I have the same problem about now. I have a main window on C/Win32 with many edit controls in the form below. Note that those buttons only work on my Main app window...

hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "1",
            WS_GROUP | WS_VISIBLE | ES_NUMBER | ES_RIGHT,
            180, 94, 28, 20, hwnd, (HMENU)IDC_ATTRIBUTE_FITNESS, GetModuleHandle(NULL), NULL);

and I would like to move from one to another using the tab key. As you can imagine I can't and I have tried whatever I could. I have tried using any combination WS_EX_CLIENTEDGE and WS_GROUP but nothing worked. Every time I press Tab key while in one of my edit controls I hear the 'beep' tone from Windows. Anyone can provide insightful information about that or maybe a little tutorial or demonstration online to get hold of it? Thanks in advance.

Was it helpful?

Solution

Give your controls the WS_TABSTOP style and then use IsDialogMessage in your message loop. Also see Raymond Chen's "Using the TAB key to navigate in non-dialogs" article for some more details and for sample code.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top