共 14 篇文章 |
|
CWnd::RedrawWindow(示例,出错代码)CWnd::RedrawWindow.BOOL RedrawWindow( LPCRECT lpRectUpdate = NULL, CRgn* prgnUpdate = NULL, UINT flags = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );必须同时指定RDW_INVALIDATE标志,否则RDW_FRAME标志将没有效果。如果有必要,则在函数返回前使涉及的窗口(如RDW_ALLCHILDREN... 阅376 转0 评0 公众公开 15-09-05 22:22 |
RedrawWindow(NULL, NULL, RDWCWnd::RedrawWindowBOOL RedrawWindow( LPCRECT lpRectUpdate = NULL, CRgn* prgnUpdate = NULL, UINT flags = RDW_INVALIDATE | RDW_UPDATENOW | RDW_ERASE );RDW_NOFRAME 禁止任何未处理的WM_NCPAINT消息。RDW_UPDATENOW 如果有必要,则在函数返回前使涉及的窗口(如RDW_ALLCHILDREN和RDW_NOCHI... 阅250 转0 评0 公众公开 15-09-05 21:46 |
UpdateData、Invalidate、InvalidateRect和UpdateWindow及RedrawWindow.而WM_PAINT是由系统进行维护的,每当CWnd的更新区域不为空,并且在应用程序的窗口消息队列中没有其它消息时,Windows就发送一条WM_PAINT消息。如果调用 InvalidateRect 后不调用UpdateWindow,则系统会自动在窗口消息队列为空的时候,系统自动发送一WM_PAINT消息。强制刷... 阅20 转0 评0 公众公开 15-09-05 21:45 |
打开文件对话框const char pszFilter[] = _T("EXE File (*.txt)|*.txt|All Files (*.*)|*.*||");CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, pszFilter, this);dlg.m_ofn.lpstrInitialDir = "c:\\WINDOWS\\";CString strFilePath = dlg.目录选择对话框 BROWSEINFO bi; char szPathName[M... 阅132 转0 评0 公众公开 15-09-05 21:09 |
VC 完美界面更换皮肤解决方案。然后添加VclSkin里边的ImgUtil.pas,SkinRead.pas,WinConvert.pas,WinSkinCollection.pas,WinSkinData.pas,WinSkinDlg.pas,WinSkinForm.pas,WinSkinIni.pas,Winskinmenu.pas,WinSkinStore.pas,WinSubClass.pas文件到工程中。四、调用方法创建VC工程SkinTest,VC的创建就不具体介绍了,添加代码如下:在... 阅965 转2 评0 公众公开 15-09-05 20:55 |
c++ string 与 数字之间的转换。2: //功能:C++ string 转 int.13: Type stringToNum(const string& str)21: int main(int argc, char* argv[])23: string str("00801");24: cout <<stringToNum<int>(str) <<endl;itoa( int value, char *string, int radix );第一个参数:你要转化的int; 第二个参... 阅290 转3 评0 公众公开 15-09-05 15:44 |
C++ string转char*string 是c++标准库里面其中一个,封装了对字符串的操作 把string转换为char* 有3中方法: 1。string str="abc";char *p=str.data();2.c_str 如:string str="gdfd"; char *p=str.c_str(); 3 copy 比如。string str="hello";char p[40];str.copy(p,5,0);//这里5,代表复制几个字符,0代... 阅73 转1 评0 公众公开 15-09-05 15:43 |
下面来介绍和regex_match()很像的regex_search()的使用实例,regex_match()要求正则表达式必须与模式串完全匹配,regex_search()只要求存在匹配项就可以。const std::tr1::regex pattern("(\\w+day)");std::cout <<result[i] <<std::endl;std::cout<<std::endl;std::cout <<*i <<std::endl;std::strin... 阅11 转0 评0 公众公开 15-09-05 13:33 |
bool is_email_valid(const std::string& email)std::cout <<email1 <<": "<<(is_email_valid(email1) ?std::cout <<email2 <<": "<<(is_email_valid(email2) ?std::cout <<email3 <<": "<<(is_email_valid(email3) ?std::cout <<email4 <&... 阅20 转0 评0 公众公开 15-09-05 13:32 |
template <class charT,class Allocator, class traits> bool regex_search( const charT* str, match_results<const charT*,Allocator>& m, const basic_regex<charT,traits >&e, match_flag_type flags = match_default);c) typedef regex_token_iterator<string::const_iterator> s... 阅15 转0 评0 公众公开 15-09-05 13:32 |