Click here to Skip to main content
15,892,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unable to control mouse events Pin
«_Superman_»5-Mar-09 0:42
professional«_Superman_»5-Mar-09 0:42 
GeneralRe: Unable to control mouse events Pin
AprNgp5-Mar-09 0:49
AprNgp5-Mar-09 0:49 
GeneralRe: Unable to control mouse events Pin
«_Superman_»5-Mar-09 0:57
professional«_Superman_»5-Mar-09 0:57 
GeneralRe: Unable to control mouse events Pin
Akt_4_U5-Mar-09 0:47
Akt_4_U5-Mar-09 0:47 
QuestionAssertion in atlsimpstr Pin
Davitor4-Mar-09 23:47
Davitor4-Mar-09 23:47 
AnswerRe: Assertion in atlsimpstr Pin
Hamid_RT4-Mar-09 23:59
Hamid_RT4-Mar-09 23:59 
AnswerRe: Assertion in atlsimpstr Pin
Cedric Moonen5-Mar-09 0:06
Cedric Moonen5-Mar-09 0:06 
QuestionProblem in Mutex with System Tray Icon. Pin
Le@rner4-Mar-09 23:25
Le@rner4-Mar-09 23:25 
Hi all,

i Have SDI type application,I m creating a Mutex to avoid multiple instance of application. and use system tray icon feature.

for creating mutex i m using this code:

HANDLE hMutex = ::CreateMutex(NULL, TRUE, _T("GlobalMainMutex"));

switch(::GetLastError())
{
    case ERROR_SUCCESS:
      // Mutex created successfully. There is no instance running
      break;

    case ERROR_ALREADY_EXISTS:

      // Mutex already exists so there is a running instance of our app.
    return FALSE;

    default:
      // Failed to create mutex by unknown reason
     return FALSE;
  }


for system tray icon i m taking help of this article.

http://www.codeproject.com/KB/shell/systemtray.aspx[^]

My problem is that is application is already running and its in hide mode and icon present in system tray,now when i click on my exe than its not open becoz of mutex.

i what when application is already running or its hide than if i click on exe icon than the hide application can show.

please tell me how can i do this.

thanks in advance.

To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.

AnswerRe: Problem in Mutex with System Tray Icon. Pin
Code-o-mat4-Mar-09 23:59
Code-o-mat4-Mar-09 23:59 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Le@rner5-Mar-09 0:14
Le@rner5-Mar-09 0:14 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Code-o-mat5-Mar-09 0:34
Code-o-mat5-Mar-09 0:34 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Le@rner5-Mar-09 1:13
Le@rner5-Mar-09 1:13 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Code-o-mat5-Mar-09 1:22
Code-o-mat5-Mar-09 1:22 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Le@rner7-Aug-09 18:17
Le@rner7-Aug-09 18:17 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Code-o-mat7-Aug-09 21:29
Code-o-mat7-Aug-09 21:29 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Le@rner7-Aug-09 21:49
Le@rner7-Aug-09 21:49 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Code-o-mat7-Aug-09 21:59
Code-o-mat7-Aug-09 21:59 
GeneralRe: Problem in Mutex with System Tray Icon. Pin
Le@rner7-Aug-09 23:04
Le@rner7-Aug-09 23:04 
QuestionProblem sending SMS using EDGE modem Pin
efarook4-Mar-09 22:59
efarook4-Mar-09 22:59 
QuestionHow to override OnOK() and OnESC() in an instance of CDialog? Pin
B_U_A4-Mar-09 22:43
B_U_A4-Mar-09 22:43 
AnswerRe: How to override OnOK() and OnESC() in an instance of CDialog? Pin
Cedric Moonen4-Mar-09 22:47
Cedric Moonen4-Mar-09 22:47 
GeneralRe: How to override OnOK() and OnESC() in an instance of CDialog? Pin
B_U_A4-Mar-09 23:24
B_U_A4-Mar-09 23:24 
GeneralRe: How to override OnOK() and OnESC() in an instance of CDialog? Pin
Hamid_RT4-Mar-09 23:55
Hamid_RT4-Mar-09 23:55 
QuestionHow to receive buffer from a directx based game Pin
kallol kumar4-Mar-09 20:56
kallol kumar4-Mar-09 20:56 
AnswerRe: How to receive buffer from a directx based game [modified] Pin
Code-o-mat4-Mar-09 21:59
Code-o-mat4-Mar-09 21:59 

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.