Click here to Skip to main content
15,890,897 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Linux commands Pin
markkuk15-May-10 12:17
markkuk15-May-10 12:17 
GeneralRe: Linux commands Pin
TTPadmin15-May-10 12:29
TTPadmin15-May-10 12:29 
GeneralRe: Linux commands Pin
CPallini15-May-10 12:39
mveCPallini15-May-10 12:39 
AnswerRe: Linux commands Pin
Paul M Watt15-May-10 20:24
mentorPaul M Watt15-May-10 20:24 
GeneralRe: Linux commands Pin
TTPadmin17-May-10 12:12
TTPadmin17-May-10 12:12 
GeneralRe: Linux commands Pin
TTPadmin19-May-10 12:19
TTPadmin19-May-10 12:19 
QuestionInteracting with a 3rd party application dialog window Pin
Still learning how to code15-May-10 11:55
Still learning how to code15-May-10 11:55 
AnswerRe: Interacting with a 3rd party application dialog window Pin
Paul M Watt15-May-10 20:37
mentorPaul M Watt15-May-10 20:37 
You can use the call GetWindow, and use the GW_CHILD flag to start out with. Then test for the type of class of that window with a call to GetClassName. You are looking for the "EDIT" class. When you find a window whose class matches that criteria, you will have the handle to the Edit control.

After testing each handle, if you have not found the correct window, then call for the next child window of the dialog, using the child window handle from the previous call to GetWindow, and this time use the GW_HWNDNEXT flag.

Ex.

HINSTANCE hInst;
HWND hDlg;
TCHAR className[_MAX_PATH];
...
HWND hChildWnd = ::GetWindow(hDlg, GW_CHILD);
while (hChildWnd != NULL)
{
WNDCLASS wndClass;
::GetClassInfo(hChildWnd, className, sizeof(className));
if (0 == ::_tcscmp(className, _T("EDIT"))
{
// This is the window handle that you want.
// Record the window handle here or do your special processing.
...
break;
}

hChildWnd = ::GetWindow(hChildWnd, GW_HWNDNEXT);
}


If there are more than one edit controls on the dialog things get a bit trickier.

You should look at the tool Spy++ that came with Visual Studio, it will allow you to peek at all of the important data regarding the windows, its class type, id etc.
GeneralRe: Interacting with a 3rd party application dialog window - ANSWERED ! Pin
Still learning how to code15-May-10 21:28
Still learning how to code15-May-10 21:28 
Questionfunction doesn't reply Pin
hasani200715-May-10 9:51
hasani200715-May-10 9:51 
AnswerRe: function doesn't reply PinPopular
Code-o-mat15-May-10 10:14
Code-o-mat15-May-10 10:14 
AnswerRe: function doesn't reply Pin
Dr.Walt Fair, PE15-May-10 10:28
professionalDr.Walt Fair, PE15-May-10 10:28 
AnswerRe: function doesn't reply Pin
Software_Developer15-May-10 10:37
Software_Developer15-May-10 10:37 
GeneralRe: function doesn't reply Pin
Member 392263917-May-10 2:36
Member 392263917-May-10 2:36 
GeneralRe: Thanks Pin
Software_Developer17-May-10 5:13
Software_Developer17-May-10 5:13 
AnswerRe: function doesn't reply Pin
loyal ginger15-May-10 10:43
loyal ginger15-May-10 10:43 
QuestionButton behavior - single button multiple behaviour Pin
Software_Developer15-May-10 7:57
Software_Developer15-May-10 7:57 
QuestionWritePrivateProfileString to write Ini file problem Pin
Shivanand Gupta15-May-10 6:52
Shivanand Gupta15-May-10 6:52 
AnswerRe: WritePrivateProfileString to write Ini file problem Pin
norish15-May-10 8:32
norish15-May-10 8:32 
GeneralRe: WritePrivateProfileString to write Ini file problem Pin
Shivanand Gupta16-May-10 20:57
Shivanand Gupta16-May-10 20:57 
Questionhow hook the registry Pin
Natural_Demon15-May-10 4:27
Natural_Demon15-May-10 4:27 
AnswerRe: how hook the registry Pin
Software_Developer15-May-10 5:49
Software_Developer15-May-10 5:49 
AnswerRe: how hook the registry Pin
Code-o-mat15-May-10 5:51
Code-o-mat15-May-10 5:51 
GeneralRe: how hook the registry Pin
Natural_Demon15-May-10 9:51
Natural_Demon15-May-10 9:51 
GeneralRe: how hook the registry Pin
Code-o-mat15-May-10 10:00
Code-o-mat15-May-10 10:00 

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.