[comp.windows.ms.programmer] Getting started programming with Windows SDK

spolsky-joel@cs.yale.edu (Joel Spolsky) (11/30/90)

In article <14829@vdsvax.crd.ge.com> millerj@belize.crd.ge.com () writes:
>
> [what's a good windows reference book]

Charles Petzold's book on Programming Windows is the best I've seen.
It has good examples. Version 3.0 should be out by now; if not, even
version 2.0 will help you a lot.

>	I really just want to create a main window with three child windows 
>that I can output text to at various points while an application is running.  
>The windows just need to be able to scroll, resize and show the text.

Ok, theoretically, here's what you would need to do:
* register a class for your window, with scrollbars, etc
* create a window function
* give that window function a WM_PAINT handler that drew the text
  using BeginPaint() and EndPaint()
* Handle the scroll bar messages, to bitblt (actually scroll)
  and draw the new text

Admittedly this is non-trivial. You might look into the "tty" sample
program that comes with Windows and see if it gives you the
functionality you need.

>I don't want the user to be able to enter 
>text and I can't figure out how to disable that in a Edit control.  But 
>otherwise, that's the functionality I want.

Using an Edit Control might do what you need. You can probably send
the edit control an EM_LIMITTEXT message with wParam=0 to prevent the
user from typing in the edit box (I haven't tried this). 

>If I could do it, I'd like the three child windows to behave like panels
>in X.  (It's like the parent window is divided up into three parts.  You
>can grab the line between two of the parts and change the size of both
>areas on the sides of the line.)

Hmm... this _can_ be done but it's not that easy. It will be easier to
make the three windows MDI Child Windows (look at the MDI
chapter in the Programmer's Guide and see the sample MDI program
MultiPad.)



Joel Spolsky
spolsky@cs.yale.edu                                     Silence = Death