Click here to Skip to main content
15,919,341 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: read string Pin
David Crow18-Sep-06 4:00
David Crow18-Sep-06 4:00 
AnswerRe: read string Pin
zizzzz18-Sep-06 4:32
zizzzz18-Sep-06 4:32 
AnswerRe: read string Pin
ThatsAlok18-Sep-06 5:07
ThatsAlok18-Sep-06 5:07 
Question.:Restoring Window Problem:. Pin
Programm3r18-Sep-06 3:30
Programm3r18-Sep-06 3:30 
AnswerRe: .:Restoring Window Problem:. Pin
toxcct18-Sep-06 3:34
toxcct18-Sep-06 3:34 
AnswerRe: .:Restoring Window Problem:. Pin
_AnsHUMAN_ 18-Sep-06 3:37
_AnsHUMAN_ 18-Sep-06 3:37 
GeneralRe: .:Restoring Window Problem:. Pin
Programm3r18-Sep-06 3:46
Programm3r18-Sep-06 3:46 
GeneralRe: .:Restoring Window Problem:. Pin
_AnsHUMAN_ 18-Sep-06 3:52
_AnsHUMAN_ 18-Sep-06 3: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: .:Restoring Window Problem:. Pin
toxcct18-Sep-06 3:58
toxcct18-Sep-06 3:58 
GeneralRe: .:Restoring Window Problem:. Pin
_AnsHUMAN_ 18-Sep-06 4:01
_AnsHUMAN_ 18-Sep-06 4:01 
GeneralRe: .:Restoring Window Problem:. Pin
Programm3r18-Sep-06 4:05
Programm3r18-Sep-06 4:05 
QuestionConfused with the resource using Pin
bloodwinner18-Sep-06 2:50
bloodwinner18-Sep-06 2:50 
AnswerRe: Confused with the resource using Pin
Hamid_RT18-Sep-06 3:10
Hamid_RT18-Sep-06 3:10 
GeneralRe: Confused with the resource using Pin
bloodwinner18-Sep-06 3:13
bloodwinner18-Sep-06 3:13 
GeneralRe: Confused with the resource using Pin
toxcct18-Sep-06 3:24
toxcct18-Sep-06 3:24 
GeneralRe: Confused with the resource using Pin
Hamid_RT18-Sep-06 3:31
Hamid_RT18-Sep-06 3:31 
QuestionDrawing radio buttons - text positioning Pin
achimschoen18-Sep-06 2:43
professionalachimschoen18-Sep-06 2:43 
AnswerRe: Drawing radio buttons - text positioning Pin
Hamid_RT18-Sep-06 3:13
Hamid_RT18-Sep-06 3:13 
GeneralRe: Drawing radio buttons - text positioning Pin
achimschoen18-Sep-06 3:37
professionalachimschoen18-Sep-06 3:37 
QuestionYahoo's sign-in seal technology Pin
George_George18-Sep-06 2:29
George_George18-Sep-06 2:29 
QuestionIOCTL Pin
Pratheep Kenny18-Sep-06 2:12
Pratheep Kenny18-Sep-06 2:12 
AnswerRe: IOCTL Pin
James R. Twine19-Sep-06 4:50
James R. Twine19-Sep-06 4:50 
QuestionSetting Color for The button control Pin
Pratheep Kenny18-Sep-06 2:08
Pratheep Kenny18-Sep-06 2:08 
AnswerRe: Setting Color for The button control Pin
Rinu_Raj18-Sep-06 2:16
Rinu_Raj18-Sep-06 2:16 
AnswerRe: Setting Color for The button control Pin
Hamid_RT18-Sep-06 2:28
Hamid_RT18-Sep-06 2:28 

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.