FoxPro - Use windows icons in a ImageList ActiveX (MSComCtlLib.ImageListCtrl.2)

Hello Experts,

I have a foxpro code using the COM object "MSComctlLib.TreeCtrl.2" together with "MSComCtlLib.ImageListCtrl.2".
The code is working fine.

I have this:
			.AddObject('imglst1', 'olecontrol', 'MSComCtlLib.ImageListCtrl.2')
			WITH .imglst1
				.ImageHeight = 16
				.ImageWidth = 16
				&& .MaskColor = RGB(192,192,192)
				.ListImages.Add(,"Etiqueta",LoadPicture("c:\11.gif"))
				.ListImages.Add(,"Estrela",LoadPicture("c:\31.gif"))
		  ENDWITH

Open in new window

Instead of LoadPicture("c:\31.gif"), can i load the windows system icons?

Thx in advanced,
Miguel
LVL 1
justaphaseAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

pcelbaCommented:
I don't know the exact answer but reading the LOADPICTURE() VFP help (from http://vfpx.codeplex.com/) it could be possible. You just have to find the way how to obtain OLE ID of the Windows icon and propagate it to your OLE control...

I would go the way of disk files which is easier to handle. You can create such files from Windows DLL, e.g. from imageres.dll if license allows it. Following code can help: http://www.codeproject.com/Articles/32617/Extracting-Icons-from-EXE-DLL-and-Icon-Manipulatio

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FoxPro

From novice to tech pro — start learning today.