Click here to Skip to main content
15,896,207 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionI have a question about retrieve a window handle at mouse position. Pin
tmay_992-Sep-07 0:32
tmay_992-Sep-07 0:32 
AnswerRe: I have a question about retrieve a window handle at mouse position. Pin
bob169722-Sep-07 5:00
bob169722-Sep-07 5:00 
GeneralRe: I have a question about retrieve a window handle at mouse position. Pin
tmay_992-Sep-07 11:21
tmay_992-Sep-07 11:21 
GeneralRe: I have a question about retrieve a window handle at mouse position. Pin
bob169722-Sep-07 13:37
bob169722-Sep-07 13:37 
GeneralRe: I have a question about retrieve a window handle at mouse position. Pin
bob169722-Sep-07 13:41
bob169722-Sep-07 13:41 
GeneralRe: I have a question about retrieve a window handle at mouse position. Pin
bob169722-Sep-07 13:48
bob169722-Sep-07 13:48 
GeneralRe: I have a question about retrieve a window handle at mouse position. Pin
tmay_992-Sep-07 14:29
tmay_992-Sep-07 14:29 
QuestionProblems with the OEM/DOS Font "Terminal" in an RTF View Pin
CrocodileBuck1-Sep-07 23:22
CrocodileBuck1-Sep-07 23:22 
Hi Wink | ;) ,

i built an SDI Project (RTFView) and i want to edit displayed Text in the fonttype "Terminal" (OEM/DOS Font).
I try this with the CFONTDialog. I can now change the text in every fonttype but not in "Terminal".
Do yo know how i can do this ? Is there a tut or a Code snippet or can you explain how i can fix this Problem ?

Here is my code:

[CODE]
void CTereader0004View::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint)
{
CTereader0004Doc *pDoc = GetDocument ();

CRichEditCtrl& rCtrl = GetRichEditCtrl(); // Pointer auf das RichEditControl erstellen um dessen Funktionen zu nutzen
CHARFORMAT cfm; // Struktur die die Aktionen der Selektion enthält/ CFont myFont;

rCtrl.ReplaceSel(pDoc->cstrAusgabe);
rCtrl.SetSel(0,482);

cfm.cbSize = sizeof(CHARFORMAT); // Funktionen
cfm.dwMask = CFM_BOLD; // des RichEditCONTROLS zur
cfm.dwEffects = CFM_BOLD; // formatierten Darstellung benutzen

rCtrl.SetSelectionCharFormat (cfm); // Aktionen der Selektion ausführen
rCtrl.SetSel (0,0);

rCtrl.SetModify(FALSE);
}


void CTereader0004View::OnFontChoose()
{
CFontDialog fontDlg;
CFont *m_font = new CFont;

if (fontDlg.DoModal())
{
m_font->CreateFont (fontDlg.GetSize() / 7.25
,NULL
,0
,0
,fontDlg.GetWeight ()
,fontDlg.IsItalic ()
,fontDlg.IsUnderline ()
,fontDlg.IsStrikeOut ()
,DEFAULT_CHARSET
,OUT_DEFAULT_PRECIS
,0
,DEFAULT_QUALITY
,DEFAULT_PITCH
,fontDlg.GetFaceName ());
}

CRichEditCtrl& rCtrl = GetRichEditCtrl(); // Pointer auf das RichEditControl erstellen um dessen Funktionen zu nutzen
CHARFORMAT cfm;
rCtrl.SetFont (m_font);

}

[/CODE]


many many thx
CrocBuck
AnswerRe: Problems with the OEM/DOS Font "Terminal" in an RTF View Pin
CrocodileBuck1-Sep-07 23:41
CrocodileBuck1-Sep-07 23:41 
QuestionVisual Studio Express on a disc? Pin
devvvy1-Sep-07 20:54
devvvy1-Sep-07 20:54 
AnswerRe: Visual Studio Express on a disc? Pin
Christian Graus2-Sep-07 9:02
protectorChristian Graus2-Sep-07 9:02 
GeneralRe: Visual Studio Express on a disc? Pin
devvvy2-Sep-07 15:10
devvvy2-Sep-07 15:10 
AnswerRe: Visual Studio Express on a disc? Pin
Mark Salsbery2-Sep-07 9:56
Mark Salsbery2-Sep-07 9:56 
GeneralRe: Visual Studio Express on a disc? Pin
devvvy2-Sep-07 16:56
devvvy2-Sep-07 16:56 
QuestionCOM data sharing Pin
George_George1-Sep-07 19:18
George_George1-Sep-07 19:18 
Questionneed help Pin
gentleguy1-Sep-07 17:21
gentleguy1-Sep-07 17:21 
AnswerRe: need help Pin
progDes1-Sep-07 17:23
progDes1-Sep-07 17:23 
AnswerRe: need help Pin
Hamid_RT1-Sep-07 18:51
Hamid_RT1-Sep-07 18:51 
AnswerRe: need help [modified] Pin
Mark Salsbery1-Sep-07 21:56
Mark Salsbery1-Sep-07 21:56 
GeneralRe: need help Pin
Russell'1-Sep-07 22:50
Russell'1-Sep-07 22:50 
AnswerRe: need help Pin
progDes2-Sep-07 0:36
progDes2-Sep-07 0:36 
GeneralRe: need help Pin
Russell'2-Sep-07 0:43
Russell'2-Sep-07 0:43 
QuestionRe: need help Pin
Russell'2-Sep-07 0:54
Russell'2-Sep-07 0:54 
AnswerRe: need help Pin
progDes2-Sep-07 1:09
progDes2-Sep-07 1:09 
GeneralRe: need help Pin
Mark Salsbery2-Sep-07 8:58
Mark Salsbery2-Sep-07 8:58 

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.