Add a simple wxSetWindowFont() helper
This function is a just a very thin wrapper for WM_SETFONT, but it's still better to have it rather than write casts to WPARAM and MAKELPARAM() in several different places. Note that this removes the assert for font validity from wxWindow::SetFont() which really doesn't make much sense (and if we wanted to have it, it would be better to have it for all ports in wxWindowBase instead) and was never triggered since more than 20 years of its existence.
This commit is contained in:
committed by
Maarten Bent
parent
8e15849706
commit
b24d7e3ae4
@@ -620,8 +620,7 @@ bool wxListCtrl::SetHeaderAttr(const wxItemAttr& attr)
|
||||
|
||||
// We need to tell the header about its new font to let it compute
|
||||
// its new height.
|
||||
::SendMessage(hwndHdr, WM_SETFONT,
|
||||
(WPARAM)GetHfontOf(font), MAKELPARAM(TRUE, 0));
|
||||
wxSetWindowFont(hwndHdr, font);
|
||||
}
|
||||
|
||||
// Refreshing the listview makes it notice the change in height of its
|
||||
|
Reference in New Issue
Block a user