   win32 button font    
  How can I change the font style in buttons, listboxes, groupboxes, etc... created with CreateWindow() (whithout resource file) ?What I have :What I want :Here is how I created my listbox in main dialog box's WM_CREATE:hwndImgList = CreateWindow( "listbox",   NULL,   WS_CHILDWINDOW | WS_VISIBLE | LBS_STANDARD,   20,   25,   130,   150,   hwnd,   (HMENU)ID_IMGLIST,   (HINSTANCE)GetWindowLong( hwnd, GWL_HINSTANCE ),   NULL );  [edited by - V3rt3x on August 21, 2002 10:26:03 AM]
  Ever looked into the Platform SDK?Just send a WM_SETFONT message to the window for which you would like to change the font.SendMessage(hwndImgList, WM_SETFONT, hFont, true);  The last param decides wether the control should redraw self or not.If you don''t know how to get an HFONT, it''s pretty simple:HFONT hFont = CreateFont(10, 0, 0, 0, FW_NORMAL, false, false, false, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "MS Sans Serif");  The important parameters are the first (font height or size) and the last (font face).    __________________Oregon Ghost---Wenn NULL besonders gross ist, ist es fast schon wie ein bisschen eins ;c)if NULL is very big, it is almost like a little ONE.  