摘要: tr1正则表达式匹配中文转化为unicode,如果非unicode,才能用^topo-[\\d]{1,4}_[\\w\u4E00-\u9FA5]+$ 匹配多字节的 不知道是哪个 阅读全文
posted @ 2012-12-12 14:43 happyboy2 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 转自 http://blog.csdn.net/yuanjilai/article/details/7522985[cpp] view plaincopyprint?voidCmyqeDlg::OnSize(UINTnType,intcx,intcy){CDialog::OnSize(nType,cx,cy);if(nType!=SIZE_MINIMIZED){if(me)//判断是否为空,因为对话框创建时会调用此函数,而当时控件还未创建 {CRectrt;me.GetWindowRect(&rt);ScreenToClient(&rt);me.MoveWindow(rt.le 阅读全文
posted @ 2012-09-15 16:29 happyboy2 阅读(493) 评论(0) 推荐(0) 编辑
摘要: 下载scite编译 发现支持批量块注释功能,查看scite源码,SciTEBase.cxx文件的StartBlockComment() 函数引用了SString 类,而SString 的成员函数在 PropSetFile.cxx 函数中定义将PropSetFile.cxx 重命名为SString.cpp,去掉与SString 无关的定义,包含文件保留#include "StdAfx.h"#include "SString.h"#include <sstream>将 wEditor.Call 修改为SendMessage去掉StartBlock 阅读全文
posted @ 2012-08-07 16:45 happyboy2 阅读(1701) 评论(0) 推荐(0) 编辑
摘要: GetModuleFileName(GetModuleHandle(NULL),szModePath,256);Tcl_FindExecutable(szModePath);设置可执行路径,给load 等参数使用 阅读全文
posted @ 2012-07-22 16:47 happyboy2 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1. 传递的是 子类的指针2. 如果子类有,则用子类的,子类没有,则用父类的 阅读全文
posted @ 2012-07-22 15:25 happyboy2 阅读(120) 评论(0) 推荐(0) 编辑
摘要: //Point.hclass Point{public:int x;int y;void output();void output(int x,int y);};//Point.cpp#include "Point.h"#include "iostream.h"void main(){Point pt;pt.x=5;pt.y=6;pt.output(3,5);pt.output();}void Point::output(){cout<<x<<endl<<y<<endl;cout.operator < 阅读全文
posted @ 2012-07-22 10:36 happyboy2 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 注册快捷键 函数BOOL WINAPI RegisterHotKey( __in_optHWND hWnd, __inint id, __inUINT fsModifiers, __inUINT vk);The keys that must be pressed in combination with the key specified by the uVirtKey parameter in order to generate the WM_HOTKEY message. The fsModifiers parameter can be a combination of the follow 阅读全文
posted @ 2012-07-19 19:29 happyboy2 阅读(8414) 评论(0) 推荐(0) 编辑
摘要: 在VC/MFC编程中,可以为程序定义自己的全局快捷键,如不管在任何地方按下Ctrl+Alt+Z即可显示QQ窗口。1、注册快捷键在初始化函数,如OnInitDialog() 注册快捷键,代码如下:BOOL CDlgCloseProSetup::OnInitDialog() {CDialog::OnInitDialog();// TODO: Add extra initialization here::RegisterHotKey(m_hWnd,199,MOD_CONTROL,'Z');return TRUE; // return TRUE unless you set the f 阅读全文
posted @ 2012-07-19 19:25 happyboy2 阅读(272) 评论(0) 推荐(0) 编辑
摘要: SendMessage(hWnd, WM_SYSCOMMAND, (WPARAM)SC_RESTORE, NULL)如果是子窗口::SendMessage(m_pWebDlg->m_hWnd, WM_SYSCOMMAND, (WPARAM)SC_RESTORE, NULL);m_pWebDlg 为子窗口对象的指针 阅读全文
posted @ 2012-07-19 11:34 happyboy2 阅读(607) 评论(0) 推荐(0) 编辑
摘要: 通常你要先建立(OnCreate)一个窗体, 然后再对他进行初始化(OninitDialog). 响应WM_CREATE消息(即OnCreate)的时候窗口还没有建立,你可以给成员变量赋值,也可以修改窗口的基本内容比如风格,但是不能对窗口控件操作,因为窗口还没有建立。 在响应WM_CREATE消息的时候,对话框及子控件还未创建完成,亦是说只是通知系统说要开始创建窗口啦,这个消息响应完之后,对话框和子控件才开始创建。因此在此消息响应函数中无法对控件进行修改和初始化。 响应WM_INITDIALOG消息(即OnInitDialog)时候窗口已经建立,你可以移动窗口,修改风格等等,也可以给成... 阅读全文
posted @ 2012-07-12 19:48 happyboy2 阅读(371) 评论(0) 推荐(0) 编辑