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

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

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

代碼如下:

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);
}

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

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

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)  編輯 收藏 引用

只有注冊用戶登錄后才能發表評論。
網站導航: 博客園   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>
            亚洲一区视频| 久久九九国产精品怡红院| 欧美国产91| 亚洲精品综合在线| 亚洲国产cao| 欧美日韩日本网| 亚洲女人天堂成人av在线| 国产精品99久久久久久久vr| 国产精品丝袜白浆摸在线| 欧美一区二区性| 久久视频这里只有精品| 91久久极品少妇xxxxⅹ软件| 亚洲精品国产精品国自产观看 | 欧美一区观看| 久久精品亚洲一区二区| 亚洲国产精品激情在线观看| 亚洲国产日韩欧美| 国产精品高精视频免费| 欧美在线免费观看| 免费在线观看精品| 亚洲免费在线播放| 久久精品1区| 一区二区激情小说| 性欧美暴力猛交69hd| 亚洲福利在线视频| 亚洲天堂免费观看| 亚洲电影自拍| 亚洲综合精品自拍| 亚洲精品日韩综合观看成人91| 亚洲美女黄网| 伊人久久大香线蕉综合热线| 亚洲七七久久综合桃花剧情介绍| 国产精品午夜国产小视频| 欧美成人情趣视频| 国产麻豆综合| 亚洲精品久久久蜜桃| 国产亚洲欧美在线| 亚洲视频在线免费观看| 亚洲另类一区二区| 久久精品国产亚洲aⅴ| 亚洲一区在线观看免费观看电影高清| 欧美中文字幕不卡| 先锋影院在线亚洲| 欧美日本亚洲| 欧美激情一区二区三区| 国产亚洲综合精品| 中文国产一区| 在线亚洲一区| 欧美日韩1234| 亚洲国产精品成人精品| 在线观看国产精品网站| 亚洲欧美日韩综合国产aⅴ| 日韩一级不卡| 欧美电影电视剧在线观看| 久久久久久网址| 国产视频一区在线| 亚洲一区二区三区777| 亚洲调教视频在线观看| 欧美精品激情| 亚洲精品一区二区网址| 亚洲精品一区二区三区在线观看| 久久精品夜色噜噜亚洲aⅴ| 久久精品观看| 国产在线不卡| 久久久久久久综合| 老鸭窝91久久精品色噜噜导演| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲精品看片| 麻豆成人精品| 亚洲国产激情| 99国产精品久久久久久久久久| 美女图片一区二区| 亚洲黄色大片| 亚洲性感激情| 国产精品亚洲产品| 欧美在线视频不卡| 免费欧美日韩| 日韩一区二区精品视频| 欧美日韩一区在线观看| 在线午夜精品| 久久精品国产综合精品| 韩国福利一区| 免费人成网站在线观看欧美高清| 欧美福利视频在线| 在线视频日韩| 国产日韩成人精品| 久久中文在线| 日韩系列在线| 欧美伊人久久久久久久久影院| 国产色婷婷国产综合在线理论片a| 午夜亚洲影视| 亚洲国产日韩欧美一区二区三区| 99精品视频免费全部在线| 国产精品福利在线观看| 久久黄金**| 亚洲日韩视频| 久久精品国产免费| 亚洲精品视频啊美女在线直播| 欧美日韩精品在线播放| 久久国产精品久久久久久电车| 欧美激情亚洲自拍| 欧美亚洲免费电影| 亚洲人成人99网站| 国产精品夜色7777狼人 | 亚洲人午夜精品免费| 亚洲一区在线视频| 在线精品高清中文字幕| 国产精品久久国产三级国电话系列| 亚洲影院免费观看| 亚洲国产精品一区二区www在线 | 一级日韩一区在线观看| 国产一区二区久久久| 欧美护士18xxxxhd| 久久爱另类一区二区小说| 亚洲精品永久免费精品| 久久久久久穴| 午夜精品美女久久久久av福利| 在线看日韩av| 国产一区二区三区免费不卡 | 欧美少妇一区| 免费的成人av| 久久精品国产亚洲aⅴ| 亚洲深夜av| 亚洲精品一区二区在线| 免费不卡在线观看av| 欧美在线免费视频| 一区二区三区欧美| 亚洲日本中文字幕| 亚洲福利国产| 伊人久久综合| 狠狠色综合网| 国产一区二三区| 国产欧美日韩综合一区在线播放 | 蜜臀va亚洲va欧美va天堂| 校园激情久久| 亚洲永久精品大片| 亚洲少妇最新在线视频| 亚洲精品小视频| 亚洲激情电影在线| 亚洲国产视频直播| 亚洲福利视频在线| 欧美激情视频一区二区三区在线播放 | 久久国产精品一区二区三区四区| 中文精品视频一区二区在线观看| 亚洲欧洲三级| 亚洲美女尤物影院| 99av国产精品欲麻豆| 亚洲精品一区中文| aa日韩免费精品视频一| 99一区二区| 亚洲一区二区三区精品在线 | 伊人成人在线视频| 在线看视频不卡| 亚洲国产va精品久久久不卡综合| 影院欧美亚洲| 亚洲精品免费一二三区| 99精品视频一区| 亚洲无玛一区| 欧美中文在线观看| 久久夜色精品国产欧美乱极品| 久久中文字幕导航| 欧美激情久久久久久| 亚洲精品视频在线播放| 一本色道久久88精品综合| 亚洲在线日韩| 欧美在线视频免费播放| 理论片一区二区在线| 欧美精品一区二区三区在线播放 | 午夜视黄欧洲亚洲| 欧美在线观看一区| 免费观看在线综合色| 亚洲精品乱码久久久久久蜜桃麻豆 | 一区二区三区免费网站| 性色av香蕉一区二区| 久久综合伊人77777麻豆| 亚洲国产美女| 午夜免费久久久久| 欧美福利在线| 国产欧美视频一区二区| 亚洲黄色免费| 亚洲第一狼人社区| 一区二区三区四区五区在线| 欧美一区影院| 欧美女同视频| 黄色免费成人| 亚洲一区日韩在线| 免费欧美视频| 亚洲淫片在线视频| 欧美精品电影在线| 国产日韩欧美视频| 一本色道久久综合狠狠躁篇怎么玩| 欧美一区二区三区啪啪| 亚洲国产天堂久久国产91| 亚洲欧美日本视频在线观看| 欧美成年人视频网站| 国产在线观看91精品一区| 亚洲一级一区| 最新国产拍偷乱拍精品| 久久久91精品| 国产偷国产偷精品高清尤物|