Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Will someone come to my aid? (C++ and apps)

#21
Ostronomos Offline
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?
Reply
#22
confused2 Offline
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?
Reply
#23
Ostronomos Offline
(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
Reply
#24
confused2 Offline
^^ 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/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pre-written code for apps that display text alone? Ostronomos 3 104 Jan 15, 2023 10:23 PM
Last Post: Syne
  Can someone explain the #Import preprocessor variable? Ostronomos 0 123 Sep 30, 2022 04:42 PM
Last Post: Ostronomos
  SV warned not to aid Chinese military + He helped invent AI, rebuffs ‘killer robots’ C C 0 319 Mar 29, 2019 07:10 PM
Last Post: C C



Users browsing this thread: 1 Guest(s)