I am looking at the code posted here, specifically SyntaxRichTextBox.cs at the overriden method WndProc.
Is this just a typo in the code? What windows msg is 0x00f? Did they mean 0x0f for WM_PAINT? And what is the author of the code catching that message?
Code:
protected override void WndProc(ref System.Windows.Forms.Message m)
{
if (m.Msg == 0x00f)
{
if (m_bPaint)
base.WndProc(ref m);
else
m.Result = IntPtr.Zero;
}
else
base.WndProc(ref m);
}
First off, as James McNellis suggested in the comment above, 0x00f and 0x0f indicate the same number. I didn’t check the value of
WM_PAINTmessage, but the code looks like it is handling this message.It looks like a simple optimization: if
m_bPaintisfalse, skip thebase.WndProc()call. Probablym_bPaintis a flag that indicates there is something that needs to be redrawn.