Click here to Skip to main content
15,891,529 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do you define flags? Pin
Albert Holguin25-Mar-14 4:48
professionalAlbert Holguin25-Mar-14 4:48 
QuestionHow do I using WH_CALLWNDPROC and PT_TOUCH to get the global touch event Pin
cedricvictor24-Mar-14 3:48
cedricvictor24-Mar-14 3:48 
Questionvisual studio 6.0 Enterprise edition License Pin
KrishnaRayalu_Talisetti24-Mar-14 0:47
KrishnaRayalu_Talisetti24-Mar-14 0:47 
AnswerRe: visual studio 6.0 Enterprise edition License Pin
Jochen Arndt24-Mar-14 1:02
professionalJochen Arndt24-Mar-14 1:02 
AnswerRe: visual studio 6.0 Enterprise edition License Pin
David Crow24-Mar-14 4:51
David Crow24-Mar-14 4:51 
QuestionBuilding / compiling DirectShow "empty DLL". Pin
Vaclav_23-Mar-14 5:51
Vaclav_23-Mar-14 5:51 
SuggestionRe: Building / compiling DirectShow "empty DLL". Pin
Richard MacCutchan23-Mar-14 22:59
mveRichard MacCutchan23-Mar-14 22:59 
QuestionWin CE program, SetFong() not work Pin
econy21-Mar-14 7:21
econy21-Mar-14 7:21 
In a WinCE MFC program, OnInitDialog(), I changed font of a Static text, but, it shows messy characters. same logic in my PC, I wrote a test MFC program. it works well.

Please help me to analyze the reason.
C++
BOOL CTestDlg::OnInitDialog()
{	
	CDashApp *pApp ;
			
	CDialog::OnInitDialog();
	pApp = (CDashApp *) AfxGetApp();
	// Hide the cursor
	ShowCursor( FALSE ) ;
	
	InitConfigurationFile();
	LoadDtcFile( pApp->g_PanelSettings.language );	
	
	if ( NULL != AddFontResource(TEXT("\\FlashDisk\\Startup\\FZYTK.TTF")) ) {
		::SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0);
	}

	// Draw Working Screen
	DrawDash( BKG_DRAW ) ;
	RefreshMainScreen( );
	
	pApp->m_ActiveDlg = ACTIVE_DLG_TEST ;

	LOGFONT lf;		
	CStatic *pEdit2 = new CStatic;
	
	memset(&lf, 0, sizeof(LOGFONT));

	lf.lfQuality = CLEARTYPE_QUALITY;
	lf.lfWidth  = 0;
	WCHAR lffn[] = TEXT("FZYaoTi(OpenType)"); 
	wcscpy(lf.lfFaceName,lffn);

	lf.lfCharSet = GB2312_CHARSET;

	 if (m_Font1.m_hObject)   {   
            m_Font1.DeleteObject();   
      }  

	m_Font1.CreateFontIndirect(&lf);
	pEdit2 = (CStatic*)GetDlgItem( IDC_INFO_TOP);
	
	GetDlgItem( IDC_INFO_TOP)->SetFont(&m_Font1,1);
	//pEdit1->SetWindowTextW(_T("??"));
	pEdit2->SetWindowTextW(_T("??"));

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}

AnswerRe: Win CE program, SetFong() not work Pin
Rage25-Mar-14 2:15
professionalRage25-Mar-14 2:15 
AnswerRe: Win CE program, SetFong() not work Pin
Rage25-Mar-14 2:17
professionalRage25-Mar-14 2:17 
GeneralRe: Win CE program, SetFong() not work Pin
econy25-Mar-14 3:32
econy25-Mar-14 3:32 
QuestionWidth of dropdown list window Pin
bokideclan21-Mar-14 2:33
bokideclan21-Mar-14 2:33 
QuestionVery weird change font problem Pin
econy20-Mar-14 8:18
econy20-Mar-14 8:18 
QuestionRe: Very weird change font problem Pin
Randor 20-Mar-14 8:43
professional Randor 20-Mar-14 8:43 
AnswerRe: Very weird change font problem Pin
econy20-Mar-14 9:00
econy20-Mar-14 9:00 
AnswerRe: Very weird change font problem Pin
Randor 20-Mar-14 10:22
professional Randor 20-Mar-14 10:22 
GeneralRe: Very weird change font problem Pin
econy20-Mar-14 10:33
econy20-Mar-14 10:33 
AnswerRe: Very weird change font problem Pin
Randor 20-Mar-14 10:51
professional Randor 20-Mar-14 10:51 
GeneralRe: Very weird change font problem Pin
econy20-Mar-14 13:20
econy20-Mar-14 13:20 
QuestionSetfont() not work Pin
econy20-Mar-14 5:38
econy20-Mar-14 5:38 
AnswerRe: Setfont() not work Pin
Randor 20-Mar-14 8:35
professional Randor 20-Mar-14 8:35 
GeneralRe: Setfont() not work Pin
econy20-Mar-14 8:42
econy20-Mar-14 8:42 
QuestionCEdit GetRect() question Pin
econy20-Mar-14 4:02
econy20-Mar-14 4:02 
AnswerRe: CEdit GetRect() question Pin
econy20-Mar-14 6:38
econy20-Mar-14 6:38 
QuestionCDatabase::ExecuteSQL Pin
Fawaz Ajani19-Mar-14 22:33
Fawaz Ajani19-Mar-14 22:33 

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.