Click here to Skip to main content
15,888,068 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ persistence framework Pin
eusto11-Feb-06 16:51
eusto11-Feb-06 16:51 
QuestionWireless Programming in VC++.NET Pin
Anandoham10-Feb-06 22:57
Anandoham10-Feb-06 22:57 
QuestionIE plugin for printing Pin
mahendra _adake10-Feb-06 21:16
mahendra _adake10-Feb-06 21:16 
QuestionHow to close the child window Pin
Anu_Bala10-Feb-06 20:02
Anu_Bala10-Feb-06 20:02 
AnswerRe: How to close the child window Pin
Michael Dunn11-Feb-06 8:19
sitebuilderMichael Dunn11-Feb-06 8:19 
QuestionHandle to a MFC dialog box window? Pin
jc0dex10-Feb-06 19:26
jc0dex10-Feb-06 19:26 
AnswerRe: Handle to a MFC dialog box window? Pin
Michael Dunn10-Feb-06 19:48
sitebuilderMichael Dunn10-Feb-06 19:48 
AnswerRe: Handle to a MFC dialog box window? Pin
BadKarma10-Feb-06 23:12
BadKarma10-Feb-06 23:12 
Hi,

you can use one of the following 3 methods to retreive the handle of a control

1. insinde the dialog you can get a window object of the control:
CWnd* pWnd = GetDlgItem(IDC_EDIT1);
HWND hWnd = pWnd->GetSafeHwnd();

2. insinde the dialog you can get the handle of the control:
HWND hWnd2 = NULL;
GetDlgItem(IDC_EDIT1, &hWnd2);

3. from anywhere you can get a handle of a control by using:
HWND hWnd3 = ::GetDlgItem(pDlg->GetSafeHwnd(), IDC_EDIT1);


if you need to get a unknown window you'v got to find it using the following code:
HWND hwndThis = ::FindWindow(NULL, _T("DlgTest"));
where _T("DlgTest") is the caption of the window you are looking for



codito ergo sum
GeneralRe: Handle to a MFC dialog box window? Pin
jc0dex11-Feb-06 6:59
jc0dex11-Feb-06 6:59 
GeneralRe: Handle to a MFC dialog box window? Pin
BadKarma11-Feb-06 8:09
BadKarma11-Feb-06 8:09 
GeneralRe: Handle to a MFC dialog box window? Pin
jc0dex11-Feb-06 9:02
jc0dex11-Feb-06 9:02 
GeneralRe: Handle to a MFC dialog box window? Pin
BadKarma11-Feb-06 9:21
BadKarma11-Feb-06 9:21 
GeneralRe: Handle to a MFC dialog box window? Pin
jc0dex12-Feb-06 6:31
jc0dex12-Feb-06 6:31 
Questionproblem in publishing Pin
leenmie10-Feb-06 17:43
leenmie10-Feb-06 17:43 
AnswerRe: problem in publishing Pin
Michael Dunn10-Feb-06 19:17
sitebuilderMichael Dunn10-Feb-06 19:17 
QuestionInterceptApi Pin
GreenLantern10-Feb-06 17:19
GreenLantern10-Feb-06 17:19 
AnswerRe: InterceptApi Pin
GreenLantern14-Feb-06 11:39
GreenLantern14-Feb-06 11:39 
QuestiondirectX? Pin
gr8coaster32910-Feb-06 16:39
gr8coaster32910-Feb-06 16:39 
QuestionHELP ME FOR A GOOD START! Pin
DzungLean10-Feb-06 16:28
DzungLean10-Feb-06 16:28 
AnswerRe: HELP ME FOR A GOOD START! Pin
fearless stallion12-Feb-06 20:47
fearless stallion12-Feb-06 20:47 
QuestionMD2 HELP! Pin
DzungLean10-Feb-06 16:20
DzungLean10-Feb-06 16:20 
QuestionConsole Output Formatting Pin
Brett Peirce10-Feb-06 15:32
Brett Peirce10-Feb-06 15:32 
AnswerRe: Console Output Formatting Pin
EXTEIDE10-Feb-06 16:04
EXTEIDE10-Feb-06 16:04 
QuestionLowLevelKeyboardHook Pin
blue_rabbit10-Feb-06 15:08
blue_rabbit10-Feb-06 15:08 
AnswerRe: LowLevelKeyboardHook Pin
EXTEIDE10-Feb-06 16:16
EXTEIDE10-Feb-06 16:16 

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.