Click here to Skip to main content
16,005,473 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CFile::Read() : Giving zero bytes read Pin
David Crow28-Sep-04 4:11
David Crow28-Sep-04 4:11 
GeneralCan't prevent new window opening! Pin
henryfonda27-Sep-04 23:26
henryfonda27-Sep-04 23:26 
GeneralRe: Can't prevent new window opening! Pin
agentnem28-Sep-04 10:00
agentnem28-Sep-04 10:00 
GeneralRe: Can't prevent new window opening! Pin
henryfonda28-Sep-04 14:25
henryfonda28-Sep-04 14:25 
GeneralRe: Can't prevent new window opening! Pin
Scott H. Settlemier28-Sep-04 14:55
Scott H. Settlemier28-Sep-04 14:55 
GeneralRe: Can't prevent new window opening! Pin
henryfonda28-Sep-04 21:04
henryfonda28-Sep-04 21:04 
GeneralHowto change the font of a CStatic text Pin
anderslundsgard27-Sep-04 22:26
anderslundsgard27-Sep-04 22:26 
GeneralRe: Howto change the font of a CStatic text Pin
Manfred Staiger27-Sep-04 23:43
Manfred Staiger27-Sep-04 23:43 
You need to subclass your static control. Then overwrite the OnPaint() member with the following example:


void CMyStaticCtrl::OnPaint() <br />
{<br />
	CPaintDC dc(this); // device context for painting<br />
	<br />
CFont newFont;<br />
LOGFONT lf;<br />
<br />
//Create large Font<br />
memset(&lf, 0, sizeof(LOGFONT));<br />
lf.lfHeight = 20;<br />
lf.lfWeight=FW_BOLD;<br />
strcpy(lf.lfFaceName, "ARIAL");<br />
newFont.CreateFontIndirect(&lf);<br />
<br />
dc.SetBkMode(TRANSPARENT);<br />
dc.SetTextColor(RGB(255, 0, 0));	<br />
dc.SelectObject(&newFont);	<br />
dc.TextOut(0, 0, "Text in Arial, bold, red");<br />
}



Hope this helps

MS
GeneralRe: Howto change the font of a CStatic text Pin
anderslundsgard27-Sep-04 23:52
anderslundsgard27-Sep-04 23:52 
GeneralRe: Howto change the font of a CStatic text Pin
Manfred Staiger28-Sep-04 0:14
Manfred Staiger28-Sep-04 0:14 
QuestionHow can I get the lpClassName? Pin
Guoguor27-Sep-04 21:36
Guoguor27-Sep-04 21:36 
AnswerRe: How can I get the lpClassName? Pin
22491728-Sep-04 0:34
22491728-Sep-04 0:34 
AnswerRe: How can I get the lpClassName? Pin
cmk28-Sep-04 9:39
cmk28-Sep-04 9:39 
QuestionAbout painting on screen? Pin
Zero_One_ADO27-Sep-04 20:59
Zero_One_ADO27-Sep-04 20:59 
AnswerRe: About painting on screen? Pin
Aamir Butt28-Sep-04 1:37
Aamir Butt28-Sep-04 1:37 
GeneralIE Hooking Pin
TPN27-Sep-04 20:57
TPN27-Sep-04 20:57 
GeneralRe: IE Hooking Pin
22491727-Sep-04 21:12
22491727-Sep-04 21:12 
GeneralRe: IE Hooking Pin
TPN28-Sep-04 17:44
TPN28-Sep-04 17:44 
GeneralRe: IE Hooking Pin
2249173-Oct-04 18:15
2249173-Oct-04 18:15 
GeneralMake a call to my ActiveX from my .aspx webpage. Pin
anderslundsgard27-Sep-04 20:54
anderslundsgard27-Sep-04 20:54 
GeneralRe: Make a call to my ActiveX from my .aspx webpage. Pin
Muhammad Azam27-Sep-04 21:31
Muhammad Azam27-Sep-04 21:31 
GeneralRe: Make a call to my ActiveX from my .aspx webpage. Pin
anderslundsgard27-Sep-04 21:37
anderslundsgard27-Sep-04 21:37 
GeneralRe: Make a call to my ActiveX from my .aspx webpage. Pin
Muhammad Azam27-Sep-04 23:07
Muhammad Azam27-Sep-04 23:07 
GeneralStopping a thread Pin
Sujan Christo27-Sep-04 20:23
Sujan Christo27-Sep-04 20:23 
GeneralRe: Stopping a thread Pin
22491727-Sep-04 20:31
22491727-Sep-04 20:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.