Discussion:
Potential bug in ScintillaWin::WndPaint
Farshid Lashkari
2013-08-01 18:15:48 UTC
Permalink
I have a case where I need the Scintilla window to draw to a specific HDC.
I manually send the WM_PAINT message to the Scintilla window with a
PAINTSTRUCT in the wParam field. I'm finding that this does not always work
correctly. I believe the problem is that the ScintillaWin::WndPaint method
will trigger a full repaint if the paint was abandoned. However, it does
not use the specified HDC in this case. I modified the following code at
the end of ScintillaWin::WndPaint:

if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace
highlight positions
FullPaint();
}

to:

if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace
highlight positions
if (IsOcxCtrl) {
FullPaintDC(pps->hdc);
} else {
FullPaint();
}
}

This appears to have solved the painting issues I was having.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2013-08-03 05:11:08 UTC
Permalink
Post by Farshid Lashkari
if (paintState == paintAbandoned) {
// Painting area was insufficient to cover new styling or brace highlight positions
if (IsOcxCtrl) {
FullPaintDC(pps->hdc);
} else {
FullPaint();
}
}
This appears to have solved the painting issues I was having.
Committed.
https://sourceforge.net/p/scintilla/code/ci/6ccaef0c2e6734c469bec994eaac92e1f6910194/

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...