关于OnMouseActivate的问题,返回MA_NOACTIVATE窗口一样可以获得焦点

lanmu01 2010-01-10 03:31:39
在我的程序中有一个主窗口,还有一个小窗口,用来显示一些信息。
我现在需要的是这个用来显示信息的小窗口不会获得焦点,即使鼠标点进去也不获得焦点,但是这个小窗口可以被拖动位置和大小,响应了小窗口的OnMouseActivate消息,而且返回了MA_NOACTIVATE,但是在鼠标点进窗口的时候,他依然会被激活。为何?请高手解答~
int CHtmlWnd::OnMouseActivate(CWnd* pDesktopWnd, UINT nHitTest, UINT message)
{
return MA_NOACTIVATE;
}
...全文
391 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lanmu01 2010-01-10
  • 打赏
  • 举报
回复
我好像找到问题所在了,因为我这个小窗口继承自CDHtmlDialog。
那么如果一个CDHtmlDialog,如何让他们即使被点击也不得到焦点呢?
lanmu01 2010-01-10
  • 打赏
  • 举报
回复
各位过来帮帮忙啊,困扰了我好久的问题
lanmu01 2010-01-10
  • 打赏
  • 举报
回复
人工置顶,顺便说一句,我已经将这个小窗口的属性设置为TOOLWINDOW了,还是会有上面的情况
RAD Studio VCL Reference (VCL参考) ContentsActnColorMaps Namespace Classes TStandardColorMap Class TStandardColorMap Members TStandardColorMap Methods TStandardColorMap.SetColor Method TStandardColorMap.UpdateColors Method TStandardColorMap Properties TStandardColorMap.BtnFrameColor Property TStandardColorMap.BtnSelectedColor Property TStandardColorMap.BtnSelectedFont Property TStandardColorMap.Color Property TStandardColorMap.DisabledColor Property TStandardColorMap.DisabledFontColor Property TStandardColorMap.DisabledFontShadow Property TStandardColorMap.FontColor Property TStandardColorMap.FrameBottomRightInner Property TStandardColorMap.FrameBottomRightOuter Property TStandardColorMap.FrameTopLeftInner Property TStandardColorMap.FrameTopLeftOuter Property TStandardColorMap.HighlightColor Property TStandardColorMap.HotColor Property TStandardColorMap.HotFontColor Property TStandardColorMap.MenuColor Property TStandardColorMap.SelectedColor Property TStandardColorMap.SelectedFontColor Property TStandardColorMap.ShadowColor Property TStandardColorMap.UnusedColor Property TStandardColorMap Events TStandardColorMap.OnColorChange Event TThemedColorMap Class TThemedColorMap Members TThemedColorMap Methods TThemedColorMap.UpdateColors Method TThemedColorMap Properties TThemedColorMap.BtnFrameColor Property TThemedColorMap.BtnSelectedColor Property TThemedColorMap.BtnSelectedFont Property TThemedColorMap.Color Property TThemedColorMap.DisabledColor Property TThemedColorMap.DisabledFontColor Property TThemedColorMap.DisabledFontShadow Property TThemedColorMap.FontColor Property TThemedColorMap.FrameBottomRightInner Property TThemedColorMap.FrameBottomRightOuter Property TThemedColorMap.FrameTopLeftInner Property TThemedColorMap.FrameTopLeftOuter Property TThemedColorMap.HighlightColor Property TThemedColorMap.HotColor Property TThemedColorMap.HotFontColor Property TThemedColorMap.MenuColor Property TThemedColorMap.SelectedColor Property TThemedColorMap.SelectedFontColor Property TThemedColorMap.ShadowColor Property TThemedColorMap.UnusedColor Property TThemedColorMap Events TThemedColorMap.OnColorChange Event TTwilightColorMap Class TTwilightColorMap Members TTwilightColorMap Methods TTwilightColorMap.UpdateColors Method TTwilightColorMap Properties TTwilightColorMap.BtnFrameColor Property TTwilightColorMap.BtnSelectedColor Property TTwilightColorMap.BtnSelectedFont Property TTwilightColorMap.Color Property TTwilightColorMap.DisabledColor Property TTwilightColorMap.DisabledFontColor Property TTwilightColorMap.DisabledFontShadow Property TTwilightColorMap.FontColor Property TTwilightColorMap.FrameBottomRightInner Property TTwilightColorMap.FrameBottomRightOuter Property TTwilightColorMap.FrameTopLeftInner Property TTwilightColorMap.FrameTopLeftOuter Property TTwilightColorMap.HighlightColor Property TTwilightColorMap.HotColor Property TTwilightColorMap.HotFontColor Property TTwilightColorMap.MenuColor Property TTwilightColorMap.SelectedColor Property TTwilightColorMap.SelectedFontColor Property TTwilightColorMap.ShadowColor Property TTwilightColorMap.UnusedColor Property TTwilightColorMap Events TTwilightColorMap.OnColorChange Event TXPColorMap Class TXPColorMap Members TXPColorMap Methods TXPColorMap.UpdateColors Method TXPColorMap Properties TXPColorMap.BtnFrameColor Property TXPColorMap.BtnSelectedColor Property TXPColorMap.BtnSelectedFont Property TXPColorMap.Color Property TXPColorMap.DisabledColor Property TXPColorMap.DisabledFontColor Property TXPColorMap.DisabledFontShadow Property TXPColorMap.FontColor Property TXPColorMap.FrameBottomRightInner Property TXPColorMap.FrameBottomRightOuter Property TXPColorMap.FrameTopLeftInner Property TXPColorMap.FrameTopLeftOuter Property TXPColorMap.HighlightColor Property TXPColorMap.HotColor Property TXPColorMap.HotFontColor Property TXPColorMap.MenuColor Property TXPColorMap.SelectedColor Property TXPColorMap.SelectedFontColor Property TXPColorMap.ShadowColor Property TXPColorMap.UnusedColor Property TXPColorMap Events TXPColorMap.OnColorChange Event Constants ActnColorMaps.cXPBtnFrameColor Constant ActnColorMaps.cXPFrameOuter Constant ActnColorMaps.cXPSelectedColor Constant ActnCtrls Namespace Classes TActionToolBar Class TActionToolBar Members TActionToolBar Properties TActionToolBar.ActionManager Property TActionToolBar.Align Property TActionToolBar.AllowHiding Property TActionToolBar.Anchors Property TActionToolBar.BiDiMode Property TActionToolBar.Canvas Property TActionToolBar.Caption Property TActionToolBar.Color Property TActionToolBar.ColorMap Property TActionToolBar.Constraints Property TActionToolBar.Cursor Property TActionToolBar.DragCursor Property TActionToolBar.DragKind Property TActionToolBar.DragMode Property TActionToolBar.EdgeBorders Property TActionToolBar.EdgeInner Property TActionToolBar.EdgeOuter Property TActionToolBar.Enabled Property TActionToolBar.Font Property TActionToolBar.HorzMargin Property TActionToolBar.HorzSeparator Property TActionToolBar.Orientation Property TActionToolBar.ParentBackground Property TActionToolBar.ParentBiDiMode Property TActionToolBar.ParentColor Property TActionToolBar.ParentFont Property TActionToolBar.ParentShowHint Property TActionToolBar.PersistentHotKeys Property TActionToolBar.PopupMenu Property TActionToolBar.ShowHint Property TActionToolBar.Spacing Property TActionToolBar.VertMargin Property TActionToolBar.Visible Property TActionToolBar Events TActionToolBar.OnAlignInsertBefore Event TActionToolBar.OnAlignPosition Event TActionToolBar.OnCanResize Event TActionToolBar.OnClick Event TActionToolBar.OnConstrainedResize Event TActionToolBar.OnContextPopup Event TActionToolBar.OnControlCreated Event TActionToolBar.OnDblClick Event TActionToolBar.OnDockDrop Event TActionToolBar.OnDockOver Event TActionToolBar.OnDragDrop Event TActionToolBar.OnDragOver Event TActionToolBar.OnEndDock Event TActionToolBar.OnEndDrag Event TActionToolBar.OnEnter Event TActionToolBar.OnExit Event TActionToolBar.OnGetControlClass Event TActionToolBar.OnGetSiteInfo Event TActionToolBar.OnMouseActivate Event TActionToolBar.OnMouseDown Event TActionToolBar.OnMouseMove Event TActionToolBar.OnMouseUp Event TActionToolBar.OnPaint Event TActionToolBar.OnResize Event TActionToolBar.OnStartDock Event TActionToolBar.OnStartDrag Event TActionToolBar.OnUnDock Event TCustomActionCombo Class TCustomActionCombo Members TCustomActionCombo Methods TCustomActionCombo.BeginAutoDrag Method TCustomActionCombo.ComboWndProc Method TCustomActionCombo.DesignWndProc Method TCustomActionCombo.DragDrop Method TCustomActionCombo.DragOver Method TCustomActionCombo Properties TCustomActionCombo.DragMode Property TCustomActionCombo Events TCustomActionCombo.OnClick Event TCustomActionDockBar Class TCustomActionDockBar Members TCustomActionDockBar.Create Constructor TCustomActionDockBar Fields TCustomActionDockBar.FControlHeightIndexes Field TCustomActionDockBar.FScrollDown Field TCustomActionDockBar.FScrollUp Field TCustomActionDockBar Methods TCustomActionDockBar.CalcDockedWidth Method TCustomActionDockBar.CreateControls Method TCustomActionDockBar.CreateScrollButtons Method TCustomActionDockBar.CustomAlignPosition Method TCustomActionDockBar.Dock Method TCustomActionDockBar.DoEndDock Method TCustomActionDockBar.DoScrollDown Method TCustomActionDockBar.DoScrollUp Method TCustomActionDockBar.DoStartDock Method TCustomActionDockBar.GenerateControlHeightLookup Method TCustomActionDockBar.GetFloatingDockSiteClass Method TCustomActionDockBar.GetSiteInfo Method TCustomActionDockBar.Loaded Method TCustomActionDockBar.MakeLastItemVisible Method TCustomActionDockBar.Resize Method TCustomActionDockBar.SetOrientation Method TCustomActionDockBar.SetupScrolling Method TCustomActionDockBar.ShowScrollButtons Method TCustomActionDockBar Properties TCustomActionDockBar.AllowScrolling Property TCustomActionDockBar.ScrollingRate Property TCustomActionDockBar.VisibleIndex Property TCustomActionToolBar Class TCustomActionToolBar Members TCustomActionToolBar.Create Constructor TCustomActionToolBar.Destroy Destructor TCustomActionToolBar Fields TCustomActionToolBar.FHiddenItems Field TCustomActionToolBar.FPopupBar Field TCustomActionToolBar.FScrollBtn Field TCustomActionToolBar Methods TCustomActionToolBar.AutoSizingChanged Method TCustomActionToolBar.CalcButtonWidth Method TCustomActionToolBar.CalcDockedWidth Method TCustomActionToolBar.CMColorchanged Method TCustomActionToolBar.CreateControl Method TCustomActionToolBar.CreateControls Method TCustomActionToolBar.DisableHiding Method TCustomActionToolBar.DoDropCategory Method TCustomActionToolBar.DoScrollBtnClick Method TCustomActionToolBar.DragDrop Method TCustomActionToolBar.DrawBackground Method TCustomActionToolBar.DrawSeparator Method TCustomActionToolBar.EnableHiding Method TCustomActionToolBar.GetControlClass Method TCustomActionToolBar.GetPopupClass Method TCustomActionToolBar.GetScrollBtnClass Method TCustomActionToolBar.HideUnusedItems Method TCustomActionToolBar.Reset Method TCustomActionToolBar.SetBounds Method TCustomActionToolBar.SetOrientation Method TCustomActionToolBar.SetupDropDownBtn Method TCustomActionToolBar Properties TCustomActionToolBar.HiddenCount Property TCustomButtonControl Class TCustomButtonControl Members TCustomButtonControl.Create Constructor TCustomButtonControl Fields TCustomButtonControl.FFlat Field TCustomButtonControl.FState Field TCustomButtonControl Methods TCustomButtonControl.CalcBounds Method TCustomButtonControl.Click Method TCustomButtonControl.CMDialogChar Method TCustomButtonControl.CMEnabledChanged Method TCustomButtonControl.CMMouseEnter Method TCustomButtonControl.CMMouseLeave Method TCustomButtonControl.CMTextChanged Method TCustomButtonControl.DrawBackground Method TCustomButtonControl.DrawFrame Method TCustomButtonControl.DrawLargeGlyph Method TCustomButtonControl.GetShowShortCut Method TCustomButtonControl.Loaded Method TCustomButtonControl.MouseDown Method TCustomButtonControl.MouseMove Method TCustomButtonControl.MouseUp Method TCustomButtonControl.Paint Method TCustomButtonControl.SetActionClient Method TCustomButtonControl.SetBounds Method TCustomButtonControl.SetGlyphLayout Method TCustomButtonControl.SetSelected Method TCustomButtonControl.WMLButtonDblClk Method TCustomButtonControl Properties TCustomButtonControl.AllowAllUp Property TCustomButtonControl.Caption Property TCustomButtonControl.Down Property TCustomButtonControl.Flat Property TCustomButtonControl.MouseInControl Property TCustomButtonControl.ShowCaption Property TCustomButtonControl.ShowShortCut Property TCustomButtonControl.State Property TCustomButtonControl.TrackButton Property TCustomComboControl Class TCustomComboControl Members ........(全)

15,979

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 界面
社区管理员
  • 界面
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