home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!news.u.washington.edu!carson.u.washington.edu!dfitts
- From: dfitts@carson.u.washington.edu (Douglas Fitts)
- Newsgroups: comp.os.msdos.apps
- Subject: CodeView Snafu
- Summary: Videomode messes with mouse, manipulates monitors
- Keywords: 2-monitor debug MSC7.0 CV 4.00 _setvideomode() mouse PWB
- Message-ID: <1jsot5INN8g7@shelley.u.washington.edu>
- Date: 24 Jan 93 00:46:29 GMT
- Article-I.D.: shelley.1jsot5INN8g7
- Sender: dfitts@u.washington.edu (Doug Fitts)
- Distribution: usa
- Organization: University of Washington, Seattle
- Lines: 50
- NNTP-Posting-Host: carson.u.washington.edu
-
- While debugging a MSC 7.0 (pre Win32) DOS program with CodeView 4.00
- running in a DOS box under Windows 3.1 enhanced mode with the 2-monitor
- option set I get the following behavior if I exit CV immediately after
- executing the MS extention _setvideomode():
-
- _setvideomode() argument behavior
-
- _HRES16COLOR Mouse works, but mouse cursor is
- _VRES16COLOR invisible in PWB. Shelling to DOS
- and resetting the video mode to 3
- doesn't fix it.
-
- _XRES16COLOR Next execution of CV reverses the
- functions of the two monitors:
- CV comes up on SVGA and C program
- tries to run on mono monitor.
-
- I haven't taken the latter case all the way to the _setvideomode()
- function for fear it would damage my mono, but it's good
- I was paying attention. The hardware is a 486/33 clone with
- a ViewSonic 5+ monitor and Diamond SpeedStar SVGA with 1 MB and a
- Treu Bleu mono adapter and monitor and MS mouse.
-
- The situation when running PWB from MSDOS 5.0 is worse: As soon as
- CV exits back to PWB, PWB reports an "Internal VM error PWB 3912" and
- exits to DOS (probably reports this under Win also, but the video flips
- so fast I can't read it). Reloading PWB at this point still shows the
- invisible mouse cursor error (I didn't try _XRES, all this recompiling
- is a pain). Only ^<Alt-Del> gets the cursor back to normal.
-
- One solution is never to exit CV without allowing the C program to
- execute the call to _setvideomode(_DEFAULTMODE) often on cleanup.
- Of course, this works only if the program makes it all the way to that
- instruction. Even if the program works well enough to exit normally
- (mine sometimes do :)) I'm often in such a hurry to fix a found
- bug that I exit CV ASAP instead of letting the program exit normally
- first. Frustration ensues.
-
- Why can't CV read the state of the adapters on entry and restore them
- on exit just in case the program doesn't make it all the way to the
- cleanup (rhetorical question ;-( )! What causes this behavior?
- Why is it different for _XRES? Any ideas how to correct the problems
- inside PWB without exiting and reloading the program (Win) or doing the
- boyscoutsalute (DOS)? I have the Win32/NT beta but don't have a CDROM
- yet so it's still on the disk. Is this fixed in that version?
-
- --
- Doug Fitts
- dfitts@u.washington.edu
- First in Thirst
-