Click here to Skip to main content
15,911,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Static maps, visual studio and memory leaks Pin
«_Superman_»21-Oct-09 13:09
professional«_Superman_»21-Oct-09 13:09 
GeneralRe: Static maps, visual studio and memory leaks Pin
Draemstars22-Oct-09 0:25
Draemstars22-Oct-09 0:25 
GeneralRe: Static maps, visual studio and memory leaks Pin
«_Superman_»22-Oct-09 5:36
professional«_Superman_»22-Oct-09 5:36 
GeneralRe: Static maps, visual studio and memory leaks Pin
Draemstars22-Oct-09 13:19
Draemstars22-Oct-09 13:19 
GeneralRe: Static maps, visual studio and memory leaks Pin
«_Superman_»22-Oct-09 13:33
professional«_Superman_»22-Oct-09 13:33 
GeneralRe: Static maps, visual studio and memory leaks Pin
Chuck O'Toole22-Oct-09 14:16
Chuck O'Toole22-Oct-09 14:16 
GeneralRe: Static maps, visual studio and memory leaks Pin
Draemstars22-Oct-09 23:57
Draemstars22-Oct-09 23:57 
QuestionFindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 8:31
Ismaele.Jr21-Oct-09 8:31 
I !
My problem is that : i don't succeed to write on the "Edit" control of a child dialogbox (i wish i want to write on the "Edit" control conteined in the dialogbox "type of character", accessible by the 'notepad.exe' main menu), because (with my code) the clipboard write her content on the 'main window' (and not where i
expect).

The code :
---------------------------------------------------------------------------
#include <condefs.h>;
#include <windows.h>;
#include <stdio.h>;


int main(int argc, char **argv)
{
HANDLE parentWindow, childWindow;

parentWindow=FindWindow(NULL, "Notepad");

if (parentWindow == NULL) { //notepad.exe doesn't running
printf("Notepad is NOT running !\n");
system("PAUSE");
return(0);
}
childWindow=FindWindowEx(parentWindow, NULL, "Edit", NULL);
if (childWindow == NULL) {
printf("I don't know the handle of 'Edit' control !\n");
system("PAUSE");
return(1);
}
SendMessage(childWindow, WM_PASTE, 0, 0); //i write the clipboard in the Edit control
system("PAUSE");
return(0);
}
------------------------------------------------------

I'm too sure that i mess up with the parameters of 'FindWindowEx' function, but where? If you haven't patience or competence to help me, can you suggest me some very good paper (include example in C) about the 'FindWindowEx' function? (or similar functions used to navigate trough 'handle' and external 'window')

I'm using 'Borland C++ 3' IDE, and i'm a very very newbie on C programming under Windows ! Smile | :)

Very tnx to all the helper,
Ismaele-junior
QuestionRe: FindWindowEx, 'handle' and notepad.exe Pin
David Crow21-Oct-09 8:54
David Crow21-Oct-09 8:54 
AnswerRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 9:23
Ismaele.Jr21-Oct-09 9:23 
QuestionRe: FindWindowEx, 'handle' and notepad.exe Pin
David Crow21-Oct-09 9:29
David Crow21-Oct-09 9:29 
AnswerRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 9:55
Ismaele.Jr21-Oct-09 9:55 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
«_Superman_»21-Oct-09 11:11
professional«_Superman_»21-Oct-09 11:11 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 11:26
Ismaele.Jr21-Oct-09 11:26 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
«_Superman_»21-Oct-09 11:43
professional«_Superman_»21-Oct-09 11:43 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 21:09
Ismaele.Jr21-Oct-09 21:09 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
«_Superman_»21-Oct-09 21:25
professional«_Superman_»21-Oct-09 21:25 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
j4v14-Sep-10 14:31
j4v14-Sep-10 14:31 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
David Crow21-Oct-09 16:58
David Crow21-Oct-09 16:58 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr1-Dec-09 0:42
Ismaele.Jr1-Dec-09 0:42 
QuestionRe: FindWindowEx, 'handle' and notepad.exe Pin
Randor 21-Oct-09 11:44
professional Randor 21-Oct-09 11:44 
AnswerRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr22-Oct-09 7:08
Ismaele.Jr22-Oct-09 7:08 
AnswerRe: FindWindowEx, 'handle' and notepad.exe Pin
Adam Roderick J21-Oct-09 18:37
Adam Roderick J21-Oct-09 18:37 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
Ismaele.Jr21-Oct-09 21:13
Ismaele.Jr21-Oct-09 21:13 
GeneralRe: FindWindowEx, 'handle' and notepad.exe Pin
Adam Roderick J22-Oct-09 0:32
Adam Roderick J22-Oct-09 0: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.