Click here to Skip to main content
15,920,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
georgiek5011-Dec-03 5:50
georgiek5011-Dec-03 5:50 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
J.B.11-Dec-03 15:26
J.B.11-Dec-03 15:26 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
georgiek5011-Dec-03 16:17
georgiek5011-Dec-03 16:17 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
J.B.11-Dec-03 16:39
J.B.11-Dec-03 16:39 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
georgiek5011-Dec-03 18:33
georgiek5011-Dec-03 18:33 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
J.B.12-Dec-03 16:39
J.B.12-Dec-03 16:39 
GeneralRe: Parent and child dialog, GetWindowRect() Pin
J.B.12-Dec-03 17:18
J.B.12-Dec-03 17:18 
GeneralProper way to process messages to modeless dialogs Pin
georgiek5011-Dec-03 5:22
georgiek5011-Dec-03 5:22 
I have run into a situation that has me a bit confused. I have a dialog in my app which has a tab control in it, and each different tab has a modeless dialog in it. I am trying to get keyboard functionality for the modeless dialogs (eg. using TAB to switch between button controls) but with no success. I have declared a global HWND hDlgModeless and put it into my main message loop like so:
while (GetMessage (&msg, NULL, 0, 0))
{
    if ( hDlgModeless == NULL || !IsDialogMessage(hDlgModeless, &msg) )
    {
	if ( !TranslateAccelerator(hwnd, hAccel, &msg) )
	{
		TranslateMessage(&msg) ;
		DispatchMessage(&msg) ;
	}
    }
}

return msg.wParam;


I create each modeless dialog from within the WM_INITDIALOG of the modal dialog (which has the tab control) setting the parent window to be the modal dialog and a common dialog procedure for all the modeless dialogs. When I process TCN_SELCHANGE I just set hDlgModeless to equal the current modeless dialog the user has selected from the tab. Everything works great except for keyboard functionality. Is my approach in dealing with messages or in general, the setup completely wrong?
GeneralUpper case Pin
Anonymous11-Dec-03 5:17
Anonymous11-Dec-03 5:17 
GeneralRe: Upper case Pin
valikac11-Dec-03 6:04
valikac11-Dec-03 6:04 
GeneralRe: Upper case Pin
Anonymous11-Dec-03 6:46
Anonymous11-Dec-03 6:46 
GeneralRe: Upper case Pin
Joe Woodbury11-Dec-03 6:59
professionalJoe Woodbury11-Dec-03 6:59 
GeneralSend virtual Ctrl-Alt-Del Pin
Albert Jann11-Dec-03 5:07
Albert Jann11-Dec-03 5:07 
GeneralRe: Send virtual Ctrl-Alt-Del Pin
David Crow11-Dec-03 7:31
David Crow11-Dec-03 7:31 
GeneralRe: Send virtual Ctrl-Alt-Del. I already found the answer Pin
Albert Jann11-Dec-03 9:09
Albert Jann11-Dec-03 9:09 
GeneralSending paste message to another application Pin
MB_OK11-Dec-03 3:49
MB_OK11-Dec-03 3:49 
GeneralRe: Sending paste message to another application Pin
MB_OK11-Dec-03 20:30
MB_OK11-Dec-03 20:30 
GeneralRe: Sending paste message to another application Pin
MB_OK11-Dec-03 20:32
MB_OK11-Dec-03 20:32 
GeneralCTreeCtrl weird problem Pin
rpadrela11-Dec-03 3:43
rpadrela11-Dec-03 3:43 
GeneralRe: CTreeCtrl weird problem Pin
Andrew Komiagin11-Dec-03 4:50
Andrew Komiagin11-Dec-03 4:50 
GeneralRe: CTreeCtrl weird problem Pin
rpadrela11-Dec-03 5:04
rpadrela11-Dec-03 5:04 
GeneralIterate through all the controls on CFormView Pin
Abebe11-Dec-03 2:44
Abebe11-Dec-03 2:44 
GeneralRe: Iterate through all the controls on CFormView Pin
jmkhael11-Dec-03 2:55
jmkhael11-Dec-03 2:55 
GeneralRe: Iterate through all the controls on CFormView Pin
Prakash Nadar11-Dec-03 2:57
Prakash Nadar11-Dec-03 2:57 
GeneralRe: Iterate through all the controls on CFormView Pin
Abebe11-Dec-03 3:36
Abebe11-Dec-03 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.