Click to See Complete Forum and Search --> : Where to start - A program that just draws a square on the screen


jimmorrison
September 13th, 2008, 07:48 PM
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.

compavalanche
September 13th, 2008, 08:02 PM
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.

jimmorrison
September 13th, 2008, 10:50 PM
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.

Mike Harnad
September 16th, 2008, 07:32 AM
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.