How can i change the text format in a listbox? Example: Make the text bold, or change it's font without changing the entire font of the parent window. Thanks in advance... Nokturnal.
Posted on 2000-12-15 17:14:00 by Nok
Set the listbox control as ownerdraw and draw the text with WM_DRAWITEM, look it up under in the Win32 Programmers Reference...
Posted on 2000-12-15 20:42:00 by dork
I you don't want to us an ownerdrawn ListBox you can do the following: .data Replace the [?] with less then, ?, and greater then, they don't appear on the post. lf LOGFONT [?] ; For CreateFontIndirect .code ;---------- ---------- INVOKE GetDlgItem, handle of dialog box, identifier of control mov hListBox, eax INVOKE lstrcpy, addr lf.lfFaceName, addr (a font name) mov lf.lfHeight, -11 mov lf.lfWeight, 600 INVOKE CreateFontIndirect, addr lf mov lFont, eax ;------------ ------------ INVOKE SendMessage, hListBox, WM_SETFONT, lFont, 1 NOTE! You can size the ListBox at this time also. Ewayne
Posted on 2000-12-15 22:05:00 by Ewayne