Click here to Skip to main content
15,891,431 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to activating already running application Pin
ranjithgoud18-Sep-09 23:16
ranjithgoud18-Sep-09 23:16 
AnswerRe: How to activating already running application Pin
Code-o-mat18-Sep-09 23:40
Code-o-mat18-Sep-09 23:40 
GeneralRe: How to activating already running application Pin
ranjithgoud19-Sep-09 0:06
ranjithgoud19-Sep-09 0:06 
GeneralRe: How to activating already running application Pin
theCPkid19-Sep-09 0:22
theCPkid19-Sep-09 0:22 
GeneralRe: How to activating already running application Pin
ranjithgoud19-Sep-09 0:40
ranjithgoud19-Sep-09 0:40 
GeneralRe: How to activating already running application Pin
theCPkid19-Sep-09 0:50
theCPkid19-Sep-09 0:50 
GeneralRe: How to activating already running application Pin
ranjithgoud19-Sep-09 1:03
ranjithgoud19-Sep-09 1:03 
GeneralRe: How to activating already running application [modified] Pin
theCPkid19-Sep-09 1:09
theCPkid19-Sep-09 1:09 
haha.. so that is the problem.
how about using FindWindow() function? Inside the MainFrame::OnCreate, give a name to your window using SetWindowText and then you can use FindWindow to find the window that matches the name you gave earlier. that is one of the ways.

SetWindowText("My magic window");

If mutex already exists,
HWND hWnd = FindWindow(NULL, "My magic window")
if(hWnd && ::IsIconic(hWnd))
//maximize or restore it
//bring it to top or set it as foreground window

modified on Saturday, September 19, 2009 7:17 AM

GeneralRe: How to activating already running application Pin
Code-o-mat19-Sep-09 2:38
Code-o-mat19-Sep-09 2:38 
GeneralRe: How to activating already running application Pin
ranjithgoud19-Sep-09 1:07
ranjithgoud19-Sep-09 1:07 
GeneralRe: How to activating already running application Pin
Stuart Dootson19-Sep-09 21:56
professionalStuart Dootson19-Sep-09 21:56 
QuestionRedistributing dependent dlls Pin
Jerinanand18-Sep-09 19:59
Jerinanand18-Sep-09 19:59 
AnswerRe: Redistributing dependent dlls Pin
Hristo-Bojilov19-Sep-09 9:29
Hristo-Bojilov19-Sep-09 9:29 
QuestionODBC which function can write value into data base Pin
Rafix11118-Sep-09 11:03
Rafix11118-Sep-09 11:03 
QuestionHow to add Items to Windows start menu? Pin
includeh1018-Sep-09 10:01
includeh1018-Sep-09 10:01 
AnswerRe: How to add Items to Windows start menu? Pin
Stuart Dootson18-Sep-09 12:51
professionalStuart Dootson18-Sep-09 12:51 
QuestionMessage Removed Pin
18-Sep-09 5:02
professionalN_tro_P18-Sep-09 5:02 
AnswerRe: CUDA Anyone? Pin
zhao,kaiyong24-Sep-09 9:02
zhao,kaiyong24-Sep-09 9:02 
AnswerRe: CUDA Anyone? Pin
johnthomaswarner19-Feb-10 10:26
johnthomaswarner19-Feb-10 10:26 
QuestionHow to get rid of warning message from Microsoft code Pin
transoft18-Sep-09 4:57
transoft18-Sep-09 4:57 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Richard MacCutchan18-Sep-09 5:21
mveRichard MacCutchan18-Sep-09 5:21 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Michael Dunn18-Sep-09 8:38
sitebuilderMichael Dunn18-Sep-09 8:38 
AnswerRe: How to get rid of warning message from Microsoft code Pin
Richard MacCutchan18-Sep-09 22:17
mveRichard MacCutchan18-Sep-09 22:17 
Questionsome questions about "reference to pointer" Pin
lhyblue18-Sep-09 3:57
lhyblue18-Sep-09 3:57 
AnswerRe: some questions about "reference to pointer" [modified] Pin
«_Superman_»18-Sep-09 4:08
professional«_Superman_»18-Sep-09 4: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.