CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    327

    how can I program a toolbar icon to popup a dialog box

    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.


  2. #2
    Join Date
    May 1999
    Location
    Germany
    Posts
    106

    Re: how can I program a toolbar icon to popup a dialog box

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured