Scivillage.com Casual Discussion Science Forum

Full Version: Will someone come to my aid? (C++ and apps)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I opened Lazarus for the first time today in an attempt to write the code for my app but found this puzzling gem prewritten into the program...

unit Unit1;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms, Controls, Graphics, Dialogs;

type
  TForm1 = class(TForm)
  private

  public

  end;                 



None of this resembles anything in my C++ Primer 2013 book so do I just write the code anyway?
Click on F12 .. this should swap you over into the 'graphical IDE' which is why I suggested using it. When you've got a 'form' showing.. click on a button on the top bit then go down to the form and click again - hey presto a button on the form. Yes?
Edit .. you can run this as a program - just form with a button on by pressing F9. OK?
(Dec 26, 2022 02:03 AM)confused2 Wrote: [ -> ]Click on F12 .. this should swap you over into the 'graphical IDE' which is why I suggested using it. When you've got a 'form' showing.. click on a button on the top bit then go down to the form and click again - hey presto a button on the form.  Yes?
Edit .. you can run this as a  program - just form with a button on by pressing F9.  OK?

Does this link explain how to display text content in an app (in C++)?

Displaying Text to Window C++ - Stack Overflow
^^ the question is about drawing text using opengl. Opengl is a programming library and virtually a language in itself optimised for fast manipulation and display of 3D objects in 2D.
An 'app' is almost by definition graphical - it uses resizable windows but won't normally use (or need) the power of a 3D library.

Have a look here for more normal stuff-
https://www.educba.com/c-plus-plus-graphics/
Pages: 1 2 3