home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / os / os2 / programm / 4868 < prev    next >
Encoding:
Text File  |  1992-09-10  |  1.9 KB  |  41 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!news
  3. From: Larry Margolis <margoli@watson.ibm.com>
  4. Subject: Re: Icons in the title bar (a la EPM in ring enabled mode)
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <1992Sep10.192335.36146@watson.ibm.com>
  7. Date: Thu, 10 Sep 1992 19:23:35 GMT
  8. Distribution: comp.os.os2.programmer
  9. Reply-To: margoli@watson.ibm.com
  10. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  11. Nntp-Posting-Host: lamail.watson.ibm.com
  12. Organization: The Village Waterbed
  13. Lines: 26
  14.  
  15. In  <h1qn40+.msmith@netcom.com>  msmith@netcom.com (Martin P. Smith) writes:
  16. > The subject pretty much says it for me. How can I create icons in the title
  17. > bar. I would really like to build this capability into a product I am
  18. > developing. I have looked through the programmers guide volume two but
  19. > cannot seem to find the relevant info.
  20.  
  21. In general terms:
  22.  
  23.    Subclass the frame's window procedure.  In your subclassed windowproc,
  24.    process the WM_QUERYFRAMECTLCOUNT message by returning the value you
  25.    get from calling the frame's default windowproc plus the number (n) of
  26.    controls you want to add.
  27.  
  28.    Process the WM_FORMATFRAME message by calling the frame's default
  29.    windowproc, and you'll get back an array of SWP structures equivalent
  30.    to the value you returned for WM_QUERYFRAMECTLCOUNT.  The last n are
  31.    for the ones you added, and are there for formatting the controls you
  32.    want to add.  You can find the window handle for the title bar and
  33.    shrink the size as needed.  For your controls, put in appropriate
  34.    formatting information as well as the desired window handle (which
  35.    you've already created).
  36.  
  37. Look at the WM_FORMATFRAME documentation if anything's not clear.
  38.  
  39. Larry Margolis, MARGOLI@YKTVMV (Bitnet), margoli@watson.IBM.com (Internet)
  40. (Technical details courtesy of John Ponzo)
  41.