Click here to Skip to main content
15,922,166 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generali need the gurushelp-image processing Pin
satadru17-Dec-03 21:32
satadru17-Dec-03 21:32 
GeneralRe: i need the gurushelp-image processing Pin
Monty217-Dec-03 21:39
Monty217-Dec-03 21:39 
GeneralRe: i need the gurushelp-image processing Pin
satadru17-Dec-03 23:37
satadru17-Dec-03 23:37 
GeneralRe: i need the gurushelp-image processing Pin
Monty218-Dec-03 0:25
Monty218-Dec-03 0:25 
GeneralSetFocus, "Enter" key and child dialogs Pin
J.B.17-Dec-03 21:18
J.B.17-Dec-03 21:18 
GeneralRe: SetFocus, "Enter" key and child dialogs Pin
tiaozi18-Dec-03 2:27
tiaozi18-Dec-03 2:27 
GeneralRe: SetFocus, "Enter" key and child dialogs Pin
J.B.18-Dec-03 5:20
J.B.18-Dec-03 5:20 
GeneralRe: SetFocus, "Enter" key and child dialogs Pin
J.B.18-Dec-03 6:02
J.B.18-Dec-03 6:02 
Thanks tiaozi,

with your help (the code), I can correctly catch the Enter key press(VK_RETURN) and tell if it's caught by the parent dialog or the embedded child chialog. Now I realise when the app was initially load, the key press is always caught by the parent, although a button in the child dialog has been highlighted (here I'd think so the focus is set to the child dialog?).

Do you know how I can correctly set the focus to child dialog when the app is loaded? I've tried two different ways, none of them seem to work.

One is to place pChildDlg->SetFocus() in the parent class' OnInitDialog(). pChildDlg is the pointer to the child dialog that is showing.

Two is to place SetFocus() in the child class' OnShowWindow(), whether to the child itself (thus this->SetFocus();) or a control (in my case, to a CButton). Here as I mentioned earlier, when I SetFocus() to the CButton, I can see the button is highlighted as the app window is initially loaded. But when I hit "Enter" key, this input message is still caught by the parent? Confused | :confused:
GeneralRe: SetFocus, "Enter" key and child dialogs Pin
J.B.18-Dec-03 6:25
J.B.18-Dec-03 6:25 
GeneralVC++ Method Pin
Ming Yan17-Dec-03 21:04
Ming Yan17-Dec-03 21:04 
GeneralRe: VC++ Method Pin
Abebe17-Dec-03 21:37
Abebe17-Dec-03 21:37 
GeneralRe: VC++ Method Pin
Ming Yan17-Dec-03 21:40
Ming Yan17-Dec-03 21:40 
GeneralRe: VC++ Method Pin
Balkrishna Talele18-Dec-03 0:03
Balkrishna Talele18-Dec-03 0:03 
GeneralRe: VC++ Method Pin
Rowan Seymour18-Dec-03 0:04
Rowan Seymour18-Dec-03 0:04 
GeneralRe: VC++ Method Pin
Vikash Dubey18-Dec-03 0:06
Vikash Dubey18-Dec-03 0:06 
GeneralProblem With LibTiff Pin
Sumit Kapoor17-Dec-03 20:59
Sumit Kapoor17-Dec-03 20:59 
GeneralBeginner question... Pin
Lord Tor17-Dec-03 17:40
Lord Tor17-Dec-03 17:40 
GeneralRe: Beginner question... Pin
Prakash Nadar17-Dec-03 19:25
Prakash Nadar17-Dec-03 19:25 
GeneralRe: Beginner question... Pin
Joe Woodbury18-Dec-03 5:28
professionalJoe Woodbury18-Dec-03 5:28 
Generaldesigning pci driver using C++ Pin
nmelah17-Dec-03 16:55
nmelah17-Dec-03 16:55 
GeneralRe: designing pci driver using C++ Pin
John M. Drescher17-Dec-03 17:07
John M. Drescher17-Dec-03 17:07 
GeneralRe: designing pci driver using C++ Pin
Kannan Ramanathan17-Dec-03 17:15
Kannan Ramanathan17-Dec-03 17:15 
GeneralRe: designing pci driver using C++ Pin
Anthony_Yio17-Dec-03 17:21
Anthony_Yio17-Dec-03 17:21 
GeneralTreeCtrl Navigating all items programatically Pin
Vikash Dubey17-Dec-03 16:52
Vikash Dubey17-Dec-03 16:52 
GeneralRe: TreeCtrl Navigating all items programatically Pin
Michael Dunn17-Dec-03 17:32
sitebuilderMichael Dunn17-Dec-03 17:32 

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.