Jump to content

Introduction to PM Programming - Nov 1995

From EDM2
Revision as of 23:30, 1 November 2011 by Martini (talk | contribs)

Introduction

The purpose of this column is to provide the readers out there who are not familiar with PM application development the information necessary to satisfy their curiosity, educate themselves, and give them an advantage over the documentation supplied by IBM. Of course, much of this stuff could probably be found in one of the many books out there, but the problem with books in general is that they don't answer the questions you have after you read the book the first time through.

I will gladly entertain feedback from the readers about what was "glossed over" or what was detailed well, what tangential topics need to be covered and what superfluous crap should have been removed. This feedback is essential in guaranteeing that you get what you pay for.

It should be said that you must not depend solely on this column to teach you how to develop PM applications; instead, this should be viewed as a supplement to your other information storehouses (books, the network conferences, etc.). Because this column must take a general approach, there will be some topics that you would like to see discussed that really do not belong here. Specific questions can be directed to me via email and I will do my best to answer them in a timely fashion. Where Are We?

As I sat down to write this month's installment, I had to look back to see where we've been. The window classes that we've covered here so far are listed below:

   Button (WC_BUTTON)
   Entryfield (WC_ENTRYFIELD)
   Listbox (WC_LISTBOX)
   Menu (WC_MENU)
   Static (WC_STATIC)
   Titlebar (WC_TITLEBAR) 

The window classes left to be covered are listed below:

   Circular slider (WC_CIRCULARSLIDER)
   Combo box (WC_COMBOBOX)
   Container (WC_CONTAINER)
   Frame (WC_FRAME)
   Multi-line edit (WC_MLE)
   Notebook (WC_NOTEBOOK)
   Scroll bar (WC_SCROLLBAR)
   Slider (WC_SLIDER)
   Spin button (WC_SPINBUTTON)
   Value set (WC_VALUESET) 

As I looked, I decided that we could hit three birds with one stone if we ventured into the realm of the circular slider, slider, and scrollbar, since all three controls are very similar in function. Purpose

What is the purpose of each of these three controls? To sum it up in one sentence, their purpose is to allow the user to choose a single value within a range of values. Since Salomon's Law states that the complexity of a window class is exponentially proportional to the number of words in which you can state its purpose, you can imagine that we won't need to spend much time on these controls. Breakdown

If you breakdown the capabilities of the controls, you will see that all three provide the following:

   Set / Query the range of values
   Set / Query the current value
   Notify the owner when the value changes 

We will look at the details specific to each control in this column starting with the scroll bar (WC_SCROLLBAR). Scroll Bar Terminology

The parts of a scroll bar are labelled in the illustration below.