FontLab Forum
2012-05-16, 17:30:10 *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to the FontLab forum, read how to use it! Update: Archives from old MSN forums are now available on our forum.
 
   Home   Help Search Calendar Downloads Tags Login Register  
Del.icio.us Digg FURL FaceBook Stumble Upon Reddit SlashDot

Pages: [1]
  Print  
Author Topic: Re:Re: How to change fonts in ListBox by VC++ in Windows2000  (Read 1992 times)
ArchivePoster
Guest
« on: 2004-03-31, 04:30:00 »

Posted by: King
         

Create an OwnerDraw listbox.




-----  Original Message  -----
From: Murat9051
To: MicrosoftVOLTuserscommunity@groups.msn.com
Subject: Re: How to change fonts in ListBox by VC++ in Windows2000
Sent: Sun Mar 21 22:46:53 CST 2004

> -----------------------------------------------------------
>
> New Message on Microsoft VOLT users community
>
> -----------------------------------------------------------
> From: Murat9051
> Message 6 in Discussion
>
>
>
>
>  
>    
>     New Message on Microsoft VOLT users community
>  
>  
>
>
>
>
>
>       How to change fonts in ListBox by VC++ in Windows2000
>
>    
>  
>    
>       Reply
>
>          
>            
>                
>                
>                   Reply to Sender
>                     Recommend
>                  
>                   Message 1 in Discussion
>                                                
>            
>          
>        
>                    
>        
>            
>               From:
>               Murat9051
>            
>            
>              
>
>              
>   How to change fonts in ListBox by VC++ in Windows2000,Plz Help me.
>          
>        
>      
>          
>  
>
>     View other groups in this category.
>  
>
>  
>
>      
>
>
>
>
> -----------------------------------------------------------
>
> To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.
> http://groups.msn.com/MicrosoftVOLTuserscommunity/_emailsettings.msnw
>
> Need help? If you've forgotten your password, please go to Passport Member Services.
> http://groups.msn.com/_passportredir.msnw?ppmprop=help
>
> For other questions or feedback, go to our Contact Us page.
> http://groups.msn.com/contact
>
> If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
> mailto:MicrosoftVOLTuserscommunity-remove@groups.msn.com


Logged
ArchivePoster
Guest
« Reply #1 on: 1969-12-31, 19:00:00 »

Posted by: fariborz
         
I think it's better you ask your problem in specialized web site (such as codeguru.com)
But without error handling , you can do this:
- Create a variable with CListBox type (here c_List)
- Set the font to the list box with CFont::SetFont() function

your code seems this:

CFont *pFont = new CFont;
pFont->CreateFont(20, // font size (font height)
  0,
  0,
  0,
  400,// font weight (Normal: 400, Bold: 700)
  FALSE,// italic
  FALSE,// underline
  0,
  ANSI_CHARSET,
  OUT_DEFAULT_PRECIS,
  CLIP_DEFAULT_PRECIS,
  DEFAULT_QUALITY,
  DEFAULT_PITCH|FF_SWISS,
  "arial"  // font name
  );
 
c_List.SetFont(pFont);

You can use this way for other stndard Windows contrlos.
Logged
Tags:
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!