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

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

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

代碼如下:

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類包含文件的框架,因此修改圖標(biāo)的代碼放在該類中。
CXXView類表征了框架之上的視圖,因此,應(yīng)用程序畫刷和光標(biāo)的風(fēng)格設(shè)置必須在該類的函數(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 閱讀(849) 評論(0)  編輯 收藏 引用

只有注冊用戶登錄后才能發(fā)表評論。
網(wǎng)站導(dǎo)航: 博客園   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>
            久久综合999| 日韩天堂av| 午夜免费日韩视频| 一区二区三区高清不卡| 国产精品高潮呻吟久久av无限| 日韩亚洲精品在线| 一本色道久久综合狠狠躁的推荐| 欧美日韩在线一区二区三区| 亚洲网站在线| 性视频1819p久久| 一区二区三区在线免费视频| 亚洲丰满在线| 欧美日韩日日夜夜| 欧美一区二区精品久久911| 久久av最新网址| 亚洲欧洲日本国产| 99这里只有精品| 国内精品久久久久久影视8 | 亚洲欧洲另类| 亚洲精选成人| 狠狠久久综合婷婷不卡| 欧美激情国产精品| 国产精品每日更新在线播放网址| 久久久国产午夜精品| 欧美精品二区三区四区免费看视频| 亚洲视频福利| 久久嫩草精品久久久久| 一区二区三区波多野结衣在线观看| 亚洲一级二级| 亚洲精品久久嫩草网站秘色| 亚洲视频在线视频| 国产综合色一区二区三区| 亚洲日本视频| 黄色日韩在线| 亚洲另类在线一区| 亚洲精品一二| 亚洲一区欧美二区| 国内精品久久久久影院 日本资源| 欧美专区在线观看| 亚洲国产一区二区在线| 一区二区三区高清在线观看| 国产精品久久久久久久第一福利| 亚洲一二三级电影| 免费看黄裸体一级大秀欧美| 亚洲麻豆视频| 黄色一区二区在线观看| 欧美午夜久久| 欧美承认网站| 久久国产精品色婷婷| 夜夜嗨av一区二区三区四区| 一区二区亚洲精品| 国产精品福利影院| 欧美日韩高清在线播放| 午夜精品久久久久久久男人的天堂 | 99国产精品自拍| 久久精品一区二区三区中文字幕| 亚洲永久免费视频| 欧美日韩精品福利| 亚洲精品一区二区三区av| 亚洲国产精品一区二区三区| 欧美一区二区在线| 欧美尤物一区| 国产九九视频一区二区三区| 亚洲自拍偷拍视频| 亚洲欧美春色| 国产精品久久久久久妇女6080 | 香蕉久久久久久久av网站| 亚洲欧美中文另类| 国产精品裸体一区二区三区| 中日韩男男gay无套| 亚洲一区区二区| 国产精品狠色婷| 亚洲欧美国产三级| 久久精品人人做人人爽电影蜜月| 国产精品中文在线| 性欧美video另类hd性玩具| 欧美在线精品免播放器视频| 国产美女精品| 久久久久国内| 欧美激情欧美狂野欧美精品| 亚洲日本中文| 欧美日韩另类综合| 亚洲欧美久久久久一区二区三区| 欧美伊人久久大香线蕉综合69| 国产手机视频一区二区| 久久精品一级爱片| 亚洲黄色高清| 一区二区三区四区五区在线| 亚洲永久在线观看| 国产精品激情| 欧美一级一区| 亚洲电影在线观看| 亚洲天堂免费观看| 国产欧美一区二区视频| 久久久亚洲精品一区二区三区| 欧美激情综合色| 亚洲一区二区精品在线| 国产一区二区三区精品久久久| 开元免费观看欧美电视剧网站| 亚洲国产精品ⅴa在线观看 | 亚洲国产美女| 欧美日韩在线播放三区四区| 欧美一区二区三区啪啪| 欧美国产在线观看| 亚洲欧美日本日韩| 亚洲高清视频在线观看| 欧美日韩视频不卡| 久久国产精品亚洲77777| 亚洲精品三级| 久热综合在线亚洲精品| 夜夜躁日日躁狠狠久久88av| 国产一区欧美日韩| 欧美日韩三级一区二区| 久久夜色精品国产| 亚洲一区二区视频在线| 亚洲高清视频在线| 久久这里有精品视频| 亚洲欧美日韩久久精品| 亚洲精品一区二区三区樱花| 国产色产综合产在线视频| 欧美日本三级| 香蕉成人伊视频在线观看| 亚洲激情精品| 激情成人亚洲| 国产精品夜夜夜一区二区三区尤| 欧美成人a∨高清免费观看| 先锋资源久久| 亚洲欧美在线aaa| 亚洲久久一区| 亚洲经典在线看| 欧美黄色片免费观看| 久热综合在线亚洲精品| 久久狠狠一本精品综合网| 亚洲视频图片小说| 日韩亚洲欧美在线观看| 亚洲另类在线视频| 亚洲精品美女91| 激情久久久久久| 国内精品视频在线播放| 国产一区二区三区久久| 国产一区二区剧情av在线| 国产精品久久久久久久7电影| 欧美日韩一二区| 欧美极品在线播放| 欧美精品在线观看播放| 欧美高清在线一区| 免费观看日韩| 欧美国产欧美亚洲国产日韩mv天天看完整 | 亚洲国产成人在线视频| 欧美成人综合一区| 欧美丰满少妇xxxbbb| 美女诱惑一区| 欧美激情按摩| 亚洲日本中文字幕| 日韩亚洲精品视频| 亚洲午夜激情网页| 欧美一区二区精品| 久久深夜福利| 欧美精品日韩三级| 国产精品高精视频免费| 国产精品视频精品| 激情综合视频| 亚洲精选国产| 先锋影院在线亚洲| 欧美91大片| 亚洲精品在线免费观看视频| 亚洲性夜色噜噜噜7777| 午夜欧美大尺度福利影院在线看| 欧美制服第一页| 欧美大片在线观看一区二区| 欧美日韩一本到| 狠狠爱www人成狠狠爱综合网| 精品成人在线观看| 亚洲三级电影全部在线观看高清| 亚洲视频免费在线观看| 久久精品国产91精品亚洲| 久久久精彩视频| 亚洲高清激情| 小黄鸭视频精品导航| 久久只有精品| 国产精品久久久久av| 亚洲国产精品电影| 欧美一区二区三区免费观看| 欧美77777| 亚洲欧美日韩国产一区| 六月婷婷一区| 国产嫩草一区二区三区在线观看| 在线成人黄色| 亚洲欧美中文在线视频| 免费在线成人av| 亚洲男同1069视频| 欧美精品久久久久久久免费观看| 国产日韩av高清| 日韩一区二区高清| 麻豆久久精品| 亚洲伊人久久综合| 欧美视频日韩视频| 亚洲激情av在线| 久久久综合精品| 亚洲综合精品|