| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | I need info |
DR> > You could basically just write a small set of function that > access a 4K buffer in memory (an 80x25 buffer with char/attr > pairs) as thow it were a text mode buffer. Then you would just > need to provide a refresh function that would be called from the > WM_PAINT message. It would calculate the cells covered by the > invalidated area, then translate the information in the pseudo > buffer and convert them to very simple GPI calls. DR> There's no need to roll your own functions to do this, because the existing VIO functions will do all this for you, allowing you do display text-mode-like screens in PM. Very simply, (and for the benefit of the lurkers) you create a "VIO Presentation Space", which is a buffer of character/attribute pairs, known as cells. You can then associate it with the device context of a given screen window. All of the VioXXXX() function calls (for text mode) can use the handle to this VIO Presentation Space, and will operate on the contents of the presentation space instead of the text screen. Then, at WM_PAINT time, you simply call VioShowBuf to cause the appropriate part of the window to be displayed. VioShowBuf works out how to draw the characters on the screen in the correct colours and font (which you can configure). Once you understand the principles, it's not hard to get an AVIO window on the PM desktop. I've even gone so far as to derive my own C++ stream classes (from streambuf and ios) to handle output to a VIO window (treating it like a dumb scrolling TTY) in the same manner as output to cout. DR> > ... although I think now that they have been badgered into > providing [VIO] in Workplace OS/2. DR> Look on the Developers' Connection CD-ROM. > JdeBP < ___ X MegaMail 2.10 #0: --- Maximus/2 2.01wb* Origin: DoNoR/2,Woking UK (0483-725167) (2:440/4) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 712/353 623 713/888 800/1 @PATH: 440/4 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 @PATH: 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™.