Click here to Skip to main content
15,906,645 members
Home / Discussions / C#
   

C#

 
GeneralRe: Returning string from unmanaged dll Pin
Heath Stewart11-May-04 4:59
protectorHeath Stewart11-May-04 4:59 
GeneralRe: Returning string from unmanaged dll Pin
Mikke_x11-May-04 5:02
Mikke_x11-May-04 5:02 
GeneralRe: Returning string from unmanaged dll Pin
Heath Stewart11-May-04 5:20
protectorHeath Stewart11-May-04 5:20 
QuestionFont to LOGFONT ? Pin
azusakt10-May-04 23:06
azusakt10-May-04 23:06 
AnswerRe: Font to LOGFONT ? Pin
Kannan Kalyanaraman10-May-04 23:22
Kannan Kalyanaraman10-May-04 23:22 
GeneralRe: Font to LOGFONT ? Pin
Heath Stewart11-May-04 3:40
protectorHeath Stewart11-May-04 3:40 
GeneralRe: Font to LOGFONT ? Pin
azusakt11-May-04 16:55
azusakt11-May-04 16:55 
GeneralRe: Font to LOGFONT ? Pin
Heath Stewart12-May-04 2:45
protectorHeath Stewart12-May-04 2:45 
As the other person mentioned, you just call Font.ToLogFont - it takes care of everything. You don't need to fill the struct (or memory block) yourself. The LOGFONT does include all the parameters necessary to display your text using the Font you specify. To make sure that other fields are filled in, also pass an instance of the Graphics object for your operation, which you would get either from the PaintEventArgs (if in a Paint event handler) or from a call to CreateGraphics (don't forget to dispose the Graphics object in the latter case - do not dispose of it in the Paint event handler since the calling code will do it).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Font to LOGFONT ? Pin
azusakt11-May-04 22:41
azusakt11-May-04 22:41 
GeneralRe: Font to LOGFONT ? Pin
azusakt12-May-04 15:20
azusakt12-May-04 15:20 
GeneralSockets Pin
bouli10-May-04 22:58
bouli10-May-04 22:58 
GeneralRe: Sockets Pin
Heath Stewart11-May-04 3:44
protectorHeath Stewart11-May-04 3:44 
GeneralQuartz.dll Pin
MeterMan10-May-04 22:51
MeterMan10-May-04 22:51 
GeneralRe: Quartz.dll Pin
Heath Stewart11-May-04 3:46
protectorHeath Stewart11-May-04 3:46 
GeneralString question Pin
pankajdaga10-May-04 22:26
pankajdaga10-May-04 22:26 
GeneralRe: String question Pin
Kannan Kalyanaraman10-May-04 23:07
Kannan Kalyanaraman10-May-04 23:07 
Generalthanks! Pin
pankajdaga10-May-04 23:22
pankajdaga10-May-04 23:22 
GeneralGet The Time When The Program Execute Pin
DucLinh10-May-04 21:27
DucLinh10-May-04 21:27 
GeneralRe: Get The Time When The Program Execute Pin
Mazdak10-May-04 21:41
Mazdak10-May-04 21:41 
GeneralRe: Get The Time When The Program Execute Pin
DucLinh10-May-04 22:09
DucLinh10-May-04 22:09 
GeneralRe: Get The Time When The Program Execute Pin
Heath Stewart11-May-04 3:16
protectorHeath Stewart11-May-04 3:16 
Generalpopup a dialog when change drop down list selection Pin
davidlyy10-May-04 17:29
davidlyy10-May-04 17:29 
GeneralRe: popup a dialog when change drop down list selection Pin
OmegaSupreme11-May-04 0:06
OmegaSupreme11-May-04 0:06 
GeneralRe: popup a dialog when change drop down list selection Pin
Heath Stewart11-May-04 3:51
protectorHeath Stewart11-May-04 3:51 
GeneralRe: popup a dialog when change drop down list selection Pin
davidlyy11-May-04 16:46
davidlyy11-May-04 16:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.