青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

隨筆-145  評論-173  文章-70  trackbacks-0
修改窗口的圖標---------默認的MFC程序是一個MFC的圖標,現(xiàn)在修改為帶有感嘆號的Warning!
修改窗口的背景---------默認的是一個白色背景,修改為黑色。
修改光標------------------默認的是箭頭的光標,這里修改為十字光標,即叉叉。。

設計過程:
            新建一個單文檔的程序,然后在CMainFrame和CView文檔中的PreCreateWindow函數(shù)中添加響應的修改代碼。

代碼如下:

BOOL CMainFrame::PreCreateWindow(CREATESTRUCT
& cs)
{
    
if!CFrameWnd::PreCreateWindow(cs) )
        
return FALSE;
    
// TODO: Modify the Window class or styles here by modifying
    
//  the CREATESTRUCT cs
    cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,0,0,LoadIcon(NULL,IDI_WARNING));

    
return TRUE;
}





BOOL CTest12View::PreCreateWindow(CREATESTRUCT
& cs)
{
    
// TODO: Modify the Window class or styles here by modifying
    
//  the CREATESTRUCT cs
    cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW,LoadCursor(NULL,IDC_CROSS),(HBRUSH)GetStockObject((BLACK_BRUSH)),0);
    
return CView::PreCreateWindow(cs);
}

只要使用的函數(shù)是AfxRegiseterWndClass修改窗口參數(shù)。具體的資料見API函數(shù)。

引申:CMainFrame類包含文件的框架,因此修改圖標的代碼放在該類中。
CXXView類表征了框架之上的視圖,因此,應用程序畫刷和光標的風格設置必須在該類的函數(shù)中。

AfxRegisterWndClass  
LPCTSTR AFXAPI AfxRegisterWndClass( UINT nClassStyle, HCURSOR hCursor 
= 0, HBRUSH hbrBackground = 0, HICON hIcon = 0 ); 

Return Value

null-terminated string containing the class name. You can pass this class name to the Create member function in CWnd or other CWnd-derived classes to create a window. The name is generated by the Microsoft Foundation Class Library.

Note   The 
return value is a pointer to a static buffer. To save this string, assign it to a CString variable. 

Parameters

nClassStyle

