home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Graphics / Graphics.zip / bmviewer.zip / notes.text < prev    next >
Text File  |  2000-08-26  |  4KB  |  73 lines

  1.  
  2.    #1 FCF_NOBYTALIGN
  3.       Begin frame tracking is monitored by the application to do some fancy
  4.       adjustments to the scrollbars when window is resized using left and
  5.       bottom frame borders. Normally, without the FCF_NOBYTEALIGN flag, frame
  6.       windows are 8 pel aligned (horizontally only) on screen. Without the
  7.       FCF_NOBYTEALIGN the fancy scrollbar trick doesn't look quite right,
  8.       therefor, this application uses the FCF_NOBYTEALIGN flah when creating
  9.       the frame. Another work around is to intercept the WM_QUERYTRACKINFO in
  10.       the frame sub proc. and set the ptrackinfo->cxGrid parameter to 8.
  11.  
  12.    #2 Scrollbar handles
  13.       Normally, a frame control handle is queried through WinWindowFromID(),
  14.       but that call requires the parent of the contol window to be the frame
  15.       window. Since the scrollbars shouldn't be visible at application startup
  16.       they are created with parent set to HWND_OBJECT, which makes them
  17.       invisible but also makes it impossible to use the WinWindowFromID() call
  18.       to query the scrollbar handles. The scrollbar windows are created in the
  19.       function which subclasses the frame window, so the sub proc. is used to
  20.       get the scrollbar handles.
  21.  
  22.    #3 Message removal
  23.       Some messages (such as scrollbar tracking messages) only need the latest
  24.       available message in the queue. Using WinPeekMsg() a developer can
  25.       remove messages from the queue.
  26.       NOTA BENE: Although WinPeekMsg() simply returns FALSE when no more
  27.                  (filtered) messages are available in the queue, the QMSG
  28.                  structure used BECOMES UNDEFINED. This means that if you wish
  29.                  to guarentee that the parameters are intact you need to use
  30.                  a temporary QMSG structure.
  31.  
  32.       Sample 1 - No message parameters needed:
  33.          QMSG qmsg;
  34.  
  35.          [...]
  36.       
  37.          while(WinPeekMsg(hab, &qmsg, NULLHANDLE, WMU_UPDATE, WMU_UPDATE,
  38.                PM_REMOVE))
  39.          {
  40.          }
  41.          /* At this point, although you know that the last message peeked was
  42.             a WMU_UPDATED message, the qmsg structure must be considered
  43.             broken! */
  44.  
  45.       Sample 2 - Message parameters are needed:
  46.          QMSG qmsg;
  47.          QMSG q2;
  48.  
  49.          [...]
  50.       
  51.          while(WinPeekMsg(hab, &q2, NULLHANDLE, WM_MOUSEMOVE, WM_MOUSEMOVE,
  52.                PM_REMOVE))
  53.          {
  54.             memcpy(&qmsg, &q2, sizeof(QMSG));
  55.          }
  56.          /* At this point the qmsg contains the last available message
  57.             structure with all parameters intact */
  58.  
  59.    #4 Changing visible area when tracking left and/or bottom frame border
  60.       Without implementing a special trick, tracking the left and bottom frame
  61.       borders does not affect the client area the same way as tracking the
  62.       right an top frames. When tracking left and bottom frames, the scrollbar
  63.       positions stay the same (i.e if the vertical scrollbar's position is 42
  64.       before tracking the left border, it will remain 42 after the frame
  65.       tracking is complete.). This application implements the same behavior
  66.       for the left and bottom frame borders as for the right and top frame
  67.       borders.
  68.       Nota bene: Since window sizing isn't done the same way with "Full Window
  69.                  Dragging" enabled in the System properties notebook, this
  70.                  trick does not work unless "Full Window Dragging" is
  71.                  disabled.
  72.  
  73.