Click here to Skip to main content
16,011,542 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralModeless dialog in Console app Pin
Jonathan de Halleux18-Dec-02 23:17
Jonathan de Halleux18-Dec-02 23:17 
GeneralRe: Modeless dialog in Console app Pin
Rage18-Dec-02 23:20
professionalRage18-Dec-02 23:20 
GeneralRe: Modeless dialog in Console app Pin
Hans Ruck18-Dec-02 23:54
Hans Ruck18-Dec-02 23:54 
GeneralRe: Modeless dialog in Console app Pin
Rage19-Dec-02 0:08
professionalRage19-Dec-02 0:08 
Generalcin and modeless Pin
Jonathan de Halleux19-Dec-02 0:12
Jonathan de Halleux19-Dec-02 0:12 
GeneralRe: cin and modeless Pin
Hans Ruck19-Dec-02 0:59
Hans Ruck19-Dec-02 0:59 
Generaltray icon problem Pin
r i s h a b h s18-Dec-02 23:14
r i s h a b h s18-Dec-02 23:14 
GeneralRe: tray icon problem Pin
Zdenek Navratil19-Dec-02 0:07
Zdenek Navratil19-Dec-02 0:07 
This is what works for me:

#define UWM_ICONNOTIFY WM_APP+x

BEGIN_MESSAGE_MAP(CMyDlg, CDialog)
//...
ON_MESSAGE(UWM_ICONNOTIFY, OnSystemTrayIconNotify)
//...
END_MESSAGE_MAP()

LRESULT CMyDlg::OnSystemTrayIconNotify(WPARAM, LPARAM lParam)
{
switch (lParam)
{
case WM_LBUTTONDBLCLK:
// do something
// etc.
}
return 0;
}

// Initialize system tray icon
//
m_nid.cbSize = sizeof(NOTIFYICONDATA);
m_nid.hWnd = m_hWnd;
m_nid.uID = ID_SYSTEMTRAYICON;
m_nid.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP;
m_nid.uCallbackMessage = UWM_ICONNOTIFY;
m_nid.hIcon = (HICON)LoadImage(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDI_MYTRAYICON), IMAGE_ICON, 16, 16, 0);
strcpy(m_nid.szTip, "Blah, blah");
Shell_NotifyIcon(NIM_ADD, &m_nid);

HTH
Zdenek
GeneralRe: tray icon problem Pin
r i s h a b h s19-Dec-02 0:15
r i s h a b h s19-Dec-02 0:15 
GeneralRe: tray icon problem Pin
Zdenek Navratil19-Dec-02 1:14
Zdenek Navratil19-Dec-02 1:14 
GeneralRe: tray icon problem Pin
Fredrik Skog19-Dec-02 0:12
Fredrik Skog19-Dec-02 0:12 
GeneralRe: tray icon problem Pin
r i s h a b h s19-Dec-02 0:47
r i s h a b h s19-Dec-02 0:47 
GeneralRe: tray icon problem Pin
Fredrik Skog19-Dec-02 0:50
Fredrik Skog19-Dec-02 0:50 
GeneralRe: tray icon problem Pin
r i s h a b h s19-Dec-02 1:22
r i s h a b h s19-Dec-02 1:22 
GeneralRe: tray icon problem Pin
Fredrik Skog19-Dec-02 1:24
Fredrik Skog19-Dec-02 1:24 
QuestionListing network paths? Pin
scy7he18-Dec-02 23:08
scy7he18-Dec-02 23:08 
AnswerRe: Listing network paths? Pin
Andreas Saurwein19-Dec-02 1:22
Andreas Saurwein19-Dec-02 1:22 
QuestionDifferent versions of ODBC drivers accept different parameters (Execute())?? Pin
Wenrich18-Dec-02 22:29
Wenrich18-Dec-02 22:29 
AnswerRe: Different versions of ODBC drivers accept different parameters (Execute())?? Pin
Pavel Klocek18-Dec-02 22:47
Pavel Klocek18-Dec-02 22:47 
GeneralRe: Different versions of ODBC drivers accept different parameters (Execute())?? Pin
Wenrich19-Dec-02 13:42
Wenrich19-Dec-02 13:42 
GeneralRe: Different versions of ODBC drivers accept different parameters (Execute())?? Pin
Pavel Klocek20-Dec-02 0:35
Pavel Klocek20-Dec-02 0:35 
QuestionHandle of a Bitmap Image ? Pin
ArunKGoyal18-Dec-02 22:26
ArunKGoyal18-Dec-02 22:26 
AnswerRe: Handle of a Bitmap Image ? Pin
PDStone18-Dec-02 22:34
PDStone18-Dec-02 22:34 
AnswerRe: Handle of a Bitmap Image ? Pin
Dominik Reichl18-Dec-02 22:39
Dominik Reichl18-Dec-02 22:39 
GeneralRe: Problem with CFileDialog Pin
PDStone18-Dec-02 22:24
PDStone18-Dec-02 22:24 

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.