Re: Question about generated C++ code for forms

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I'm experimenting with the Express editions and I was wondering why the
C++ code for forms is all put into the header files.

Bill,

I believe it's a limitation of the design of the forms designer -
which is based on C# techniques.

Dave

Thanks Dave

I have done a lot of work in Borland C++ Builder and it has the ability
to toggle between the .cpp and the .h file of the same name. It doesn't
seem that VC++ has that feature

There's a facility to go to the corresponding header file, not sure
about the other way around.

although putting everything in the .h
kind of eliminates the need for that.

Not really! :)
It's just a consequence of the WinForms designer being originally
designed for languages other than C++.

Dave
.



Relevant Pages

  • Re: How do I add existing visual Item to a project
    ... Under Header Files we have a file called TestControl.h and if you expand ... So how do I do if I want to add an existing visual control like the ... I found a first solution by hacking the vcproj file with notepad, ... That changes it back to the state where you can edit it with the designer. ...
    (microsoft.public.dotnet.languages.vc)
  • Re: Curious: Why autocreate event code in .h files?
    ... > convention was to keep as much code as possible OUT of the ... > header files. ... you can move the method implementation to a .cpp file ... manually and the designer will not complain about it. ...
    (microsoft.public.vc.ide_general)
  • Re: How can you drop Winforms support?
    ... More about letting people sell add-in tools to support MS's languages than ... effort to kill CodeGear or competition off in the DevTools space. ... is free to build their own CF designer if they choose to do so. ...
    (borland.public.delphi.non-technical)
  • Re: How can you drop Winforms support?
    ... that "MS makes as many mistakes as anyone else. ... All designers but the CF designer work for non-MS .NET languages ... More about letting people sell add-in tools to support MS's languages than ...
    (borland.public.delphi.non-technical)
  • Re: beginner needs advice on Visual Studio
    ... >> Take a look at the Qt toolkit and Qt Designer from ... other C-based languages like java, C, C++, JavaScript, etc... ... I recommend not starting with VB because it's syntax is ...
    (comp.programming)