Click here to Skip to main content
15,899,026 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDoes this work? Pin
Daniel Strigl9-Dec-02 23:01
Daniel Strigl9-Dec-02 23:01 
GeneralQe. regarding NM_RETURN in CTreeView Pin
alex_the_guy9-Dec-02 22:18
alex_the_guy9-Dec-02 22:18 
GeneralBitmaps Pin
SatyaDY9-Dec-02 21:58
SatyaDY9-Dec-02 21:58 
GeneralRe: Bitmaps Pin
Christian Graus9-Dec-02 22:01
protectorChristian Graus9-Dec-02 22:01 
GeneralRe: Bitmaps Pin
Kannan Kalyanaraman9-Dec-02 23:29
Kannan Kalyanaraman9-Dec-02 23:29 
GeneralRe: Bitmaps Pin
Scott H. Settlemier10-Dec-02 7:08
Scott H. Settlemier10-Dec-02 7:08 
GeneralDr Watson problems with vc++ Pin
Aviv Halperin9-Dec-02 21:40
Aviv Halperin9-Dec-02 21:40 
GeneralBringing a window to the top Pin
Rage9-Dec-02 21:25
professionalRage9-Dec-02 21:25 
Hello !

So, his follows a question I asked yesterday : I need to run a prg which the first it is run time will open excel, and the next times it is called it will bring the excel window on the top and give it the focus.

The first part is ok. The second part does not work. Here is my code :
HWND hWnd;
hWnd = ::FindWindow("XLMain",  // Check if Excel is open and get the hWnd to it
	NULL                   
	);

if (hWnd!=NULL)
{
	::BringWindowToTop(hWnd);		
	::ShowWindow(hWnd,SW_SHOW);
}
else ... 


I've actually tested BringWindowToTop,ShowWindow,SetWindowPos,SetWindowPlacement,MoveWindow but none of these functions are working Cry | :(( ... so pls help me before i get Mad | :mad: with it.

Thanks


~RaGE();
GeneralRe: Bringing a window to the top Pin
Shog99-Dec-02 21:59
sitebuilderShog99-Dec-02 21:59 
GeneralRe: Bringing a window to the top Pin
Rage9-Dec-02 22:16
professionalRage9-Dec-02 22:16 
GeneralRe: Bringing a window to the top Pin
Christian Graus9-Dec-02 22:00
protectorChristian Graus9-Dec-02 22:00 
GeneralRe: Bringing a window to the top Pin
Rage9-Dec-02 22:17
professionalRage9-Dec-02 22:17 
GeneralCOleControl problem Pin
hdi99kf@syd.kth.se9-Dec-02 21:22
hdi99kf@syd.kth.se9-Dec-02 21:22 
GeneralNon Printing Characters Pin
John Bosko9-Dec-02 21:21
John Bosko9-Dec-02 21:21 
GeneralRe: Non Printing Characters Pin
Dominik Reichl9-Dec-02 22:47
Dominik Reichl9-Dec-02 22:47 
GeneralRe: Non Printing Characters Pin
John Bosko9-Dec-02 23:09
John Bosko9-Dec-02 23:09 
GeneralRe: Non Printing Characters Pin
jhwurmbach9-Dec-02 23:23
jhwurmbach9-Dec-02 23:23 
GeneralRe: Non Printing Characters Pin
jhwurmbach9-Dec-02 23:29
jhwurmbach9-Dec-02 23:29 
GeneralRe: Non Printing Characters Pin
Dominik Reichl10-Dec-02 2:33
Dominik Reichl10-Dec-02 2:33 
GeneralRe: Non Printing Characters Pin
John Bosko10-Dec-02 18:36
John Bosko10-Dec-02 18:36 
GeneralRe: Non Printing Characters Pin
John Bosko10-Dec-02 18:47
John Bosko10-Dec-02 18:47 
QuestionRuntime Error?? Pin
MVH9-Dec-02 20:48
MVH9-Dec-02 20:48 
AnswerRe: Runtime Error?? Pin
KarstenK9-Dec-02 21:29
mveKarstenK9-Dec-02 21:29 
QuestionHow to get the caller of a fuction? Pin
Lizp9-Dec-02 20:31
Lizp9-Dec-02 20:31 
AnswerRe: How to get the caller of a fuction? Pin
MVH9-Dec-02 21:08
MVH9-Dec-02 21:08 

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.