CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1
  1. #1
    Join Date
    Apr 2008
    Posts
    214

    C++ WINAPI - Class Objects

    Could someone give an example or at least tell me what its called when you use the controls name as the class object like vb .net does, for e.g. lblControl.size

    I'm try to retrieve the info for the controls without enumerating through all the controls, if possible.

    I have a class set up right now in the following format

    Code:
    class gui{
       //gui functions/variables to create the window
    
       class control{
          create(variables);
          RECT rect;
          const char *name, *classe, *data;
       }
    }

    EDIT: So I drank some coffee to wake myself up and it hit me....DUH.....vb .net when creating the controls it automatically inserts the object instance in the designer,
    allowing the program to then use the object instance name, lblControl, throughout the whole program. But, since I am not creating a designer, I decided to create a map in the gui class mapping the control id to the control class. Don't know if it works yet, but sounds good in theory I suppose.
    Last edited by zaryk; August 18th, 2010 at 04:03 AM.

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