CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2008
    Posts
    2

    Where to start - A program that just draws a square on the screen

    Hi,

    I have done a search of the forum to no avail. I have also googled but cannot find clean code regarding.

    I am starting a project to draw a simple gauge. I want some advice on how to go about starting it; i.e. which library to use to create/draw the gague. I just want to KISS.

    My constraints are:
    Visual C++ 6.
    Needs to work on Win2000+ with no extra's needed; i.e. no .NET. and no DirectX(?)
    I presume it cannot be in a dialog.
    Ultimately there could be 40 of these gagues shown at once.

    First step:
    So I want to execute my square.exe.
    And a small square will appear on the desktop - White background

    Second step (that I don't need answered but FYI)
    Add one more square overlapping first square, but change the width to show it measuring a value - Black.

    Third step (FYI)
    Make the gague draggable so you can choose where it sits on screen.

    Fourth step (FYI)
    Turn step 1, 2 and 3 into an object/class so I can reuse and make multiple gagues.
    Last edited by jimmorrison; September 13th, 2008 at 07:51 PM.

  2. #2
    Join Date
    Jul 2008
    Posts
    70

    Re: Where to start - A program that just draws a square on the screen

    Hmm you probably want to look at GDI

    You may try: http://www.functionx.com/visualc/index.htm or more specifically http://www.functionx.com/visualc/gdi/rectangles.htm

    Although why not use .NET it will make this really simple.

  3. #3
    Join Date
    Sep 2008
    Posts
    2

    Re: Where to start - A program that just draws a square on the screen

    Thanks for that; I will go and dig deeper into that first link and look more into GDI as a foundation for this.

    I don't really want to use .NET because any computer that will need to use my program will need .NET loaded on it, and I want to try and avoid that kinda of extra requisite for potential end users; i.e. I want it to be a simple universal Windows 2000+ install.

  4. #4
    Join Date
    Apr 1999
    Posts
    3,585

    Re: Where to start - A program that just draws a square on the screen

    I don't really want to use .NET because any computer that will need to use my program will need .NET loaded on it
    .Net, and other frameworks, are readily available and typically installed as a part of a redistributable license. Your users would probably already have the necessary prerequisites as a result of loading other software. And, if they don't, you can certainly load it as part of your install. IMO, don't let this limit your design.
    Gort...Klaatu, Barada Nikto!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured