Xref: utzoo comp.os.os2.misc:498 comp.os.os2.programmer:373 Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!apple!metaphor!solrac!rimola From: rimola@solrac.metaphor.com (Carlos Alberto Rimola) Newsgroups: comp.os.os2.misc,comp.os.os2.programmer Subject: Re: Programming Graphics in PM? Message-ID: <1933@metaphor.Metaphor.COM> Date: 21 Dec 90 20:06:59 GMT References: <1990Dec16.233203.20196@eecs.wsu.edu> Sender: news@metaphor.Metaphor.COM Reply-To: rimola@solrac.metaphor.com (Carlos Alberto Rimola) Organization: Metaphor Computer Systems, Mountain View, CA Lines: 26 In article <1990Dec16.233203.20196@eecs.wsu.edu> wbonner@eecs.wsu.edu (Wim Bonner) writes: -I am having a problem programming some graphics in Pm. - -I have a series of things to do in a switch statement depending on what -message comes in. On most of the options, the action is taken care of -in the case statement, but in one case I am calling an external routine -caller "fire". One of the parameters that is being passed to it is an -HWND type, as I thought this should allow me to call WinBeginPaint on -that space and draw in it, but I can't seem to get anything to show up -on the window. I have a beep in the routine, so I know that it is -getting to the routine. - -Anything obvoious that I may be doing wrong? - -Wim. --- -| wbonner@yoda.eecs.wsu.edu | -| 27313853@wsuvm1.csc.wsu.edu | -| 27313853@Wsuvm1.BITNET | -| 72561.3135@CompuServe.com | I am not a PM expert but I am fairly certain that unless you are dealing with a WM_PAINT message you can/should not use WinBeginPaint/WinEndPaint to draw on a presentation space. Instead, you should use WinGetPS/WinReleasePS to get the handle to the PS and use that in your drawing calls. I have used this method during WM_TIMER messages without any problems.