Archived

This topic is now archived and is closed to further replies.

WilyCoder

re: visual c++ design with .net 2003

Recommended Posts

WilyCoder    100
Is it possible to manipulate the look of a window using c++ like you can by using c# ? (ie drag and drop to create buttons, combo boxes, etc)...

Share this post


Link to post
Share on other sites
TangentZ    450
Yep. Just create a new C++ .NET project and you can design
Windows Forms like you do in C#, VB.NET or J#.

The generated code is put in the header (Form1.h). Very
strange.

Also, the C++ EXE is about 72 KB versus 16 KB for a C# EXE,
with an empty form. Don''t know why.



Kami no Itte ga ore ni zettai naru!

Share this post


Link to post
Share on other sites
quote:
Original post by tangentz
Also, the C++ EXE is about 72 KB versus 16 KB for a C# EXE,
with an empty form. Don''t know why.



The MC++ compiler likes to put extra stuff in there, and it also aligns it differently, IIRC.

If you want to edit a Win32 window, you can use the dialog editor.

Share this post


Link to post
Share on other sites
ChaoticCanuck    358
C# generates smaller binary executables because it actually is an intermediate language that loads and executes within a virual machine (similar to how Java works)

This is why the binaries appear to be smaller, but bear in mind that to execute your applications a user will require the .NET redistributable which is ~23 MB iirc.

[edited by - ChaoticCanuck on January 25, 2004 5:53:58 PM]

Share this post


Link to post
Share on other sites
Imperil    100
quote:
Original post by ChaoticCanuck
C# generates smaller binary executables because it actually is an intermediate language that loads and executes within a virual machine (similar to how Java works)

This is why the binaries appear to be smaller, but bear in mind that to execute your applications a user will require the .NET redistributable which is ~23 MB iirc.

[edited by - ChaoticCanuck on January 25, 2004 5:53:58 PM]



Utterly wrong rofl B-)

How many stupid people are there that visit this forum?

C# does NOT load and execute within a virtual machine. When you compile in C# it is compiled to MSIL code. The first time you run this new .exe it gets COMPILED INTO NATIVE CODE by the JIT compiler.

It has nothing at all to do with a Virtual Machine, it is just that there is a good majority of stupid people visiting these forums lately giving people misinformation.


ALSO

The poster should notice that the way they were talking about adding components to the forms is using MANAGED C++.. which works in THE EXACT SAME WAY as C#. It is compiled into MSIL code and JITed on first run.

Managed C++ ALSO requires the .NET framework in order to run.

You really should get a clue before spitting garbage out, someone might actually believe your BS =]

[edited by - Imperil on January 25, 2004 6:00:46 PM]

Share this post


Link to post
Share on other sites
ChaoticCanuck    358
I stand corrected on C# as it relates to JIT vs running in a VM. Unfortunately I trusted the source I read which explained that C# uses a virtual machine, and will be writing the author of the tutorial a nasty email when I get back to the office tomorrow

The C++ file is still larger because of the methods used to link in the .NET packages; it is not an issue of Microsoft sticking more things in while you aren''t looking, it is an issue of the way the different access the libraries and functionality of the .NET framework.

Share this post


Link to post
Share on other sites