Welcome to Dream.In.Code
Become a C++ Expert!

Join 149,556 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,599 people online right now. Registration is fast and FREE... Join Now!




how to use *.exe

 
Closed TopicStart new topic

how to use *.exe

doubts
25 Nov, 2007 - 08:57 PM
Post #1

New D.I.C Head
*

Joined: 1 Nov, 2007
Posts: 17


My Contributions
hi all... i've used the following coding for the program... now i want to use *.exe so that i can get the window for which ever .exe function i typed::

CODE
void CDay2Dlg::OnRunpgm()
{
    // TODO: Add your control notification handler code here
    ///////////////////////
     // MY CODE STARTS HERE
     ///////////////////////

     // Get the current values from the screen
     UpdateData(TRUE);

     // Declare a local variable for holding the program name
     CString strPgmName;

     // Copy the program name to the local variable
     strPgmName = m_strProgToRun;

   // Make the program name all uppercase
    strPgmName.MakeUpper();

     // Did the user select to run the Paint program?
    if (strPgmName == "PAINT")
         WinExec("mspaint.exe", SW_SHOW);

    
  if (strPgmName == "NOTEPAD")
         WinExec("notepad.exe", SW_SHOW);

    
     if (strPgmName == "SOLITAIRE")
         WinExec("sol.exe", SW_SHOW);


    
}

User is offlineProfile CardPM
+Quote Post

Jayman
RE: How To Use *.exe
26 Nov, 2007 - 12:16 AM
Post #2

Student of Life
Group Icon

Joined: 26 Dec, 2005
Posts: 7,306



Thanked: 66 times
Dream Kudos: 500
Expert In: Everything

My Contributions
Please discontinue creating duplicate topics. Refer to the original topic for responses to your question.

http://www.dreamincode.net/forums/index.ph...c=37984&hl=

Topic closed.
User is online!Profile CardPM
+Quote Post

Closed TopicStart new topic
Time is now: 1/7/09 09:57PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month