| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | WinBeginPaint () |
S> If I got it right, I may use WinBeginPaint() ... WinEndPaint() S> without having to wait for the receipt of a WM_PAINT message. You don't have it right, sorry. In non WM_PAINT code, you should be calling WinGetPS/WinReleasPS instead of WinBeginPaint/WinEndPaint. S> I want to make use of this in order to avoid repainting the S> complete client area of my terminal type window when text has S> to be scrolled upwards. (Good) WM_PAINT code should always be prepared to paint only the portion of the window described by the rectangle returned by WinBeginPaint(). To force just a part of your window to be repainted (as is the case with scrolling), call WinInvalidateRect() with only the part of the window that needs to be painted --- this will cause a WM_PAINT message to be sent, if required (PM will take into account if all/part of the window is obscured). In the case of scrolling text, you should be using WinScrollWindow(),which will move all of the text for you (no repaint required for smart WM_PAINT code), exposing the area where you need to place new text. WinScrollWindow() will automatically invalidate the naked portion of the window if you tell it to (no need to call WinInvalidateRect). The paint rectangle is in device coordinates (pixels); it is a simple matter to relate this back to a "line and column" number in your text,based on the current font size. Coincidentally, someone in the fidonet OS2PROG echo was looking for a sample about the same thing today, so I released a sample. FREQ pmtermsr.lzh from 1:259/414, approx 30k. --- Maximus/2 3.00* Origin: Sol 3 * Toronto * V.32 * (905)858-8488 (1:259/414) SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 628 704 713/888 800/1 7877/2809 @PATH: 259/414 400 99 229/2 3615/50 396/1 270/101 712/515 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.