Click here to Skip to main content
15,909,030 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Detecting Internet connection Pin
bob1697211-Feb-06 5:26
bob1697211-Feb-06 5:26 
GeneralRe: Detecting Internet connection Pin
Healdp11-Feb-06 5:45
Healdp11-Feb-06 5:45 
GeneralRe: Detecting Internet connection Pin
bob1697211-Feb-06 6:13
bob1697211-Feb-06 6:13 
GeneralRe: Detecting Internet connection Pin
Sunil P V7-Mar-07 19:35
Sunil P V7-Mar-07 19:35 
AnswerRe: Detecting Internet connection Pin
PJ Arends11-Feb-06 6:10
professionalPJ Arends11-Feb-06 6:10 
AnswerRe: Detecting Internet connection Pin
Ravi Bhavnani11-Feb-06 7:01
professionalRavi Bhavnani11-Feb-06 7:01 
AnswerRe: Detecting Internet connection Pin
Nish Nishant11-Feb-06 7:53
sitebuilderNish Nishant11-Feb-06 7:53 
QuestionAdd .lib library to Visual C++ project? Pin
Nick_Kisialiou11-Feb-06 0:05
Nick_Kisialiou11-Feb-06 0:05 
AnswerRe: Add .lib library to Visual C++ project? Pin
Stephen Hewitt11-Feb-06 0:15
Stephen Hewitt11-Feb-06 0:15 
GeneralRe: Add .lib library to Visual C++ project? Pin
Nick_Kisialiou11-Feb-06 10:00
Nick_Kisialiou11-Feb-06 10:00 
QuestionC++ persistence framework Pin
eusto10-Feb-06 23:43
eusto10-Feb-06 23:43 
AnswerRe: C++ persistence framework Pin
Stephen Hewitt11-Feb-06 0:19
Stephen Hewitt11-Feb-06 0:19 
AnswerRe: C++ persistence framework Pin
Kevin McFarlane11-Feb-06 1:18
Kevin McFarlane11-Feb-06 1:18 
AnswerRe: C++ persistence framework Pin
Ravi Bhavnani11-Feb-06 7:02
professionalRavi Bhavnani11-Feb-06 7:02 
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 

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.