子类化Firefox窗口下的Dialog下的EditControl
来源:互联网 发布:我要开淘宝网店 编辑:程序博客网 时间:2024/06/06 01:47
没错,你绝对没看错,是VC,在经过了选型、编译不过、再选型、库引用、链接、编译通过、写注册表、浏览器交互、ATL陷阱、CLR陷阱、MFC陷阱、找指针、绘图、定位资源、32位字符处理、父子窗口、消息传递等九九八十一道劫难后终于通过子类化让控件成功跑通了。
LRESULT APIENTRY EditBoxProc(
HWND hwndDlg,UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
HWND hwndEdit;
switch(uMsg)
{
case WM_INITDIALOG:
// Retrieve the handle to the edit control.
hwndEdit = GetDlgItem(hwndDlg, ID_EDIT);
// Subclass the edit control.
wpOrigEditProc = (WNDPROC) SetWindowLong(hwndEdit,
GWL_WNDPROC, (LONG) EditSubclassProc);
//
// Continue the initialization procedure.
//
return TRUE;
case WM_DESTROY:
// Remove the subclass from the edit control.
SetWindowLong(hwndEdit, GWL_WNDPROC,
(LONG) wpOrigEditProc);
//
// Continue the cleanup procedure.
//
break;
}
return FALSE;
UNREFERENCED_PARAMETER(lParam);
}
// Subclass procedure
LRESULT APIENTRY EditSubclassProc(
HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam)
{
if (uMsg == WM_GETDLGCODE)
return DLGC_WANTALLKEYS;
return CallWindowProc(wpOrigEditProc, hwnd, uMsg,
wParam, lParam);
}
现在就剩兼容chrome和打包下载运行了,我容易吗。
- 子类化Firefox窗口下的Dialog下的EditControl
- Windows下子类化目标窗口的方法
- Android中修改Dialog下的窗口变暗的问题解决
- 如何使cxGrid组件Column的Properties属性在浏览状态下不显示EditControl
- 解决Activity dialog模式下,出现的 小窗口问题:
- SDK学习了下窗口子类化
- Android下的Dialog
- firefox下的httpwatch
- firefox 下的 javascript
- Firefox下的坐标
- firefox下的插件
- Win32的窗口子类化
- MFC获取editcontrol的值
- Linux下的dialog工具
- Linux下的dialog工具
- Firefox下的重复Load
- Firefox下Clipboard的读写
- FireFox下的JS操作
- OCCI编程介绍
- Delphi打开外部程序或文件
- 索引——位图索引
- Java URLConnection 总结
- linux中安装fcitx输入法
- 子类化Firefox窗口下的Dialog下的EditControl
- 2012—07—12 单链表
- zend framework 框架中自定义父控制器
- Kettle插件开发(Job)
- mapreduce程序编写注意事项
- Linux下反编译APK获取java代码和资源文件
- ss2h实现Excel下载
- ShellExecute的各种用法
- cout 输出格式控制 还是要注意点