Click here to Skip to main content
15,908,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionI need a rotatable tracker Pin
includeh104-Aug-06 19:41
includeh104-Aug-06 19:41 
AnswerRe: I need a rotatable tracker Pin
Rilhas6-Aug-06 3:21
Rilhas6-Aug-06 3:21 
QuestionCorrectly displaying unicode characters Pin
Waldermort4-Aug-06 18:50
Waldermort4-Aug-06 18:50 
AnswerRe: Correctly displaying unicode characters Pin
Michael Dunn4-Aug-06 19:52
sitebuilderMichael Dunn4-Aug-06 19:52 
GeneralRe: Correctly displaying unicode characters Pin
Waldermort4-Aug-06 20:58
Waldermort4-Aug-06 20:58 
AnswerRe: Correctly displaying unicode characters Pin
Taka Muraoka4-Aug-06 19:52
Taka Muraoka4-Aug-06 19:52 
GeneralRe: Correctly displaying unicode characters Pin
Waldermort4-Aug-06 21:06
Waldermort4-Aug-06 21:06 
QuestionPainting RichEditView Pin
nightrider134-Aug-06 14:25
nightrider134-Aug-06 14:25 
Hi,

I have made a Project derived from CRichEditView and I want to paint the Client-Area.
The painting works perfectly there, is no flickering at all but there is a problem with the caret and the displayed signs. The caret appears completely strange and the displayed signs are not visible.
Here is all I added to my project:


BOOL CRichEdit2View::OnEraseBkgnd(CDC* pDC)<br />
{<br />
	// TODO: Fügen Sie hier Ihren Meldungsbehandlungscode ein, und/oder benutzen Sie den Standard.<br />
 <br />
    COLORREF crFgcol = 0, crBgcol = RGB(209,255,176);<br />
    CRect rect;<br />
    GetClientRect(&rect);<br />
    // We double buffer the drawing -<br />
<br />
    // preparing the memory CDC<br />
    CDC dc;<br />
    dc.CreateCompatibleDC(pDC);<br />
<br />
<br />
    // Create GDI and select objects<br />
    CBitmap bmp;<br />
	CPen    pen;<br />
    bmp.CreateCompatibleBitmap( pDC, rect.Width(), rect.Height() );<br />
    pen.CreatePen( PS_SOLID, 1, crFgcol );<br />
    CBitmap *pOldBitmap = dc.SelectObject( &bmp );<br />
    CPen    *pOldPen    = dc.SelectObject( &pen );<br />
<br />
 <br />
<br />
    // Painting the background<br />
	 dc.FillSolidRect( &rect, RGB(255,255,255) ); // komplett<br />
    CRect rcBar(rect);<br />
    rcBar.top = 100;<br />
	rcBar.bottom = 120;<br />
<br />
    dc.FillSolidRect( &rcBar, crBgcol );  // Rand<br />
    dc.MoveTo( rect.right - 1, 0 );<br />
<br />
  // dc.LineTo( rect.right - 1, rect.bottom );<br />
    pDC->BitBlt( 0, 0, rect. right, rect.bottom, &dc, 0, 0, SRCCOPY );<br />
    // Aufräumen<br />
    dc.SelectObject( pOldBitmap );<br />
<br />
    dc.SelectObject( pOldPen );<br />
    return TRUE;<br />
}<br />
<br />
HBRUSH CRichEdit2View::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)<br />
{<br />
    pDC->SetBkMode(TRANSPARENT);<br />
    return NULL;<br />
}<br />
<br />
void CRichEdit2View::OnPaint()<br />
{<br />
	CPaintDC dc(this); // device context for painting<br />
	// TODO: Fügen Sie hier Ihren Meldungsbehandlungscode ein.<br />
	// CRichEditView::OnPaint() soll zum Zeichnen von Meldungen nicht aufgerufen werden.<br />
}<br />


I would be really happy if someone has an answer for me Smile | :)
QuestionCustom Ctrl error Pin
CodeGoose4-Aug-06 13:16
CodeGoose4-Aug-06 13:16 
QuestionSmall Error Pin
Falconite7774-Aug-06 12:35
Falconite7774-Aug-06 12:35 
AnswerRe: Small Error Pin
Graham Shanks4-Aug-06 14:02
Graham Shanks4-Aug-06 14:02 
QuestionVisual Studio Question Pin
JKallen4-Aug-06 12:17
JKallen4-Aug-06 12:17 
AnswerRe: Visual Studio Question Pin
Michael Dunn4-Aug-06 13:41
sitebuilderMichael Dunn4-Aug-06 13:41 
AnswerRe: Visual Studio Question Pin
Steve Weeks4-Aug-06 17:35
Steve Weeks4-Aug-06 17:35 
QuestionVisual Studio 2003 Debugger and Execptions [modified] Pin
kpeng14-Aug-06 11:39
kpeng14-Aug-06 11:39 
AnswerRe: Visual Studio 2003 Debugger and Execptions [modified] Pin
kpeng18-Aug-06 12:41
kpeng18-Aug-06 12:41 
QuestionHow does AfxGetApp() work? Pin
Ali Tavakol4-Aug-06 11:28
Ali Tavakol4-Aug-06 11:28 
AnswerRe: How does AfxGetApp() work? Pin
PJ Arends4-Aug-06 16:39
professionalPJ Arends4-Aug-06 16:39 
AnswerRe: How does AfxGetApp() work? Pin
Joe Woodbury4-Aug-06 16:40
professionalJoe Woodbury4-Aug-06 16:40 
Question"hard-wired" in C++ Pin
Jay034-Aug-06 10:10
Jay034-Aug-06 10:10 
AnswerRe: "hard-wired" in C++ Pin
RChin4-Aug-06 11:14
RChin4-Aug-06 11:14 
AnswerRe: "hard-wired" in C++ Pin
Ravi Bhavnani4-Aug-06 11:53
professionalRavi Bhavnani4-Aug-06 11:53 
AnswerRe: "hard-wired" in C++ Pin
Rilhas6-Aug-06 3:39
Rilhas6-Aug-06 3:39 
QuestionVisual Studio Net 2003 does not catch divide by zero with doubles Pin
kpeng14-Aug-06 6:45
kpeng14-Aug-06 6:45 
AnswerRe: Visual Studio Net 2003 does not catch divide by zero with doubles Pin
Zac Howland4-Aug-06 7:03
Zac Howland4-Aug-06 7:03 

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.