home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / misc / 1604 < prev    next >
Encoding:
Text File  |  1992-08-31  |  1.5 KB  |  45 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!centerline!hroudland!cparker
  3. From: cparker@centerline.com (Charles Parker)
  4. Subject: Re: Changing font in edit controls
  5. Message-ID: <1992Aug31.225037.8846@centerline.com>
  6. Sender: news@centerline.com
  7. Nntp-Posting-Host: hroudland
  8. Reply-To: cparker@centerline.com
  9. Organization: CenterLine Software
  10. References: <1992Aug31.165928.14569@wam.umd.edu>
  11. Date: Mon, 31 Aug 1992 22:50:37 GMT
  12. Lines: 31
  13.  
  14. In article 14569@wam.umd.edu, castanos@wam.umd.edu (Jose Alberto Castanos) writes:
  15. >    Hello, 
  16. >
  17.  
  18. >    I'm working on an ObjectWindows application that derives
  19. >a window from the TFileWindow class.  I need to change the font 
  20. >of the Editor window and cannot find a way to do this.  According 
  21. >to the ObjectWindows User's Guide this could be done, but no details
  22. >are given on how to do it.
  23. >     My question is how can the font in an edit control be changed?
  24. >
  25.  
  26. The only reason that I know the answer is that I asked the same question
  27. a couple weeks ago.
  28.  
  29. Send a WM_SETFONT message to the TFileWindow's Editor->HWindow, as per:
  30.  
  31. TFileWindow *foo;
  32.  
  33.     SendMessage(foo->Editor->HWindow,WM_SETFONT,...);
  34.  
  35. I forget the rest of the message parms, but you can easily get them by
  36. hitting Ctrl-F1 while the cursor is on WM_SETFONT inside the IDE. 
  37. One of them is a HFONT
  38.  
  39. ---
  40. ---------------------------------------------------------
  41.                                        cyberspace
  42. momma, don't let yer children grow up to be ^ cowboys ...
  43. ---------------------------------------------------------
  44.  
  45.