Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 0:39
Boder Coder24-Nov-05 0:39 
GeneralRe: Multiple application.exe Pin
Rage24-Nov-05 1:22
professionalRage24-Nov-05 1:22 
GeneralRe: Multiple application.exe Pin
Jagadeesh VN24-Nov-05 1:24
Jagadeesh VN24-Nov-05 1:24 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:24
Boder Coder24-Nov-05 2:24 
GeneralRe: Multiple application.exe Pin
toxcct24-Nov-05 2:42
toxcct24-Nov-05 2:42 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:55
Boder Coder24-Nov-05 2:55 
GeneralRe: Multiple application.exe Pin
Boder Coder24-Nov-05 2:58
Boder Coder24-Nov-05 2:58 
GeneralRe: Multiple application.exe Pin
Blake Miller28-Nov-05 12:58
Blake Miller28-Nov-05 12:58 
This is not working for your dialog-based application because at the time you call
PreviousInstanceRunning() you do not have a valid window handle for your application.
I suggest you find a mechanism to plug the window handle of your dialog, during OnInitDialog, into the hMainWnd member of the CWindowInstance class. Then it will probably work for you.

Because inside the ActivatePreviousInstance is the call like this:

HWND hWindow = pInstanceData->hMainWnd;<br />
if (hWindow)

And if you understood the code and had single stepped through it, you would find that this handle is probably always NULL (0) and the IsWindow call will fail every time.
QuestionParallel Programming Pin
Gordon Robert Speirs23-Nov-05 23:09
professionalGordon Robert Speirs23-Nov-05 23:09 
Questionproject encryption Pin
pankaj_cout23-Nov-05 23:00
pankaj_cout23-Nov-05 23:00 
AnswerRe: project encryption Pin
toxcct23-Nov-05 23:06
toxcct23-Nov-05 23:06 
QuestionDestruction in C++ Pin
ita_cas23-Nov-05 22:28
ita_cas23-Nov-05 22:28 
AnswerRe: Destruction in C++ Pin
toxcct23-Nov-05 22:32
toxcct23-Nov-05 22:32 
AnswerRe: Destruction in C++ Pin
khan++23-Nov-05 22:35
khan++23-Nov-05 22:35 
AnswerRe: Destruction in C++ Pin
Owner drawn24-Nov-05 0:04
Owner drawn24-Nov-05 0:04 
AnswerRe: Destruction in C++ Pin
Gary R. Wheeler25-Nov-05 3:50
Gary R. Wheeler25-Nov-05 3:50 
QuestionHow do I close another program from my program Pin
shortwave23-Nov-05 22:15
shortwave23-Nov-05 22:15 
AnswerRe: How do I close another program from my program Pin
toxcct23-Nov-05 22:20
toxcct23-Nov-05 22:20 
GeneralRe: How do I close another program from my program Pin
ThatsAlok23-Nov-05 22:40
ThatsAlok23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
Cool Ju23-Nov-05 22:40
Cool Ju23-Nov-05 22:40 
AnswerRe: How do I close another program from my program Pin
sanket.patel25-Nov-05 23:04
sanket.patel25-Nov-05 23:04 
Questionunsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:05
Cedric Moonen23-Nov-05 22:05 
AnswerRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:12
toxcct23-Nov-05 22:12 
GeneralRe: unsigned 64 bits ? Pin
Cedric Moonen23-Nov-05 22:25
Cedric Moonen23-Nov-05 22:25 
GeneralRe: unsigned 64 bits ? Pin
toxcct23-Nov-05 22:29
toxcct23-Nov-05 22:29 

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.