Click here to Skip to main content
15,917,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Posting string using postmessage() function Pin
Jun Du18-Sep-06 8:06
Jun Du18-Sep-06 8:06 
GeneralRe: Posting string using postmessage() function Pin
ThatsAlok18-Sep-06 18:48
ThatsAlok18-Sep-06 18:48 
GeneralRe: Posting string using postmessage() function Pin
Jun Du19-Sep-06 15:58
Jun Du19-Sep-06 15:58 
QuestionRe: Posting string using postmessage() function Pin
priyank_ldce20-Sep-06 1:25
priyank_ldce20-Sep-06 1:25 
QuestionPosting string using postmessage() function Pin
priyank_ldce19-Sep-06 1:27
priyank_ldce19-Sep-06 1:27 
QuestionWMI performance counters Pin
Jim Crafton18-Sep-06 4:54
Jim Crafton18-Sep-06 4:54 
QuestionSingle instance Pin
Waldermort18-Sep-06 4:41
Waldermort18-Sep-06 4:41 
AnswerRe: Single instance Pin
_AnsHUMAN_ 18-Sep-06 4:52
_AnsHUMAN_ 18-Sep-06 4:52 
There could be various solutions to this problem.
Preferrably using mutex's .
something like
HANDLE hMutex;
hMutex = CreateMutex(
NULL, // no security attributes
FALSE, // initially not owned
"SomeUniqueName"); // name of mutex
If this exists already return from the application.

Another option would be to use a shared variable and check for its value. Increment it each time an instance is created. If the value is greater than one you can just return from the second instance.

The third option would be to use the FindWindow function. You would get the handle to the window if it's already running.

Somethings seem HARD to do, until we know how to do them.
Wink | ;-) _AnShUmAn_

GeneralRe: Single instance Pin
Waldermort18-Sep-06 4:57
Waldermort18-Sep-06 4:57 
GeneralRe: Single instance Pin
ThatsAlok18-Sep-06 5:05
ThatsAlok18-Sep-06 5:05 
GeneralRe: Single instance Pin
Waldermort18-Sep-06 5:35
Waldermort18-Sep-06 5:35 
GeneralRe: Single instance Pin
toxcct18-Sep-06 5:12
toxcct18-Sep-06 5:12 
AnswerRe: Single instance Pin
led mike18-Sep-06 5:27
led mike18-Sep-06 5:27 
AnswerRe: Single instance Pin
Lambry18-Sep-06 6:27
Lambry18-Sep-06 6:27 
GeneralRe: Single instance Pin
ThatsAlok18-Sep-06 18:12
ThatsAlok18-Sep-06 18:12 
GeneralRe: Single instance Pin
Lambry19-Sep-06 0:08
Lambry19-Sep-06 0:08 
GeneralRe: Single instance Pin
ThatsAlok19-Sep-06 0:48
ThatsAlok19-Sep-06 0:48 
GeneralRe: Single instance Pin
Lambry19-Sep-06 4:06
Lambry19-Sep-06 4:06 
GeneralRe: Single instance Pin
ThatsAlok19-Sep-06 19:07
ThatsAlok19-Sep-06 19:07 
QuestionProblem with Doc /View Pin
ramanand_bulusu18-Sep-06 4:24
ramanand_bulusu18-Sep-06 4:24 
AnswerRe: Problem with Doc /View Pin
Zac Howland18-Sep-06 4:45
Zac Howland18-Sep-06 4:45 
AnswerRe: Problem with Doc /View Pin
ThatsAlok18-Sep-06 5:06
ThatsAlok18-Sep-06 5:06 
GeneralRe: Problem with Doc /View Pin
tanvon malik18-Sep-06 7:24
tanvon malik18-Sep-06 7:24 
GeneralRe: Problem with Doc /View Pin
ThatsAlok18-Sep-06 18:11
ThatsAlok18-Sep-06 18:11 
GeneralRe: Problem with Doc /View Pin
tanvon malik19-Sep-06 1:21
tanvon malik19-Sep-06 1:21 

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.