Click here to Skip to main content
15,917,645 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: About IOCTL_DISK_VERIFY Pin
David Crow8-Jul-03 3:16
David Crow8-Jul-03 3:16 
GeneralRe: About IOCTL_DISK_VERIFY Pin
FlyingDancer8-Jul-03 3:34
FlyingDancer8-Jul-03 3:34 
GeneralRe: About IOCTL_DISK_VERIFY Pin
FlyingDancer8-Jul-03 3:41
FlyingDancer8-Jul-03 3:41 
GeneralRe: About IOCTL_DISK_VERIFY Pin
David Crow8-Jul-03 4:47
David Crow8-Jul-03 4:47 
GeneralWant to get an ActiveX control for displaying picture Pin
Xilin7-Jul-03 18:20
Xilin7-Jul-03 18:20 
QuestionDirectShow ...How do i overlay a bitmap pic over a video source? Pin
Member 4048137-Jul-03 17:36
Member 4048137-Jul-03 17:36 
AnswerRe: DirectShow ...How do i overlay a bitmap pic over a video source? Pin
Andrew Walker7-Jul-03 19:27
Andrew Walker7-Jul-03 19:27 
GeneralManipulating Systray icons Pin
haritadala7-Jul-03 14:15
haritadala7-Jul-03 14:15 
Hello all

I'm writing an application which puts an icon in the systray. I want to code this application in such a way that whenever processing is done at the back the icon needs to be changed indicating some activity. Initially I'm putting the icon in systray using following code

NOTIFYICONDATA tnd;//declared as member variable

tnd.cbSize= sizeof(NOTIFYICONDATA);
tnd.hWnd = m_hWnd;
tnd.uID = IDR_TRAYICON_OFF;
tnd.uFlags= NIF_MESSAGE|NIF_ICON;
tnd.uCallbackMessage = WM_TRAY_ICON_NOTIFY_MESSAGE;
VERIFY( tnd.hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE (IDR_TRAYICON_OFF)) );
tnd.uFlags= NIF_MESSAGE|NIF_ICON|NIF_TIP;
lstrcpyn(tnd.szTip, (LPCTSTR)sTip, sizeof(tnd.szTip)/sizeof(tnd.szTip[0]));
Shell_NotifyIcon(NIM_ADD, &tnd);

After whenever I want to change the icon I'm using the following code

if(tnd.uID==IDR_TRAYICON_ON)
{
tnd.uID=IDR_TRAYICON_OFF;
VERIFY( tnd.hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE (IDR_TRAYICON_OFF)));
Shell_NotifyIcon(NIM_MODIFY,&tnd);
}
else
{
tnd.uID=IDR_TRAYICON_ON;
VERIFY( tnd.hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE (IDR_TRAYICON_ON)));
Shell_NotifyIcon(NIM_MODIFY,&tnd);
}

But I'm not getting the results as expected. The Icon is not changing, Can any one help me in this.

thanks for your help
Hari.


GeneralRe: Manipulating Systray icons Pin
Ryan Binns7-Jul-03 15:45
Ryan Binns7-Jul-03 15:45 
Generalsaving and loading application settings Pin
crapfacejoe7-Jul-03 12:44
crapfacejoe7-Jul-03 12:44 
GeneralRe: saving and loading application settings Pin
valikac7-Jul-03 12:54
valikac7-Jul-03 12:54 
GeneralRe: saving and loading application settings Pin
John R. Shaw7-Jul-03 13:12
John R. Shaw7-Jul-03 13:12 
GeneralRe: saving and loading application settings Pin
John M. Drescher7-Jul-03 13:31
John M. Drescher7-Jul-03 13:31 
Generalgetting the value of an int in a cpp file into another Pin
keegan7-Jul-03 9:51
keegan7-Jul-03 9:51 
GeneralRe: getting the value of an int in a cpp file into another Pin
Navin7-Jul-03 9:59
Navin7-Jul-03 9:59 
GeneralRe: getting the value of an int in a cpp file into another Pin
keegan7-Jul-03 10:11
keegan7-Jul-03 10:11 
GeneralRe: getting the value of an int in a cpp file into another Pin
John R. Shaw7-Jul-03 10:05
John R. Shaw7-Jul-03 10:05 
GeneralRe: getting the value of an int in a cpp file into another Pin
keegan7-Jul-03 10:16
keegan7-Jul-03 10:16 
GeneralRe: getting the value of an int in a cpp file into another Pin
John R. Shaw7-Jul-03 10:41
John R. Shaw7-Jul-03 10:41 
GeneralRe: Simpler answer Pin
John R. Shaw7-Jul-03 10:59
John R. Shaw7-Jul-03 10:59 
GeneralRe: getting the value of an int in a cpp file into another Pin
Michael Dunn7-Jul-03 17:19
sitebuilderMichael Dunn7-Jul-03 17:19 
GeneralRe: getting the value of an int in a cpp file into another Pin
Terry O'Nolley10-Jul-03 9:13
Terry O'Nolley10-Jul-03 9:13 
Questionhow to know if the VB function is part of COM object? Pin
mr20037-Jul-03 9:47
mr20037-Jul-03 9:47 
Generalfirewall project Pin
ub817-Jul-03 9:10
ub817-Jul-03 9:10 
GeneralRe: firewall project Pin
Dave Kreskowiak7-Jul-03 9:12
mveDave Kreskowiak7-Jul-03 9:12 

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.