🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms
Article #13869

Re: drawing inside dialog boxes

#13869
From: Brent Southard
Date: Thu, 21 Dec 1989 15:04
19 lines
1278 bytes
In article <33325@ucbvax.BERKELEY.EDU> kipnis@janus.Berkeley.EDU (Gary Kipnis) writes:
>Hi, is it possible to draw inside a dialog box, i.e. I want to draw a 
>blue rectangle inside a dialog box and change its color according to dialog
>commands, but for some reason every time I try to draw it I get nothing,

An easier way to do this might be to create a static rectangular control in
the dialog editor.  You could then get the control's DC via the call

hDC = GetDC(GetDlgItem(hDlg, ID_CONTROL));

Then you could paint your control's window and validate it when necessary.
You may need to subclass it to catch the WM_PAINT messages, too.

-brent
-- 
brent southard  (313) 656-8349   |   usenet:  ...!well!brent
ImageTech Corp  (313) 362-3141   |   

"When frog licking is outlawed, only outlaws will lick frogs."
Technical Details
Message-ID: <15145@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!well!brent
References: <33325@ucbvax.BERKELEY.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!well!brent
From: brent@well.UUCP (Brent Southard)
Newsgroups: comp.windows.ms
Subject: Re: drawing inside dialog boxes
Keywords: Panama
Message-ID: <15145@well.UUCP>
Date: 21 Dec 89 15:04:49 GMT
References: <33325@ucbvax.BERKELEY.EDU>
Reply-To: brent@well.UUCP (Brent Southard)
Organization: Whole Earth 'Lectronic Link, Sausalito, CA
Lines: 19