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

C / C++ / MFC

 
GeneralRe: How can find all image files in MyComputer? Pin
theCPkid19-Sep-09 5:43
theCPkid19-Sep-09 5:43 
GeneralRe: How can find all image files in MyComputer? Pin
Chris Losinger19-Sep-09 6:13
professionalChris Losinger19-Sep-09 6:13 
GeneralRe: How can find all image files in MyComputer? Pin
raghava.thummapudi19-Sep-09 7:18
raghava.thummapudi19-Sep-09 7:18 
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 
Thanks,

It's returning NULL in pMainWnd ...
If this is the case I have get the main window handle...

HANDLE hMutex;	
hMutex = CreateMutex(NULL,TRUE,TEXT("vision client"));  	
if(hMutex == INVALID_HANDLE_VALUE)
{
	AfxMessageBox("Unable to create Mutex");
}	
else
{	
	if(GetLastError()==ERROR_ALREADY_EXISTS)	
	{	
	     AfxMessageBox("Application is already Opened !!!");	
	     _exit(0);	
        }	
}


The above code will ristrict the application to open mutliple instances.And it gives the message like "Application is already Opened !!!" . and closes the second instance[_exit(0)].
Instead of giving message I have to activate (maximize)the application if user clicks again on the application icon.
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 
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 

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.