Click to See Complete Forum and Search --> : how can I program a toolbar icon to popup a dialog box
Danielle Harvey
May 22nd, 1999, 09:34 AM
How can I program an icon to popup a dialog box? I don't even know where the "icon code" is?
I can easily create an icon, but I don't know where to program it?
Any response anyone can give me will be greatly appreciated.
pherweg
May 24th, 1999, 01:54 PM
Hi Danielle,
your icon has an ID. If you enter the Class Wizard select the ID of your
icon in the left listbox. In the right listbox select "COMMAND". Now you
are able to add a function to your icon.
If you want to popup a dialog, first of all open the ResourceView tab and
add a new dialog (and design it). When you enter the Class Wizard create
a new class for it. If you have an instance of your class you can pop it
up in the function you added to your icon.
For example: (very simplified)
CMyDialog d;
d.doModal();
Good luck !
Peter
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.