🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #1640

object-oriented drawing program in windows

#1640
From: John Grant
Date: Fri, 16 Oct 1992 06:13
21 lines
1524 bytes
I'm so used to thinking of creating child, popup, overlapped windows, dialog
boxes etc, that I just realized I have no idea of how to create other objects
that can be picked, moved resized etc.  For example, suppose I have a drawing
program where I can pick a tool and draw a circle, ellipse, rectangle etc.
Or perhaps a graphics object is created by reading and plotting a data file
or a metafile of GDI primitives.

Later how do I 'pick' that object so that I can move it, resize it or whatever.
Do I just create an invisible window and draw in its invisible client area?
Obviously the easiest way to 'pick' an item is to draw each object in its
own window, so hit-testing is not required.

In the GKS world, each graphical item is a segment and you can pick a segment
with the cursor (internally I think it just checks the (x,y) point with the
(x,y) of all of the items in the display list for each object.  I sure wouldn't
want to do that in Windows.

So: 1. how do I draw an object?  In it's own window?  What kind?
    2. how do I pick one of these objects?

Life is not just limited to moving and sizing rectangles around the screen.
Technical Details
Message-ID: <1992Oct16.061314.17383@emr1.emr.ca>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!cunews!nrcnet0!emr1!jagrant

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!torn!cunews!nrcnet0!emr1!jagrant
From: jagrant@emr1.emr.ca (John Grant)
Subject: object-oriented drawing program in windows
Message-ID: <1992Oct16.061314.17383@emr1.emr.ca>
Organization: Dept. of Energy, Mines, and Resources, Ottawa
Date: Fri, 16 Oct 1992 06:13:14 GMT
Lines: 21