Click here to Skip to main content
15,914,481 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to start another application and run it within another application Pin
Muhammad Azam4-Oct-04 21:44
Muhammad Azam4-Oct-04 21:44 
GeneralRe: How to start another application and run it within another application Pin
Kiran Satish5-Oct-04 14:11
Kiran Satish5-Oct-04 14:11 
GeneralRe: How to start another application and run it within another application Pin
Muhammad Azam5-Oct-04 20:24
Muhammad Azam5-Oct-04 20:24 
GeneralExitProcess Pin
elephantstar28-Sep-04 12:58
elephantstar28-Sep-04 12:58 
GeneralRe: ExitProcess Pin
Antti Keskinen28-Sep-04 18:01
Antti Keskinen28-Sep-04 18:01 
GeneralRe: ExitProcess Pin
elephantstar29-Sep-04 7:23
elephantstar29-Sep-04 7:23 
GeneralInvalid CTempWnd problem Pin
PJ Arends28-Sep-04 12:57
professionalPJ Arends28-Sep-04 12:57 
GeneralRe: Invalid CTempWnd problem Pin
Antti Keskinen28-Sep-04 18:08
Antti Keskinen28-Sep-04 18:08 
The answer is inside the CPropertyPage. This class is derived from CDialog and onwards from CWnd. This inheritance chain will allow access to the GetDlgItem function. Using this function can return a pointer to the requested dialog control's CWnd parent class.

As you are coding the property page, you also have access to the ID specified to the MFCGrid. Thus, you can use GetDlgItem to obtain the CWnd-pointer and call CWnd::SetFocus to set the input focus to the grid. All this should be done only if the handle to the old window is no longer valid (in place of GetParent()->SetFocus()).

Does this solve it ?

-Antti Keskinen

----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
GeneralRe: Invalid CTempWnd problem Pin
PJ Arends29-Sep-04 6:21
professionalPJ Arends29-Sep-04 6:21 
GeneralRe: Invalid CTempWnd problem Pin
Antti Keskinen29-Sep-04 6:40
Antti Keskinen29-Sep-04 6:40 
GeneralDatabase replication - network and island Pin
Ted Christiansen28-Sep-04 11:56
Ted Christiansen28-Sep-04 11:56 
GeneralRe: Database replication - network and island Pin
ssanoj29-Sep-04 9:59
ssanoj29-Sep-04 9:59 
GeneralSetForegroundWindow fails Pin
Neville Franks28-Sep-04 11:47
Neville Franks28-Sep-04 11:47 
GeneralRe: SetForegroundWindow fails Pin
vcplusplus28-Sep-04 12:14
vcplusplus28-Sep-04 12:14 
GeneralRe: SetForegroundWindow fails Pin
vcplusplus28-Sep-04 12:30
vcplusplus28-Sep-04 12:30 
GeneralRe: SetForegroundWindow fails Pin
Neville Franks28-Sep-04 13:07
Neville Franks28-Sep-04 13:07 
GeneralRe: SetForegroundWindow fails Pin
Neville Franks28-Sep-04 13:42
Neville Franks28-Sep-04 13:42 
GeneralRe: SetForegroundWindow fails Pin
Scott H. Settlemier28-Sep-04 14:46
Scott H. Settlemier28-Sep-04 14:46 
GeneralRe: SetForegroundWindow fails Pin
Neville Franks28-Sep-04 15:15
Neville Franks28-Sep-04 15:15 
GeneralRe: SetForegroundWindow fails Pin
Phil J Pearson29-Sep-04 3:49
Phil J Pearson29-Sep-04 3:49 
GeneralRe: SetForegroundWindow fails Pin
Neville Franks29-Sep-04 10:34
Neville Franks29-Sep-04 10:34 
GeneralRe: SetForegroundWindow fails Pin
Phil J Pearson29-Sep-04 10:53
Phil J Pearson29-Sep-04 10:53 
GeneralRe: SetForegroundWindow fails Pin
Neville Franks29-Sep-04 11:04
Neville Franks29-Sep-04 11:04 
GeneralRe: SetForegroundWindow fails Pin
Phil J Pearson30-Sep-04 7:10
Phil J Pearson30-Sep-04 7:10 
GeneralChange style of window owned by another app in 98? Works in XP. Pin
Alex Gibbs28-Sep-04 8:42
Alex Gibbs28-Sep-04 8:42 

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.