Click here to Skip to main content
15,907,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: Manipulating Systray icons Pin
Ryan Binns7-Jul-03 15:45
Ryan Binns7-Jul-03 15:45 
tnd.uID simply identifies which icon the program is wanting to deal with - it's not the icon resource identifier. I just usually set it to 0 for the first icon, 1 for the second etc. To modify the icon, you have to specify the ID of the current icon so that the tray knows which one you are talking about. Once you add the icon, you can't change the ID. Do something like this:
NOTIFYICONDATA tnd;//declared as member variable

tnd.cbSize= sizeof(NOTIFYICONDATA);
tnd.hWnd = m_hWnd;
tnd.uID = 0; // 0 for the first icon
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);
nCurrentIcon = IDR_TRAYICON_OFF; // To show which icon is displaying
And to change it...
if(nCurrentIcon==IDR_TRAYICON_ON)
   nCurrentIcon = IDR_TRAYICON_OFF;
else
   nCurrentIcon = IDR_TRAYICON_ON;
VERIFY( tnd.hIcon = LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE (nCurrentIcon)));
Shell_NotifyIcon(NIM_MODIFY,&tnd);
Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

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 
GeneralRe: firewall project Pin
basementman7-Jul-03 15:56
basementman7-Jul-03 15: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.