Farshid Lashkari
2013-08-01 18:15:48 UTC
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.
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.
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.