VC 中资源中的对话框怎么和tab空间关联起来 ,tab控件怎么用

MrBai_2511 2015-09-10 10:49:17
不适用MFC 用windows的消息机制 谢谢 分不多 希望可以详细讲解一下
...全文
201 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
邓学彬 2015-09-14
  • 打赏
  • 举报
回复
1.对话框必须设置为Child (WS_CHILD) 2.对话框.Create(对话框资源ID,&TAB控件) //不要DoModal 3.TAB控件的TCN_SELCHANGE事件里,对话框.ShowWindow() 4.可以通过CTabCtrl::AdjustRect/TCM_ADJUSTRECT获取客户区尺寸,再MoveWindow子对话框
lx624909677 2015-09-14
  • 打赏
  • 举报
回复
PreTranslateMessage函数里来判断message是否是tab键
mfmfmmf1 2015-09-13
  • 打赏
  • 举报
回复
tab控件是什么?
pipi20151001 2015-09-13
  • 打赏
  • 举报
回复
消息捕获通过判断tab键
MrBai_2511 2015-09-10
  • 打赏
  • 举报
回复
自己顶一下 学习中
赵4老师 2015-09-10
  • 打赏
  • 举报
回复
SetParent The SetParent function changes the parent window of the specified child window. HWND SetParent( HWND hWndChild, // handle to window whose parent is changing HWND hWndNewParent // handle to new parent window ); Parameters hWndChild Handle to the child window. hWndNewParent Handle to the new parent window. If this parameter is NULL, the desktop window becomes the new parent window. Windows NT 5.0 and later: If this parameter is HWND_MESSAGE, the child window becomes a message-only window. Return Values If the function succeeds, the return value is a handle to the previous parent window. If the function fails, the return value is NULL. To get extended error information, callGetLastError. Remarks An application can use the SetParent function to set the parent window of a pop-up, overlapped, or child window. The new parent window and the child window must belong to the same application. If the window identified by the hWndChild parameter is visible, the system performs the appropriate redrawing and repainting. For compatibility reasons, SetParent does not modify the WS_CHILD or WS_POPUP window styles of the window whose parent is being changed. Therefore, if hWndNewParent is NULL, you should also clear the WS_CHILD bit and set the WS_POPUP style after calling SetParent. Conversely, if hWndNewParent is not NULL and the window was previously a child of the desktop, you should clear the WS_POPUP style and set the WS_CHILD style before calling SetParent. QuickInfo Windows NT: Requires version 3.1 or later. Windows: Requires Windows 95 or later. Windows CE: Requires version 1.0 or later. Header: Declared in winuser.h. Import Library: Use user32.lib. See Also Windows Overview, Window Functions, GetParent

16,551

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • AIGC Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

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