110,538
社区成员
发帖
与我相关
我的任务
分享
//attach textbox to client window
HwndSourceParameters parameters = new HwndSourceParameters(/*MSG0*/"Parameters", rec.Width, rec.Height);
parameters.ParentWindow = parentIntPtr;
parameters.SetPosition(rec.Location.X, rec.Location.Y);
parameters.WindowClassStyle = 0;
parameters.WindowStyle = (int)(WindowStyles.WS_CHILD | WindowStyles.WS_VISIBLE | WindowStyles.WS_CLIPSIBLINGS | WindowStyles.WS_CLIPCHILDREN | WindowStyles.WS_MAXIMIZEBOX);
parameters.ExtendedWindowStyle = (int)(WindowExStyles.WS_EX_TOPMOST | WindowExStyles.WS_EX_TRANSPARENT);
mHwndSource = new HwndSource(parameters);
if (mHwndSource == null)
return null; ;
mHwndSource.RootVisual = mTextBox;
mTextBox.CaptureMouse();