Click here to Skip to main content
16,004,991 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalreading sectors from CD Pin
hobnob3-May-02 2:33
hobnob3-May-02 2:33 
GeneralRe: reading sectors from CD Pin
3-May-02 5:50
suss3-May-02 5:50 
GeneralQ: how to obtain message box font display property setting Pin
Gil Clark3-May-02 2:16
Gil Clark3-May-02 2:16 
GeneralRe: Q: how to obtain message box font display property setting Pin
Roger Allen3-May-02 2:58
Roger Allen3-May-02 2:58 
GeneralRe: Q: how to obtain message box font display property setting Pin
Gil Clark3-May-02 3:47
Gil Clark3-May-02 3:47 
GeneralRe: Q: how to obtain message box font display property setting Pin
Maxwell Chen3-May-02 3:05
Maxwell Chen3-May-02 3:05 
GeneralRe: Q: how to obtain message box font display property setting Pin
Gil Clark3-May-02 3:39
Gil Clark3-May-02 3:39 
GeneralRe: Q: how to obtain message box font display property setting Pin
Maxwell Chen3-May-02 3:47
Maxwell Chen3-May-02 3:47 
Try this, I tried, and changed some values, and my Windows2K got strange...

void CTestMsgFontDlg::OnButton1() 
{
	NONCLIENTMETRICS ncmOld, ncmTest;
	
	AfxMessageBox(_T("Test change of font for message boxes."), MB_OK);
	ncmOld.cbSize = sizeof(NONCLIENTMETRICS);
	if(SystemParametersInfo(SPI_GETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncmOld, 0))
	{
		memcpy(&ncmTest, &ncmOld, sizeof(NONCLIENTMETRICS));
		ncmTest.lfMessageFont.lfUnderline = 1;
		
		AfxMessageBox(_T("Before change of font for message boxes."), MB_OK);
		if(SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncmTest, 0))
		{
			AfxMessageBox(_T("Message box font changed."), MB_OK);
			ncmOld.lfMessageFont.lfUnderline = 0;
			SystemParametersInfo(SPI_SETNONCLIENTMETRICS, sizeof(NONCLIENTMETRICS), &ncmOld, 0);
			AfxMessageBox(_T("Message box font restored."), MB_OK);
		}
	}
}


Maxwell Chen
No code is good code.
GeneralRe: Q: how to obtain message box font display property setting Pin
Gil Clark3-May-02 4:14
Gil Clark3-May-02 4:14 
Generali could not update my context menu item... Pin
Atilla Selem3-May-02 1:40
Atilla Selem3-May-02 1:40 
GeneralRe: i could not update my context menu item... Pin
Roger Allen3-May-02 2:48
Roger Allen3-May-02 2:48 
GeneralRe: i could not update my context menu item... Pin
Tom Archer3-May-02 3:14
Tom Archer3-May-02 3:14 
GeneralRe: i could not update my context menu item... Pin
Roger Allen3-May-02 4:52
Roger Allen3-May-02 4:52 
GeneralRe: i could not update my context menu item... Pin
Tom Archer3-May-02 5:18
Tom Archer3-May-02 5:18 
QuestionAm i defining this struct wrong? Pin
3-May-02 1:34
suss3-May-02 1:34 
AnswerRe: Am i defining this struct wrong? Pin
.::RockNix::.3-May-02 1:44
.::RockNix::.3-May-02 1:44 
GeneralRe: Am i defining this struct wrong? Pin
Tom Archer3-May-02 3:17
Tom Archer3-May-02 3:17 
AnswerRe: Am i defining this struct wrong? Pin
Maxwell Chen3-May-02 1:58
Maxwell Chen3-May-02 1:58 
GeneralRe: Am i defining this struct wrong? Pin
3-May-02 2:47
suss3-May-02 2:47 
GeneralRe: Am i defining this struct wrong? Pin
Maxwell Chen3-May-02 2:52
Maxwell Chen3-May-02 2:52 
AnswerRe: Am i defining this struct wrong? Pin
Navin3-May-02 3:00
Navin3-May-02 3:00 
GeneralRe: Am i defining this struct wrong? Pin
Brian Delahunty3-May-02 4:11
Brian Delahunty3-May-02 4:11 
GeneralRe: Am i defining this struct wrong? Pin
Navin3-May-02 4:27
Navin3-May-02 4:27 
GeneralRe: Am i defining this struct wrong? Pin
Brian Delahunty3-May-02 4:40
Brian Delahunty3-May-02 4:40 
AnswerRe: Am i defining this struct wrong? Pin
Tom Archer3-May-02 3:20
Tom Archer3-May-02 3:20 

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.