Font in CWnd
-
I created a CWnd control with widow styles WS_CHILD|WS_VISIBLE (parent is a CWnd also), then set a new CFont to the control by SetFont(...) function. But, when called CFont*pFt=GetFont(); inside the CWnd control, return value of pFt is null. Should I add more window styles? How do you set a font to CWnd to ensure that GetFont() is valid? BTW: I tested to create a CStatic, GetFont() is still null;
modified on Monday, January 10, 2011 11:39 PM
-
I created a CWnd control with widow styles WS_CHILD|WS_VISIBLE (parent is a CWnd also), then set a new CFont to the control by SetFont(...) function. But, when called CFont*pFt=GetFont(); inside the CWnd control, return value of pFt is null. Should I add more window styles? How do you set a font to CWnd to ensure that GetFont() is valid? BTW: I tested to create a CStatic, GetFont() is still null;
modified on Monday, January 10, 2011 11:39 PM
-
I created a CWnd control with widow styles WS_CHILD|WS_VISIBLE (parent is a CWnd also), then set a new CFont to the control by SetFont(...) function. But, when called CFont*pFt=GetFont(); inside the CWnd control, return value of pFt is null. Should I add more window styles? How do you set a font to CWnd to ensure that GetFont() is valid? BTW: I tested to create a CStatic, GetFont() is still null;
modified on Monday, January 10, 2011 11:39 PM
-
-
I created a CWnd control with widow styles WS_CHILD|WS_VISIBLE (parent is a CWnd also), then set a new CFont to the control by SetFont(...) function. But, when called CFont*pFt=GetFont(); inside the CWnd control, return value of pFt is null. Should I add more window styles? How do you set a font to CWnd to ensure that GetFont() is valid? BTW: I tested to create a CStatic, GetFont() is still null;
modified on Monday, January 10, 2011 11:39 PM