Specifies the Windows 
class style or combination of styles, created by using the bitwise-OR (|operatorfor the window class. For a list of class styles, see theWNDCLASS structure in the Win32 SDK documentation. If NULL, the defaults will be set as follows: 

Sets the mouse style to CS_DBLCLKS, which sends 
double-click messages to the window procedure when the user double-clicks the mouse.


Sets the arrow cursor style to the Windows standard IDC_ARROW.


Sets the background brush to NULL, so the window will not erase its background.


Sets the icon to the standard, waving
-flag Windows logo icon. 
hCursor

Specifies a handle to the cursor resource to be installed 
in each window created from the window class. If you use the default of 0, you will get the standard IDC_ARROW cursor.

hbrBackground

Specifies a handle to the brush resource to be installed 
in each window created from the window class. If you use the default of 0, you will have a NULL background brush, and your window will, by default, not erase its background while processingWM_ERASEBKGND.

hIcon

Specifies a handle to the icon resource to be installed 
in each window created from the window class. If you use the default of 0, you will get the standard, waving-flag Windows logo icon.

Remarks

The Microsoft Foundation Class Library automatically registers several standard window classes 
for you. Call this function if you want to register your own window classes.

The name registered 
for a class by AfxRegisterWndClass depends solely on the parameters. If you call AfxRegisterWndClass multiple times with identical parameters, it only registers a class on the first call. Subsequent calls to AfxRegisterWndClass with identical parameters simply return the already-registered classname.

If you call AfxRegisterWndClass 
for multiple CWnd-derived classes with identical parameters, instead of getting a separate window class for each class, each class shares the same window class. This can cause problems if the CS_CLASSDC class style is used. Instead of multiple CS_CLASSDC window classes, you end up with one CS_CLASSDC window class, and all C++ windows that use that class share the same DC. To avoid this problem, call AfxRegisterClass to register the class.

Example

CString strMyClass;

// load stock cursor, brush, and icon for
// my own window class

try
{
   strMyClass 
= AfxRegisterWndClass(
      CS_VREDRAW 
| CS_HREDRAW,
      ::LoadCursor(NULL, IDC_ARROW),
      (HBRUSH) ::GetStockObject(WHITE_BRUSH),
      ::LoadIcon(NULL, IDI_APPLICATION));
}

catch (CResourceException* pEx)
{
      AfxMessageBox(
         _T(
"Couldn't register class! (Already registered?)"));
      pEx
->Delete();
}


posted on 2010-02-16 16:38 deercoder 閱讀(855) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發(fā)表評論。
網(wǎng)站導航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲精品久久久蜜桃| 亚洲午夜精品一区二区三区他趣| 亚洲一区视频| 一本色道88久久加勒比精品 | 日韩视频在线永久播放| 欧美电影免费观看高清| 99视频+国产日韩欧美| 亚洲人成网站在线观看播放| 欧美伦理a级免费电影| 亚洲自啪免费| 欧美一级片在线播放| 亚洲成色www8888| 亚洲精品免费在线| 国产精品九九| 久久久噜噜噜| 女主播福利一区| 亚洲在线1234| 久久亚洲私人国产精品va| 亚洲精品免费在线播放| 国产精品99久久久久久白浆小说| 国产精品自在欧美一区| 免费在线欧美视频| 欧美日韩国产123| 久久精品夜色噜噜亚洲a∨| 久久亚洲精品视频| 亚洲欧美资源在线| 久久免费视频一区| 亚洲欧洲av一区二区| 久久久久久999| 亚洲性感激情| 久久久.com| 亚洲欧美日本视频在线观看| 久久综合成人精品亚洲另类欧美 | 国产欧美 在线欧美| 欧美成人小视频| 国产精品欧美日韩一区| 欧美国产专区| 国产欧美一区二区视频| 亚洲精品视频在线| 在线观看欧美日韩| 亚洲欧美日韩国产综合| 99精品国产高清一区二区| 久久精品国产一区二区三区 | 国产欧美精品日韩精品| 亚洲国产你懂的| 国产在线播放一区二区三区| 日韩一级在线| 日韩天堂在线观看| 久久男人资源视频| 久久精品国产第一区二区三区最新章节 | 麻豆精品视频在线观看| 国产精品美女视频网站| 亚洲精品久久久久久久久久久| 狠狠色狠狠色综合日日91app| 亚洲视频专区在线| 亚洲深夜福利网站| 欧美久久九九| 亚洲国产老妈| 亚洲乱码国产乱码精品精天堂| 久久久亚洲欧洲日产国码αv | 精品动漫一区| 久久精品国产综合| 久久婷婷人人澡人人喊人人爽 | 久久网站热最新地址| 久久久久欧美精品| 国产一区视频在线观看免费| 欧美一区二区成人| 久久国产精品免费一区| 国产欧美一级| 欧美在线999| 久久久久久久综合狠狠综合| 国产一区二区0| 香港久久久电影| 久久人91精品久久久久久不卡| 国产一区清纯| 久久久久久亚洲综合影院红桃 | 久久丁香综合五月国产三级网站| 国产精品丝袜xxxxxxx| 亚洲欧美激情视频| 久久精品国产一区二区三区免费看| 国产欧美精品va在线观看| 欧美在线精品免播放器视频| 裸体素人女欧美日韩| 亚洲国产婷婷| 欧美午夜电影完整版| 午夜视频久久久| 免费精品99久久国产综合精品| 亚洲国产成人porn| 欧美日韩专区| 午夜久久久久| 亚洲国产导航| 午夜精品久久久久久| 一色屋精品亚洲香蕉网站| 免费成人网www| av成人激情| 久久综合五月| 一区二区三区鲁丝不卡| 国产欧美一区二区三区久久人妖| 久久夜色精品亚洲噜噜国产mv| 亚洲激情另类| 久久精品在这里| 亚洲日本久久| 国产精品一级二级三级| 久久五月天婷婷| 亚洲一区二区精品在线观看| 蜜桃av久久久亚洲精品| 亚洲主播在线观看| 亚洲国语精品自产拍在线观看| 欧美无乱码久久久免费午夜一区| 午夜影院日韩| 日韩亚洲在线观看| 欧美成人精品1314www| 亚洲欧美日韩国产中文| 亚洲电影在线免费观看| 国产精品婷婷| 欧美日韩二区三区| 久久天天躁夜夜躁狠狠躁2022| 在线亚洲精品| 亚洲日本中文字幕区| 免费成人你懂的| 久久国产精品99久久久久久老狼 | 国产日韩精品入口| 欧美肉体xxxx裸体137大胆| 老牛影视一区二区三区| 先锋资源久久| 亚洲一区尤物| 一区二区成人精品 | 欧美 日韩 国产精品免费观看| 亚洲女人av| 亚洲视频在线观看视频| 亚洲国产女人aaa毛片在线| 国产手机视频一区二区| 国产精品v日韩精品| 欧美屁股在线| 欧美日本不卡高清| 欧美激情第3页| 欧美国产日产韩国视频| 欧美mv日韩mv亚洲| 免费欧美日韩| 欧美第一黄色网| 欧美成人自拍| 欧美大成色www永久网站婷| 免费成人av在线看| 欧美成人中文字幕| 欧美激情女人20p| 欧美人妖在线观看| 欧美日韩在线精品一区二区三区| 亚洲亚洲精品在线观看 | 合欧美一区二区三区| 国产真实乱偷精品视频免| 国产婷婷色一区二区三区| 国产精品一区二区你懂得| 国产精品影片在线观看| 国产精品女主播| 国产欧美日韩在线 | 欧美系列亚洲系列| 国产精品成人观看视频免费 | 欧美国产欧美亚洲国产日韩mv天天看完整 | 黄色成人免费观看| 亚洲福利视频专区| 日韩午夜电影在线观看| 亚洲午夜激情网站| 欧美一区二区高清在线观看| 久久久久国产精品厨房| 免费日本视频一区| 亚洲日本免费| 亚洲尤物精选| 久久久精品国产一区二区三区| 久久久久五月天| 欧美另类一区| 国产伦精品一区二区三区视频黑人| 国产一区二区三区日韩| 亚洲精品国产日韩| 午夜精品久久久久久久久久久久 | 亚洲国内精品| 亚洲香蕉视频| 免播放器亚洲一区| 日韩一二三区视频| 久久国产精品一区二区三区四区| 免费成人高清| 国产精品一区二区女厕厕| 亚洲高清成人| 午夜精品久久久久久久白皮肤| 开心色5月久久精品| 亚洲作爱视频| 久久久久久久一区二区三区| 欧美视频在线播放| 亚洲电影观看| 性一交一乱一区二区洋洋av| 欧美成人精品一区二区| 亚洲小说区图片区| 欧美成人r级一区二区三区| 国产美女一区二区| 一区二区三区.www| 欧美福利一区二区| 久久精品夜色噜噜亚洲aⅴ| 国产精品国产三级国产专区53| 好吊妞**欧美| 午夜精品影院| 99综合电影在线视频|