Hello,
I'm trying to make pseudo-word control - an UserControl that hosts Word 2007 instance window inside itself.
This is part of code i'm using:
_wordApp = new Word.Application();
_wordWnd = FindWindow("Opusapp", null);
if (_wordWnd != 0)
{
SetParent(_wordWnd, _parentControl.Handle.ToInt32());
SetWindowPos(
new IntPtr(_wordWnd),
_parentControl.Handle,
0,
0,
_parentControl.Bounds.Width,
_parentControl.Bounds.Height,
SWP_NOZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED | SWP_DRAWFRAME
);
}
_wordApp.Visible = true;
Almost everything does fine (client area to be more precise), but non client area - title bar - is a complete mess.
Does anybody know a way how to refresh/repaint/something else this word 2007 title bar area? I've tried various Win32 API window function calls, but there was no result...
Thanks in advance!
Sergej