From: gpalmer@cs.strath.ac.uk (Gary J Palmer IE91)
Newsgroups: comp.sys.acorn
Subject: Re: A worse Windows than Windows ?
Date: 21 Aug 92 10:15:34 GMT
Organization: Comp. Sci. Dept., Strathclyde Univ., Glasgow, Scotland.


I felt I had to join this Windows 3 / 3.1 flame war. I am currently working
at Aardvark S/W in Aberdeen (no, not the company that wrote Beeb games!!) and
working with Microsoft C/C++ V7 to write a Windows program. 

Background : There is a system used on Drilling Rigs in the North Sea called
             DigiQuartz which monitors the flooding of the legs when the rig
             being lowered, and can produce serial output for further
             processing. 

Task       : Write a program that takes the serial output and produces a
             graphical display to allow easier interpretation of the output of
             DigiQuartz. A version (written in Realizer, a basic - clone with
             Windows extensions) already exists which I have to base my code on
             (I have to re-write it in C++ 'cos the Realizer version is *really*
             slow!!!!)

Problems   : 1) The comp.sys.acorn newsgroups are not here yet.......
             2) Microsoft documentation (or lack thereof).
                About 4000 pages of manuals came with the compiler, but the
                Windows API (Application Programmers Interface) docs are all 
                on-line under the 'winhelp' program, and are not very well
                cross referenced or indexed. 
                There is a reference manual describing the MFC (microsoft
                Foundation classes) (on paper!!!), but it is, quite frequently,
                *wrong*!! And it doesn' give you the correct information....

                e.g.1) A MDI window is a special type which has all it's child
                       windows inside it, and they cannot be drawn outside the
                       parent. In the reference for the 'CMDIChildWnd' C++
                       class it stated that title bars, etc, could be disabled 
                       with a special parameter........ WRONG!!!!!!!!!!!
                       To get rid of the title bar I had to use the generic
                       window class ('CWnd') and set the "WS_CHILD" flag which
                       makes it behave like a MDI child. I could then get rid
                       of the title bar!

                e.g.2) After a certain dialog box is closed, I wanted to have
                       Windows call my redraw routine so I could update the
                       now incorrect contents of the windows. I found
                       a routine that seemed to do what I wanted, the 
                       'CWnd::UpdateWindow()' function which puts a redraw
                       message in the windows queue, but would it redraw???
                       Nope. It only seemed to redraw the text when the window
                       was resized, and must have been using some sort of bitmap
                       storage technique to save what was underneath the dialog
                       box. I eventually found out (yesterday morning) that 
                       Windows refuses to pass on the message unless the
                       current contents of the window have been declared
                       Invalid, *then* and *only* then will the redraw request
                       get through. Due to the complexities of the MFC
                       interface, it would have been very difficult to get the 
                       window to re-draw itself with out the Windows kernal
                       having asked it........ Sigh......

                       The only mention of the fact that the window has to be
                       declared invalid, is a reference to the fn that
                       does the invalidating at the bottom of a page somewhere.

                       A wild guess later I tried using that fn, and hey
                       presto!!!! A redrawn window......


*WHY* *WHY* *WHY* is Microsoft C so *hopless*????????????
It doesn't seem to conform all that closely to the ANSI standard, especially
for warning messages.

Remind me to kill Bill Gates sometime soon.........

Yours

Gary Palmer

----

JANET		: gpalmer@uk.ac.strath.cs
Other Nets	: gpalmer%cs.strath.ac.uk@ plus one of :-
BITNET: UKACRL     UUCP: ukc.uucp    Internet: nsfnet-relay.ac.uk
Programmers do it on Archimedes. #include <std.disclaimer>
-- 
JANET		: gpalmer@uk.ac.strath.cs
Other Nets	: gpalmer%cs.strath.ac.uk@ plus one of :-
BITNET: UKACRL     UUCP: ukc.uucp    Internet: nsfnet-relay.ac.uk
Programmers do it on Archimedes. #include <std.disclaimer>