Edit box
-
CFont m_Font; m_Font.CreateFont(...); m_EditBox.SetFont(&m_Font);
_**
**_
whitesky
-
CFont m_Font; m_Font.CreateFont(...); m_EditBox.SetFont(&m_Font);
_**
**_
whitesky
But It is Giving Debug Assertion Failed.. ----------------------------------- CFont font; font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily "Arial"); // lpszFacename m_Edit.SetFont(&font);// where m_Edit is: CEdit m_edit; ----------------------------------
-
But It is Giving Debug Assertion Failed.. ----------------------------------- CFont font; font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily "Arial"); // lpszFacename m_Edit.SetFont(&font);// where m_Edit is: CEdit m_edit; ----------------------------------
Whats Error?_**
**_
whitesky
-
Whats Error?_**
**_
whitesky
-
It is Giving Debug Assertion Failed.. NO Error. Assertion Failed.... for the line m_Edit.SetFont(... Where have to give this code " m_Edit.SetFont(... "
I dont know your error use from debugger but i write and i check this code not problem and it work please see,
//in header file CEdit m_Edit2; CFont font; m_Edit2.Create(WS_CHILD|WS_VISIBLE,CRect(100,0,250,23),this,1); font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily _T("Arial")); // lpszFacename m_Edit2.SetFont(&font);
test this code and answer to me it has error or it work_**
**_
whitesky
-
I dont know your error use from debugger but i write and i check this code not problem and it work please see,
//in header file CEdit m_Edit2; CFont font; m_Edit2.Create(WS_CHILD|WS_VISIBLE,CRect(100,0,250,23),this,1); font.CreateFont( 12, // nHeight 0, // nWidth 0, // nEscapement 0, // nOrientation FW_NORMAL, // nWeight FALSE, // bItalic FALSE, // bUnderline 0, // cStrikeOut ANSI_CHARSET, // nCharSet OUT_DEFAULT_PRECIS, // nOutPrecision CLIP_DEFAULT_PRECIS, // nClipPrecision DEFAULT_QUALITY, // nQuality DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily _T("Arial")); // lpszFacename m_Edit2.SetFont(&font);
test this code and answer to me it has error or it work_**
**_
whitesky