Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt25-Mar-15 4:46
professionalJochen Arndt25-Mar-15 4:46 
GeneralMessage Closed Pin
25-Mar-15 6:47
Member 935023725-Mar-15 6:47 
GeneralRe: Writing Vector object into a .txt file Pin
Jochen Arndt25-Mar-15 6:56
professionalJochen Arndt25-Mar-15 6:56 
QuestionBIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus16-Mar-15 11:24
Tacitonitus16-Mar-15 11:24 
AnswerRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C16-Mar-15 13:00
Frankie-C16-Mar-15 13:00 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus16-Mar-15 15:36
Tacitonitus16-Mar-15 15:36 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C16-Mar-15 22:39
Frankie-C16-Mar-15 22:39 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus17-Mar-15 3:34
Tacitonitus17-Mar-15 3:34 
Thanks very much Frankie-C, that information is (I hope) fairly indicative of what I've been suspecting (actually dreading) about this whole fiasco since shortly after it began..

And that is that I don't think the 64-bit Shell_NotifyIcon() works.. like, at all..

That's the only logical explanation that I can think of for what I'm seeing (and what you're saying)..

So this is good; this is progress..

Fortunately, the manifest resource issue that you mentioned is easily rectified. Just add the following #pragma in your StdAfx.h:
C++
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' "\
"version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")

Then set the following option in your Project Property Page:

Linker ==> Manifest File ==> Generate Manifest ==> Yes (/MANIFEST)

and voila! No need to create a manifest resource.. Assuming, of course, that you're using some reasonably recent version of Microsoft Visual Studio..

Of course, as you may have already surmised, I'm telling you this in the hope that you'll try compiling your code in 64-bit, and apprise me of the results that you get..

If my suspicions are correct, your code, like mine, won't work in 64-bit..

If I'm wrong about that, then that would be almost as good (actually better in the long term). Then I'll just take your code verbatim, and start adding in bits of my other stuff until it fails. In my experience, bugs are rooted out far more easily when you're adding to code that works, as opposed to attempting to subtract from code that doesn't..

But I kinda need to know that the 64-bit Shell_NotifyIcon() works for someone, *anyone*, before I go down that (very long) road.. Because at this point, I don't think it will..

Anyway, thanks again for your help. I see that you're still insisting on a static NID as opposed to a static NID pointer.. Well, six of one, half dozen the other - you know. The reason I made it a pointer (and yes, in my own code, it's still a pointer) is because the whole System Tray thing is an End-User option, so why allocate memory that might never be used? And because making it a pointer allows it to double as a kind of boolean - if it's not NULL, it means that all steps of the initialization succeeded, and if it is NULL, then don't use it at all.. Kind of an all-or-nothing approach..

And last and least, I think we both know that that silly "Opning" variable doesn't need to be in either your code or mine. To be sure, it still serves a purpose in my original code, but I left it in here (this forum) only out of respect for the narrative - it is completely superfluous..

Anyway, I'm being far too verbose - it's late; too much coffee.. Need to..
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 4:11
Frankie-C17-Mar-15 4:11 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Tacitonitus17-Mar-15 7:21
Tacitonitus17-Mar-15 7:21 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 7:29
Frankie-C17-Mar-15 7:29 
GeneralRe: BIG trouble with 64-bit Shell_NotifyIcon() - can anyone help? Pin
Frankie-C17-Mar-15 22:48
Frankie-C17-Mar-15 22:48 
QuestionVC++ DLL throws error when call it from C#[EntryPointNotFound] Pin
Member 988367216-Mar-15 1:38
Member 988367216-Mar-15 1:38 
AnswerRe: VC++ DLL throws error when call it from C#[EntryPointNotFound] Pin
Richard Andrew x6416-Mar-15 5:48
professionalRichard Andrew x6416-Mar-15 5:48 
QuestionIAccessible - get word under mouse pointer in IE Pin
Fourblack15-Mar-15 22:01
Fourblack15-Mar-15 22:01 
QuestionC++ to C problem Pin
alexx00614-Mar-15 10:03
alexx00614-Mar-15 10:03 
AnswerRe: C++ to C problem Pin
Richard Andrew x6414-Mar-15 13:15
professionalRichard Andrew x6414-Mar-15 13:15 
AnswerRe: C++ to C problem Pin
Frankie-C15-Mar-15 5:49
Frankie-C15-Mar-15 5:49 
GeneralRe: C++ to C problem Pin
David Crow16-Mar-15 2:54
David Crow16-Mar-15 2:54 
QuestionUI widget Pin
Member 1152499814-Mar-15 7:01
Member 1152499814-Mar-15 7:01 
AnswerRe: UI widget Pin
Albert Holguin15-Mar-15 17:19
professionalAlbert Holguin15-Mar-15 17:19 
QuestionUI widget Pin
Member 1152499814-Mar-15 6:52
Member 1152499814-Mar-15 6:52 
QuestionFeatures and rich documentation of MFC vs Small Executable of WTL Pin
Member 1120327711-Mar-15 4:21
Member 1120327711-Mar-15 4:21 
AnswerRe: Features and rich documentation of MFC vs Small Executable of WTL Pin
jeron111-Mar-15 5:53
jeron111-Mar-15 5:53 
AnswerRe: Features and rich documentation of MFC vs Small Executable of WTL Pin
Eddy Vluggen11-Mar-15 6:28
professionalEddy Vluggen11-Mar-15 6:28 

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.