我用createwindow 创建一个windows sdk edit控件,但不知道如何处理delete操作;就是将光标移入已输入edit的字串中间,敲delete键。 此操作如何完成呢?关键是如何得到光标在字串中的确切位置。
解决方案 »
- 用过命名管道的人进来看看啊!
- 看一小段代码....
- 知道的请进关于对话框中按钮与方向键的屏蔽问题
- 开发EMAIL客户端的探讨!!!!!高分相送!!!!!!!!!
- DentistryDoctor(牙科医生) 请进,刚才的那个关于菜单屏蔽的问题。
- 怎样改变CEditView的背景颜色?
- 如何在VC6中为控件增加事件?如何在VC7中为控件增加属性?
- 求救: 怎样在CTeeCtr中用右键菜单 --新手
- 两个系统报错!看不明白!!!急,因此求助!帮帮菜鸟啊!
- 用vc开发的话怎么协调软件工程阿?我不知道怎么去规划设计(用mfc),还有就是那个atl到底有什么神奇之处阿
- ******************怎么实现这个效果??*********************
- 求助:求OpenGL中虚拟球的详细教程。。。
EM_GETSEL
The EM_GETSEL message retrieves the starting and ending character positions of the current selection in an edit control. You can send this message to either an edit control or a rich edit control.To send this message, call the SendMessage function with the following parameters. SendMessage(
(HWND) hWnd, // handle to destination window
EM_GETSEL, // message to send
(WPARAM) wParam, // starting position (LPDWORD)
(LPARAM) lParam // ending position (LPDWORD)
);
不过
EM_GETSEL
EM_SETSEL
是鼠标选择的部分字串吧。 光标移动位置哪来划定字串开始与结束范围呢?
(HWND) hWnd, // handle to destination window
EM_GETSEL, // message to send
(WPARAM) wParam, // starting position (LPDWORD)
(LPARAM) lParam // ending position (LPDWORD)
); 其中的hWnd为edit控件的句柄,而调用SendMessage的可以是任何代码