Article View: comp.os.os2.programmer
Article #1984Re: PRESENTATION MANAGER QUESTION
From: David Charlap
Date: Fri, 09 Oct 1992 19:24
Date: Fri, 09 Oct 1992 19:24
37 lines
2475 bytes
2475 bytes
In article <1auvr1INNjg0@falcon.natinst.com> uma@natinst.com (Uma Arunkumar) writes: >****************** PM QUESTION in OS2 2.0************************ >I am a beginner in PM programming in OS/2 2.0. > > >I am just trying to create a child window. >I have created a main window with frame, sysmenu, scroll bar, >minimize maximize buttons etc using WinCreateStdWindow. >This window displays the company logo and product information. >I have used some simple graphics functions. >As soon as the user hits any key, the next screen should be displayed. > >The questions are given below: >(i) Do I have to create a child window or repaint the same window with the new textual information? >(ii) HOW SHOULD I CREATE A CHILD WINDOW? >(iii) HOW SHOULD I REPAINT AN EXISTING WINDOW? >(iv) I tried giving > WinPostMessage(hwnd, WM_ERASEWINDOW, (MPARAM) 0, (MPARAM)0); >in order to clear the window so that I can put new textual >information on the same window. But the compiler complains >that WM_ERASEWINDOW should be declared. ( I had defined INCL_WIN, INCL_GPI). To clear the current window, you should invalidate the contents (with a WinInvalidateRect(...) call. This will declare the region you want (which you should make the entire window) invalid and will send you a WM_PAINT message. Then your WM_PAINT handling section of the message handler can erase the region and draw the next screen using appropriate GPI calls. One other thing: Don't make the user press a key. This is PM. Provide a button of some kind to click on. You can always link a keystroke to this button if you want to. -- David Charlap |"there aren't 50,000 things for which it's worth writing dic5340@hertz.njit.edu| software; and the computer industry doesn't have enough ----------------------+ programmers to create that much good software. Therefore, most of it must be worthless" -- Boris Beizer "The Frozen Keyboard"
Technical Details
Message-ID:
<1992Oct9.192444.21292@njitgw.njit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!swrinde!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340References:
<1auvr1INNjg0@falcon.natinst.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!swrinde!gatech!rutgers!njitgw.njit.edu!hertz.njit.edu!dic5340 From: dic5340@hertz.njit.edu (David Charlap) Newsgroups: comp.os.os2.programmer Subject: Re: PRESENTATION MANAGER QUESTION Message-ID: <1992Oct9.192444.21292@njitgw.njit.edu> Date: 9 Oct 92 19:24:44 GMT References: <1auvr1INNjg0@falcon.natinst.com> Sender: news@njit.edu Organization: New Jersey Institute of Technology, Newark, N.J. Lines: 37 Nntp-Posting-Host: hertz.njit.edu