Adding functionality to controls on a GUI

This is a discussion on Adding functionality to controls on a GUI within the C++ Programming forums, part of the General Programming Boards category; I am brand new to Visual C++ programming. I started reading a book and the tutorials available here, and started ...

  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Toronto, Canada
    Posts
    257

    Adding functionality to controls on a GUI

    I am brand new to Visual C++ programming. I started reading a book and the tutorials available here, and started playing with come code.

    I've created a Button on a GUI in a dialog based project. Separatly I've written a console application that does something. Now, I took that code and pasted it in the event description of that Button.
    The original code uses a header file I've made. I've included it in the .cpp sourse for the GUI, but the compiler says that there is no such file or directory.
    Here's are some sections of the code to see where I put stuff:
    Code:
    // Initial GUI.cpp : Defines the class behaviors for the application.
    //
    
    #include "stdafx.h"
    #include "Initial GUI.h"
    #include "Initial GUIDlg.h"
    #include <BAFParse.h>
    
    #ifdef _DEBUG
    #define new DEBUG_NEW
    #undef THIS_FILE
    static char THIS_FILE[] = __FILE__;
    #endif
    
    /////////////////////////////////////////////////////////////////////////////
    // CInitialGUIApp
    
    BEGIN_MESSAGE_MAP(CInitialGUIApp, CWinApp)
    	//{{AFX_MSG_MAP(CInitialGUIApp
    Code:
    void CInitialGUIDlg::OnOpenFile() 
    {
    
       FILE *inp;
       int SpaceLeftU, NameLengthU, SpaceLeftP;
       char **Units, **Params;
    ................................

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Hi,

    There's a "windows programming forum" here, which is what you are doing, and in the future, you may want to try posting your windows programming questions there.

    The original code uses a header file I've made. I've included it in the .cpp sourse for the GUI
    ..but did you insert the header file in your project?

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Maybe the Multiple Source File FAQ will help.

  4. #4
    Registered User
    Join Date
    May 2005
    Location
    Toronto, Canada
    Posts
    257
    Thanks, I'll check out the other forum. and I did add the header file to the project.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Dynamic adding of Controls
    By WDT in forum C# Programming
    Replies: 5
    Last Post: 04-22-2009, 07:59 AM
  2. Dynamically adding method to created controls
    By earth_angel in forum Windows Programming
    Replies: 4
    Last Post: 06-26-2005, 07:11 PM
  3. Adding functionality to controls on a GUI
    By earth_angel in forum Windows Programming
    Replies: 3
    Last Post: 06-19-2005, 09:31 PM
  4. confused about adding controls to main window
    By terracota in forum Windows Programming
    Replies: 4
    Last Post: 11-24-2004, 11:35 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

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