host-2008

导航

2014年4月10日

C++——CString用法大全

摘要: 列表形式的如下:CString的构造函数CString( );例:CString csStr;CString( const CString& stringSrc );例:CString csStr("ABCDEF中文123456");CString csStr2(csStr);CString( TCHAR ch, int nRepeat = 1 );例:CString csStr('a',5);//csStr="aaaaa"CString( LPCTSTR lpch, int nLength );例:CString csStr(& 阅读全文

posted @ 2014-04-10 09:39 夜来风雨香 阅读(5128) 评论(0) 推荐(0) 编辑

C++ 如何有效地使用对话框

摘要: Q:如何在对话框中加入工具条在 OnInitDialog 中加入下面代码:BOOL CYourDlg::OnInitDialog(){ CDialog::OnInitDialog(); // Create the toolbar. To understand the meaning of the styles used, you // can take a look at the MSDN for the Create function of the CToolBar class. ToolBar.Create(this, WS_CHILD | WS_VISIBLE | CBRS_TOP | 阅读全文

posted @ 2014-04-10 09:38 夜来风雨香 阅读(456) 评论(0) 推荐(0) 编辑

VC让对话框显示就最大化

摘要: 方法一:在OnInitDialog()函数中ShowWindow(SW_SHOWMAXIMIZED);初始化的时候方法二:当然,你可以获取屏幕大小,然后设置窗口位置/大小//ShowWindow(SW_MAXIMIZE);// 获得屏幕分辨率HDC hDesktopDC = CreateDC(_T("DISPLAY"), NULL, NULL, NULL);int xScrn = GetDeviceCaps(hDesktopDC, HORZRES);int yScrn = GetDeviceCaps(hDesktopDC, VERTRES);MoveWindow(0, 0, 阅读全文

posted @ 2014-04-10 09:37 夜来风雨香 阅读(410) 评论(0) 推荐(0) 编辑