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

C / C++ / MFC

 
QuestionHow to use CDaoDatabase to open SQL server database? Pin
realtimeforme7-Mar-08 16:08
realtimeforme7-Mar-08 16:08 
AnswerRe: How to use CDaoDatabase to open SQL server database? Pin
ramana.g7-Mar-08 18:05
ramana.g7-Mar-08 18:05 
AnswerRe: How to use CDaoDatabase to open SQL server database? Pin
Hamid_RT9-Mar-08 0:56
Hamid_RT9-Mar-08 0:56 
GeneralGetting handle of hidden window from another process Pin
act_x7-Mar-08 8:30
act_x7-Mar-08 8:30 
GeneralRe: Getting handle of hidden window from another process Pin
Randor 7-Mar-08 8:51
professional Randor 7-Mar-08 8:51 
GeneralRe: Getting handle of hidden window from another process Pin
Rajkumar R8-Mar-08 1:41
Rajkumar R8-Mar-08 1:41 
GeneralIcon in system tray Pin
RoyceF7-Mar-08 8:27
RoyceF7-Mar-08 8:27 
GeneralRe: Icon in system tray Pin
JudyL_MD7-Mar-08 9:29
JudyL_MD7-Mar-08 9:29 
Is there anything on the modeless dialog? I had an interactive service that displayed a tray icon without any problem. The service called the following
CreateEx (0, AfxRegisterWndClass (0), "", WS_POPUP, 0, 0, 10, 10, NULL, 0);

m_notifyIconData.cbSize           = sizeof (NOTIFYICONDATA);
m_notifyIconData.hWnd             = m_hWnd;
m_notifyIconData.uID              = 1;
m_notifyIconData.uFlags           = NIF_ICON | NIF_MESSAGE | NIF_TIP;
m_notifyIconData.uCallbackMessage = WM_APP;
m_notifyIconData.hIcon            = ::LoadIcon (AfxGetResourceHandle (),
                                                MAKEINTRESOURCE (IDI_ICONTRAY));
m_notifyIconData.uVersion         = NOTIFYICON_VERSION;
strcpy_s (m_notifyIconData.szTip, 64, "Service Name");

Shell_NotifyIcon (NIM_ADD, &m_notifyIconData);

where m_hWnd was returned by the CreateEx call.

The service regularly called a message pump on the m_hWnd
MSG msg;

while (PeekMessage (&msg, NULL, 0 ,0, PM_REMOVE))
{
    TranslateMessage (&msg);
    DispatchMessage (&msg);
}


The window procedure for the m_hWnd received WM_ messages so I could process a double click and the right-click.

NOTE - my responsiveness to answer any questions about this will be really bad this weekend since I have lots of time-consuming plans. Good luck

Judy
GeneralRe: Icon in system tray Pin
Mark Salsbery7-Mar-08 13:07
Mark Salsbery7-Mar-08 13:07 
GeneralRe: Icon in system tray Pin
Royce Fickling7-Mar-08 16:09
Royce Fickling7-Mar-08 16:09 
GeneralRe: Icon in system tray Pin
Mark Salsbery8-Mar-08 8:10
Mark Salsbery8-Mar-08 8:10 
GeneralRe: Icon in system tray Pin
Royce Fickling8-Mar-08 13:11
Royce Fickling8-Mar-08 13:11 
GeneralRe: Icon in system tray Pin
Mark Salsbery8-Mar-08 13:23
Mark Salsbery8-Mar-08 13:23 
Generalquestion to the pros: nasty ASSERTION in BOOST Pin
andreas.schaerer7-Mar-08 7:54
andreas.schaerer7-Mar-08 7:54 
GeneralRe: question to the pros: nasty ASSERTION in BOOST Pin
Maxwell Chen7-Mar-08 8:11
Maxwell Chen7-Mar-08 8:11 
GeneralRe: question to the pros: nasty ASSERTION in BOOST Pin
Nemanja Trifunovic7-Mar-08 8:19
Nemanja Trifunovic7-Mar-08 8:19 
Generalavi file on Status bar Pin
ptr_Electron7-Mar-08 3:18
ptr_Electron7-Mar-08 3:18 
GeneralRe: avi file on Status bar Pin
toxcct7-Mar-08 3:38
toxcct7-Mar-08 3:38 
GeneralRe: avi file on Status bar Pin
ptr_Electron7-Mar-08 5:21
ptr_Electron7-Mar-08 5:21 
GeneralRe: avi file on Status bar Pin
super_ttd7-Mar-08 7:02
super_ttd7-Mar-08 7:02 
GeneralRe: avi file on Status bar Pin
led mike7-Mar-08 7:18
led mike7-Mar-08 7:18 
GeneralRe: avi file on Status bar Pin
Randor 7-Mar-08 7:08
professional Randor 7-Mar-08 7:08 
GeneralRe: avi file on Status bar Pin
super_ttd7-Mar-08 7:13
super_ttd7-Mar-08 7:13 
GeneralRe: avi file on Status bar Pin
Randor 7-Mar-08 7:29
professional Randor 7-Mar-08 7:29 
GeneralRe: avi file on Status bar Pin
ptr_Electron10-Mar-08 23:56
ptr_Electron10-Mar-08 23:56 

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.