EWin Tutorial - Table of Contents

Introduction and the basics:

  Conventions of this document
  How is this document supposed to be used?
  What is EWin?
  What operating systems does EWin support?
  Would you break EWin into basic parts?
  What is Windows Programming like?
  Damn you, tell me useful things about Windows Programming!
  What are the fundamental properties that every window has?
  What's a window class? And why do I care?
  [Advanced Topic] I know something about Windows programming already. Where is the message dispatch loop, the WNDPROC window procedure, and the DLGPROC?
  So, anyway, how do I get started? I want a minimal EWin application!
  What is EWinMain, exactly?
  What the HELL is TWinAttr()??? And isn't that a syntax error, there?
  What is the first parameter that you pass to the TWin's constructor, and why has it been NULL in the examples so far?
  Why isn't that first TWin constructor parameter, the Parent pointer, smushed into the TWinAttr like all the other attributes?

Handling messages:

  How do I make a more interesting program? [event-driven programming intro]
  So if I wanted to do something special when my window was maximized?
  So if I wanted to stop the user from making the window larger than a certain amount, I would just...
  Why is that function called QueryMinMaxInfo() and not OnGetMinMaxInfo()?
  What's OnInit()?

Child windows:

  So how do I put controls in my main window? I want an Edit Box on my window.
  Now I want to create a button.
  How do I get a checkbox?

Menus and dialogs:

  How do I use a menu?
  I want to bring up a dialog when somebody chooses one of the items on my menu.
  So how about other kinds of controls in dialogs? Listboxes, Comboboxes, Listviews, everything else?
  Help! My dialog won't go away! The OK and Cancel buttons don't do anything!
  Help! My dialog causes an "Assertion Failure" to appear when I start it up, and it really shouldn't.
  Why can't I set control parameters in my dialog's constructor? The settings are lost!

Window lifespans:

  Before we get to the next topic that I actually care about, can you tell me about Create() and Destroy()?
  What if I wanted to make a new button on the fly?
  What if I wanted to make a new button each time the user chose the menu item? (with a side-discussion on TDynamicArrays.)
  Hey, I just had a thought: what happens if I call Create() on a TWin, then I Destroy() it, and then call Create() again?
  So when do I call Close() and when do I call Destroy()?

Drawing things:

  How do I draw stuff on my window?
  What's a TPaintDC?? (an overview of Device Contexts in general)
  How do bitmaps work? What's a memory DC?
  Help! I want to draw a bitmap onto my screen, but it comes out black and white, or very small, or not at all!
  Help! My picture flickers. How do I fix it?

Custom Controls:

  Custom Controls? Sounds cool... How do I make a custom control for my dialog?
  So that's how I make my own custom controls. But isn't there an alternate way to do all of this? (Owner-drawn controls)
  So that's how I make an owner-drawn button. What about an owner-drawn listbox?
  And what about an owner-drawn combobox?
  And what about an owner-drawn listview?

Debugging and Debug Mode:

  What's the difference between debug mode and non-debug mode?
  What's an ASSERT() macro? How do I use it?
  What does LOG do? What about LOGF? LOG1?
  How do I fine-tune the debugging stuff?
  Okay, what is XLOG? How does it differ from LOG?

Everything Else:

  So tell me how to do more things. How do I manipulate the mouse? The cursor? The keyboard? Etc.?
  So if I wanted to set the mouse to be a particular cursor, I would use SysMouse.SetCursor() ?
  I want to store my program's settings in the registry. How do I do that?
  So how do I get a file-open dialog in my program?
  Now I want a really FANCY file-open dialog with all kinds of add-on crap.
  What's a TFile? How do I use it?
  [Advanced] What's the difference between WM_USER and WM_APP?

Thus ends the main tutorial. Coming soon: the other tutorials in HTML format.