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)

Open in new window

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

Thx in advanced,
Who is Participating?

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

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.

I don't know the exact answer but reading the LOADPICTURE() VFP help (from 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:

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

From novice to tech pro — start learning today.