Site icon Learn C++

Modern Windows “Hello World” 3D Example in C++ Builder

If you are a beginner “Hello World” examples are good to understand feature of that programming language. It is good to understand how to edit text, how to write in its format, how to compile and link, how to debug and execute, how to deploy or release.

This example below is a modern “Hello World” example on Windows which runs with C++ Builder. Modern applications has GUI and they should be compatible with other operating systems (Windows, MacOS, iOS, Android). In C++ Builder FireMonkey projects are Multi Device (multi-platform) applications that you can compile and run on Windows, MacOS, iOS and Android .

“Hello World” 3D example in C++ with ViewPort3D

ViewPort3D component is good to display 3D images, easy to rotate, move or animate
Open C++ Builder or RAD Studio IDE
– Create a new MultiDevice Application in C++ Builder from File menu
– Save all units and project files with “HelloWorld_” prefix in a HelloWorld folder.
– Add ViewPort3D by dragging on to Form and a Text3D inside this ViewPort3D.
– Go to Properties of Text3D from the left side Object Inspector and find set Width 20, set WordWrap unchecked and find Text property, change it to “Hello World”
– Add a Button at the bottom of ViewPort3D

– Double click to Button to create OnClick event, inside that Button1Click event write lines as below

[crayon-662c65d3281f2046888127/]

– Run project by hitting F9 or click to Run with Debugging
– If there is error, please check your lines
– If all is fine then save all project
– if you check your header file you will see all your objects (Memo, Button etc. ) are automatically defined as below. You don’t need to change anything here

[crayon-662c65d3281fb523692759/]
Exit mobile version