常用控件技巧
2008-07-11 16:58
309 查看
1、跟随鼠标移动的控件:
2、使用回车移动控件焦点
voidCMy0231Dlg::OnMouseMove(UINTnFlags,CPointpoint) { //TODO:Addyourmessagehandlercodehereand/orcalldefault CRectrc,rect; GetClientRect(&rect); if(rect.PtInRect(point)) { m_Edit.GetClientRect(&rc); rc.left=point.x; rc.right=point.x+rc.right; rc.top=point.y; rc.bottom=point.y+rc.bottom; m_Edit.MoveWindow(&rc); } CDialog::OnMouseMove(nFlags,point); }
2、使用回车移动控件焦点
BOOLCMy0231Dlg::PreTranslateMessage(MSG*pMsg) { //TODO:Addyourspecializedcodehereand/orcallthebaseclass if(pMsg->wParam==13) { pMsg->wParam=9; } returnCDialog::PreTranslateMessage(pMsg); }
3、设置控件的tab顺序
按下<Ctrl+D>组合键可以对控件的Tab顺序进行编辑。
待续,,,
相关文章推荐
- DataGridView控件常用技巧总结
- c#winForm常用控件使用技巧
- ASP.NET中GridView控件常用技巧
- Visual C++界面常用控件技巧实例
- CListCtrl控件常用技巧(转)
- button控件的一些开发中常用技巧
- button控件常用技巧
- lable textbox控件常用技巧
- 常用事件方法及技巧(七) -- Event类的常用常量
- 什么是shell,shell基础由浅入深,常用的shell命令、用法、技巧
- css 常用技巧
- Asp.net中小技巧—服务器端Web控件与客户端Html控件交互
- Windows常用网络命令技巧汇总
- ListView常用优化技巧(Android群英传)
- Linux Shell常用技巧(六)
- android-基础篇-常用控件
- Android 的常用控件(下拉,日期,时间,单项,多项)
- 5.最常用的10种CSS BUG解决方法与技巧-浏览器兼容教程
- Javascript中最常用的55个经典技巧
- 对话框及常用控件实验