Buttons

This is a discussion on Buttons within the Windows Programming forums, part of the Platform Specific Boards category; Ok I made a project using MFC so I can make my dialog, then I make a button I want ...

  1. #1
    Unregistered
    Guest

    Post Buttons

    Ok I made a project using MFC so I can make my dialog, then I make a button I want to make it so when I push that button I want it to lunch a programn how would I do this.

  2. #2
    Registered User
    Join Date
    Feb 2002
    Posts
    591
    CYourClass m_dYourDialog;

    if(DoModal(m_dDialog))
    {
    //Do fun thingswith return value
    }

    CYourClass is the class that the classwizard ask you to create when you been adding the dialog to your project.

  3. #3
    Unregistered
    Guest

    Post

    I don't think you understood what I'm asking I whant to make it so when I press the button it lunches a .EXE program for example if I edit the button this is what I get

    Code:
    void CExp1Dlg::OnLunch() 
    {
    What do I do here?
    }

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    Use ShellExecute() Win32 API function.

    http://msdn.microsoft.com/library/de...ellexecute.asp

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 04-09-2009, 03:31 AM
  2. Ownerdraw buttons (2)
    By maes in forum Windows Programming
    Replies: 7
    Last Post: 09-11-2003, 06:50 AM
  3. Radio Buttons in Visual C++ 6
    By Ripper1 in forum Windows Programming
    Replies: 22
    Last Post: 05-16-2003, 08:54 AM
  4. (Ken Fitlike) buttons
    By jdinger in forum C++ Programming
    Replies: 4
    Last Post: 03-15-2002, 01:21 PM
  5. Grouping radio buttons
    By Bazz in forum Windows Programming
    Replies: 1
    Last Post: 08-28-2001, 08:15 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21