Click here to Skip to main content
15,902,852 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Platform SDK Pin
pubududilena31-Oct-04 20:04
pubududilena31-Oct-04 20:04 
GeneralRe: Platform SDK Pin
cberam31-Oct-04 23:05
cberam31-Oct-04 23:05 
GeneralRe: Platform SDK Pin
David Crow1-Nov-04 4:30
David Crow1-Nov-04 4:30 
GeneralRe: Platform SDK Pin
cberam1-Nov-04 17:05
cberam1-Nov-04 17:05 
GeneralRe: Platform SDK Pin
David Crow2-Nov-04 2:24
David Crow2-Nov-04 2:24 
Generalvc++ Pin
Member 145406031-Oct-04 19:17
Member 145406031-Oct-04 19:17 
GeneralRe: vc++ Pin
kriaz31-Oct-04 20:03
kriaz31-Oct-04 20:03 
GeneralRe: vc++ Pin
vcplusplus1-Nov-04 3:07
vcplusplus1-Nov-04 3:07 
If you want to do it at run time, override the virtual function DoModal();

#include <afxpriv.h> // Required for CDialogTemplate
int CMyDlg::DoModal()
{
	CDialogTemplate dlt;

	// Load dialog Template
	if (!dlt.Load(MAKEINTRESOURCE(CMyDlg::IDD)))
	{
		return -1;
	}

	// Set Font Size;
	// Default Value
	WORD nFontSize = 10;
	TCHAR chFaceName[100] = "Courier New";

	// Open an ini file or read from the registry to get the new font size and face name
	if (GetNewFontSize(....))
	{
		nFontSize = newsize;
	}
	
	if (GetNewFaceName(....))
	{
		lstrcpy(chFaceName, newfacename);
	}
	
	dlt.SetFont(chFaceName, (WORD)nFontSize);

	// Get pointer to the modified dialog template
	LPSTR pData = (LPSTR)GlobalLock(dlt.m_hTemplate);
	if (pData == NULL)
	{
		return -1;
	}

	// Let MFC know that you are using your own template
	m_lpszTemplateName = NULL;
	InitModalIndirect(pData);

	// Display Dialog Box
	INT nResult = CDialog::DoModal();

	// Unlock memory object
	GlobalUnlock(dlt.m_hTemplate);
	return nResult;
}

GeneralRe: vc++ Pin
John M. Drescher1-Nov-04 7:31
John M. Drescher1-Nov-04 7:31 
QuestionHow to read a character at a time from file?? Pin
ConradT31-Oct-04 19:06
ConradT31-Oct-04 19:06 
AnswerRe: How to read a character at a time from file?? Pin
KRowe31-Oct-04 22:34
KRowe31-Oct-04 22:34 
AnswerRe: How to read a character at a time from file?? Pin
David Crow1-Nov-04 4:40
David Crow1-Nov-04 4:40 
QuestionA executable file which has compiled, How to insert it into IE? Pin
hou_12631-Oct-04 17:47
hou_12631-Oct-04 17:47 
AnswerRe: A executable file which has compiled, How to insert it into IE? Pin
KRowe31-Oct-04 20:34
KRowe31-Oct-04 20:34 
GeneralRe: A executable file which has compiled, How to insert it into IE? Pin
hou_12631-Oct-04 20:46
hou_12631-Oct-04 20:46 
GeneralRe: A executable file which has compiled, How to insert it into IE? Pin
KRowe31-Oct-04 21:27
KRowe31-Oct-04 21:27 
GeneralRe: A executable file which has compiled, How to insert it into IE? Pin
hou_12631-Oct-04 21:30
hou_12631-Oct-04 21:30 
GeneralArabic Language Problem Pin
chcnjg31-Oct-04 16:26
chcnjg31-Oct-04 16:26 
GeneralInstalling Visual Studio Pin
Ryan McDermott31-Oct-04 15:37
Ryan McDermott31-Oct-04 15:37 
GeneralRe: Installing Visual Studio Pin
vcplusplus31-Oct-04 16:13
vcplusplus31-Oct-04 16:13 
GeneralCompile with version.lib Pin
picasso231-Oct-04 14:55
picasso231-Oct-04 14:55 
GeneralRe: Compile with version.lib Pin
vcplusplus31-Oct-04 16:18
vcplusplus31-Oct-04 16:18 
GeneralRe: Compile with version.lib Pin
Steve S31-Oct-04 22:44
Steve S31-Oct-04 22:44 
GeneralDownloader and Install files from the WEB (Like the Windows Updates) Pin
programming31-Oct-04 12:04
programming31-Oct-04 12:04 
GeneralRe: Downloader and Install files from the WEB (Like the Windows Updates) Pin
KRowe31-Oct-04 22:29
KRowe31-Oct-04 22:29 

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.