Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi , Expert

in SysLink Class and use some Hypelink Text dwItemSpec From NMCUSTOMDRAW Structure Only Return Zero , i wand to SetTextColor For Each Item in Sys Tray , i can't find any document in MSDN To read and Help me , if somebody have a experience about it plz give me some code but convert to vb or vba or link how to color each item in sys tray

Excuse me Experts i am using vba so my code is in language

What I have tried:

'debug.print nmcd.dwItemSpec only return zero instead of i index of item (hyperlink text)
CopyMemory nmcd,ByVal lParam,LenB(nmcd)
if nmcd.dwuItemState=0 Then
SetTextColor nmcd.hdc,vbred
End if
Posted
Updated 5-Feb-22 4:31am

1 solution

I'm not the only one who is getting fed up with your inability to work out what we need to know in order to help you: in this case as Dave has said VBA does not have a CopyMemory function so just repeating the code that calls it with no idea what what it does of what the memory you are passing it might be helps noone.

So, let's talk about questions in the hope that you realize why we can't fix your code for you ...

Imagine this: you own a car garage, and the phone rings.
You answer it, say "Member 11803607 Garage, how can we help you?"
The voice at the other end says "my car broke" and the line goes dead.
You check the last call number and try to call it back, but all you get is "this number is not available".
What are you going to do? Will you:

1) Select exactly the right part and tools to fix that specific make, model, and year of car; and the specific problem that prevents it going any further, then drive directly to where the customer is waiting to fix the car?
2) Pack up every part for every car ever made, every tool and mechanic in the garage into a fleet of trucks, then hire a spotter plane to try to locate a broken down car, drive there and see if it's the guy who rang? If it isn't, your flotilla of trucks laden with tools, parts, and bodies drives on to the next one?
3) Shrug and get back to what you were doing?

Select one.

Imagine this: you go for a drive in the country, but you have a problem with the car. You call the garage, say "it broke" and turn off your phone. How long will you be waiting before the garage arrives with the right bits and tools to fix the car given they don't know what make or model it is, who you are, what happened when it all went wrong, or even where you are?

That's what you've done here. So stop typing as little as possible and try explaining things to people who have no way to access your project!

This is not a good question - we cannot work out from that little what you are trying to do. Remember that we can't see your screen, access your HDD, or read your mind - we only get exactly what you type to work with - we get no other context for your project.

So when you ask a question, think about what the other person needs to know:
Ring, ring:
"Hi, it's Member 11802607, and my 2007 Ford Escort 1300GL has got a flat tyre. I'm in the layby on the B7065 road just south of the junction with the A432"

Now, the garage knows the important details:
Who you are.
Where you are.
What make, model, and year of car is involved.
What the fault is.
And they can get a van with a new tyre out to you quickly.

We are in the same position: we have no idea what your code looks like, and no way to find out. And after 17 questions you damn well should know that by now!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900