亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? simple_window.html

?? This tutorial attempts to get you started developing with the Win32 API as quickly and clearly as po
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<HTML><LINK HREF="style.css" REL="STYLESHEET" TYPE="text/css"><HEAD><TITLE>Tutorial: A Simple Window</TITLE></HEAD><BODY><FONT SIZE="-1">[ <A HREF="./index.html">contents</A>| <A HREF="http://www.winprog.org/">#winprog</A>]</FONT><HR><H1>A Simple Window</H1><P>Example: simple_window</P><IMG SRC="images/simple_window.gif" ALT="[images/simple_window.gif]" ALIGN="right">Sometimes people come on IRC and ask "How do I make a window?"...Well it's notentirely that simple I'm afraid.  It's not difficult once you know what you'redoing but there are quite a few things you need to do to get a window to show up;  Andthey're more than can be simply explained over a chat room, or a quick note.<P>I always liked to do things first and learn them later...so here is the code toa simple window which will be explained shortly.<PRE CLASS="LIST">#include &lt;windows.h&gt;const char g_szClassName[] = "myWindowClass";// Step 4: the Window ProcedureLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){    switch(msg)    {        case WM_CLOSE:            DestroyWindow(hwnd);        break;        case WM_DESTROY:            PostQuitMessage(0);        break;        default:            return DefWindowProc(hwnd, msg, wParam, lParam);    }    return 0;}int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,    LPSTR lpCmdLine, int nCmdShow){    WNDCLASSEX wc;    HWND hwnd;    MSG Msg;    //Step 1: Registering the Window Class    wc.cbSize        = sizeof(WNDCLASSEX);    wc.style         = 0;    wc.lpfnWndProc   = WndProc;    wc.cbClsExtra    = 0;    wc.cbWndExtra    = 0;    wc.hInstance     = hInstance;    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);    wc.lpszMenuName  = NULL;    wc.lpszClassName = g_szClassName;    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);    if(!RegisterClassEx(&wc))    {        MessageBox(NULL, "Window Registration Failed!", "Error!",            MB_ICONEXCLAMATION | MB_OK);        return 0;    }    // Step 2: Creating the Window    hwnd = CreateWindowEx(        WS_EX_CLIENTEDGE,        g_szClassName,        "The title of my window",        WS_OVERLAPPEDWINDOW,        CW_USEDEFAULT, CW_USEDEFAULT, 240, 120,        NULL, NULL, hInstance, NULL);    if(hwnd == NULL)    {        MessageBox(NULL, "Window Creation Failed!", "Error!",            MB_ICONEXCLAMATION | MB_OK);        return 0;    }    ShowWindow(hwnd, nCmdShow);    UpdateWindow(hwnd);    // Step 3: The Message Loop    while(GetMessage(&Msg, NULL, 0, 0) > 0)    {        TranslateMessage(&Msg);        DispatchMessage(&Msg);    }    return Msg.wParam;}</PRE>For most part this is the simplest windows program you can write that actuallycreates a functional window, a mere 70 or so lines.  If you got the first exampleto compile then this one should work with no problems.<H2>Step 1: Registering the Window Class</H2>A <I>Window Class</I> stores information about a type of window, including it's <I>Window Procedure</I> which controls the window, the small and large icons for the window, and the background color.  This way, you can register a class once, and createas many windows as you want from it, without having to specify all those attributes overand over.  Most of the attributes you set in the window class can be changed on a per-windowbasis if desired.<P>A Window Class has NOTHING to do with C++ classes.<PRE CLASS="SNIP">const char g_szClassName[] = "myWindowClass";</PRE>The variable above stores the name of our window class, we will use it shortly to register our window class with the system.<PRE CLASS="SNIP">    WNDCLASSEX wc;</PRE><PRE CLASS="SNIP">    wc.cbSize        = sizeof(WNDCLASSEX);    wc.style         = 0;    wc.lpfnWndProc   = WndProc;    wc.cbClsExtra    = 0;    wc.cbWndExtra    = 0;    wc.hInstance     = hInstance;    wc.hIcon         = LoadIcon(NULL, IDI_APPLICATION);    wc.hCursor       = LoadCursor(NULL, IDC_ARROW);    wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);    wc.lpszMenuName  = NULL;    wc.lpszClassName = g_szClassName;    wc.hIconSm       = LoadIcon(NULL, IDI_APPLICATION);    if(!RegisterClassEx(&wc))    {        MessageBox(NULL, "Window Registration Failed!", "Error!",            MB_ICONEXCLAMATION | MB_OK);        return 0;    }</PRE><P>This is the code we use in <CODE>WinMain()</CODE> to register our window class. We fill out the members of a <CODE>WNDCLASSEX</CODE> structure and call <CODE>RegisterClassEx()</CODE>.     <P>The members of the struct affect the window class as follows:<DL><DT><CODE>cbSize</CODE><DD>The size of the structure.<DT><CODE>style</CODE><DD>Class Styles (<CODE>CS_*</CODE>), not to be confused with Window Styles (<CODE>WS_*</CODE>)  This can usually be set to <CODE>0</CODE>.<DT><CODE>lpfnWndProc</CODE><DD>Pointer to the window procedure for this window class.<DT><CODE>cbClsExtra</CODE><DD>Amount of extra data allocated for this class in memory.  Usually <CODE>0</CODE>.<DT><CODE>cbWndExtra</CODE><DD>Amount of extra data allocated in memory <I>per window</I> of this type. Usually <CODE>0</CODE>.<DT><CODE>hInstance</CODE><DD>Handle to application instance (that we got in the first parameter of <CODE>WinMain()</CODE>).<DT><CODE>hIcon</CODE><DD>Large (usually 32x32) icon shown when the user presses Alt+Tab.<DT><CODE>hCursor</CODE><DD>Cursor that will be displayed over our window.<DT><CODE>hbrBackground</CODE><DD>Background <I>Brush</I> to set the color of our window.<DT><CODE>lpszMenuName</CODE><DD>Name of a menu resource to use for the windows with this class.<DT><CODE>lpszClassName</CODE><DD>Name to identify the class with.<DT><CODE>hIconSm</CODE><DD>Small (usually 16x16) icon to show in the taskbar and in the top left corner of the window.</DL>Don't worry if that doesn't make much sense to you yet, the various parts thatcount will be explained more later.  Another thing to remember is to not tryand remember this stuff.  I rarely (never) memorize structs, or function parameters,this is a waste of effort and, more importantly, time.  If you know the functions you needto call then it is a matter of seconds to look up the exact parameters in yourhelp files.  If you don't have help files, get them.  You are lost without.Eventually you will come to know the parameters to the functions you use most.<P>We then call <CODE>RegisterClassEx()</CODE> and check for failure, if it fails we pop up a messagewhich says so and abort the program by returning from the <CODE>WinMain()</CODE> function.<H2>Step 2: Creating the Window</H2><P>Once the class is registered, we can create a window with it.  You should lookup the paramters for <CODE>CreateWindowEx()</CODE> (as you should ALWAYS do when using a new API call), but I'll explain them briefly here.<PRE CLASS="SNIP">    HWND hwnd;</PRE><PRE CLASS="SNIP">    hwnd = CreateWindowEx(

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产福利一区二区三区视频在线 | 奇米影视7777精品一区二区| 日本福利一区二区| 国产精品美女久久久久久久久| 亚洲成av人片在线观看| 欧美日韩国产一级| 热久久一区二区| 久久日韩精品一区二区五区| 国产二区国产一区在线观看| 国产日韩av一区二区| 99久久国产免费看| 亚洲激情网站免费观看| 欧美日韩国产综合一区二区三区 | 日韩av网站免费在线| 精品久久一区二区三区| 国产精品影音先锋| 18成人在线视频| 欧美色网一区二区| 婷婷开心激情综合| 欧美成人在线直播| 成人一区二区三区视频| 亚洲夂夂婷婷色拍ww47| 日韩免费电影一区| 成人国产精品免费观看动漫| 一区二区三区四区蜜桃| 日韩一区国产二区欧美三区| 国产91精品一区二区麻豆网站| 欧美一区国产二区| 国内一区二区在线| 一区二区中文字幕在线| 欧美日韩久久一区二区| 国模大尺度一区二区三区| 中文字幕av在线一区二区三区| 午夜视黄欧洲亚洲| 久久影音资源网| 91免费国产在线| 亚洲成av人**亚洲成av**| 久久伊人蜜桃av一区二区| 91亚洲精品一区二区乱码| 日韩二区三区四区| 中文字幕精品在线不卡| 欧美日本乱大交xxxxx| 国产一区999| 亚洲成人在线观看视频| 久久久噜噜噜久久人人看| 欧美亚洲日本一区| 国产精品一区二区无线| 亚洲最大色网站| 久久精品水蜜桃av综合天堂| 亚洲第一福利一区| 亚洲日本va在线观看| 欧美午夜一区二区三区| 国产一区久久久| 亚洲成a人片综合在线| 国产精品天天看| 欧美一级xxx| 色就色 综合激情| 韩国av一区二区三区四区 | 成年人午夜久久久| 日韩国产欧美视频| 中国av一区二区三区| 91精品国产色综合久久ai换脸 | 成年人网站91| 久久只精品国产| 日本va欧美va欧美va精品| 欧美日韩国产美| 亚洲激情中文1区| 91小视频在线| 日韩美女视频一区| eeuss鲁片一区二区三区在线看| 一本大道久久精品懂色aⅴ| 国产亚洲女人久久久久毛片| 韩国三级中文字幕hd久久精品| 九一久久久久久| 日韩精品中文字幕一区二区三区| 欧美国产一区在线| 国产麻豆视频一区| 久久综合色天天久久综合图片| 亚洲欧美aⅴ...| 色婷婷综合视频在线观看| 亚洲精品国产成人久久av盗摄| 久久国产精品99久久人人澡| 日韩欧美一区中文| 蜜桃久久av一区| 欧美一区二区视频观看视频| 麻豆成人免费电影| 久久伊人蜜桃av一区二区| 国产高清亚洲一区| 国产亚洲美州欧州综合国| 成人午夜激情在线| 亚洲色图视频网站| 在线免费观看成人短视频| 亚洲电影一区二区| 欧美高清视频在线高清观看mv色露露十八| 精品免费99久久| 国产成人在线视频网站| 中文字幕日韩一区| 在线观看亚洲a| 日韩黄色片在线观看| 精品国产青草久久久久福利| 国产尤物一区二区在线| 国产精品久久久久久久裸模| 91免费版在线| 午夜电影久久久| 2020国产精品自拍| 99久久伊人精品| 亚洲精品成人精品456| 欧美一级一区二区| 粉嫩13p一区二区三区| 一区二区视频在线看| 欧美电影影音先锋| 国产剧情一区在线| 亚洲欧美区自拍先锋| 欧美精品v日韩精品v韩国精品v| 1区2区3区国产精品| 欧美日韩国产电影| 国产精品91一区二区| 一区二区三区精品视频在线| 欧美一区二区三区公司| 国产91丝袜在线观看| 一区二区三区欧美在线观看| 日韩一区二区中文字幕| 99麻豆久久久国产精品免费优播| 精品久久久久久综合日本欧美| 中文字幕成人网| 欧美美女网站色| 成人免费视频播放| 五月婷婷久久丁香| 久久综合九色综合97婷婷| 97se亚洲国产综合在线| 日韩国产精品91| 国产精品欧美久久久久一区二区| 久久精品99国产精品| 最近日韩中文字幕| 一本到一区二区三区| 国产一区二区三区在线观看免费视频 | 福利电影一区二区| 亚洲精品五月天| 久久无码av三级| 欧美色大人视频| 欧美一级日韩免费不卡| 日韩欧美国产三级| 亚洲男人的天堂av| 偷偷要91色婷婷| 91天堂素人约啪| 久久先锋影音av鲁色资源| 色先锋aa成人| 色狠狠色狠狠综合| 欧美午夜精品电影| 91激情在线视频| 欧美一级一级性生活免费录像| 日韩精品乱码免费| 国产一区二区三区免费看| 91蜜桃网址入口| 亚洲色图制服诱惑 | 国产一区二区精品久久| 亚洲综合自拍偷拍| 久久综合狠狠综合久久综合88 | 欧美日韩午夜精品| 亚洲va在线va天堂| 激情深爱一区二区| 91性感美女视频| 7878成人国产在线观看| 免费看日韩a级影片| 久久久91精品国产一区二区精品| 久久亚洲二区三区| 国产在线视频不卡二| 欧美色综合网站| 免费久久精品视频| 欧美—级在线免费片| 久久久精品国产免大香伊| 欧美日韩精品一区二区三区四区| 欧美精品亚洲一区二区在线播放| 欧美日韩在线电影| 欧日韩精品视频| 欧美性欧美巨大黑白大战| 日本vs亚洲vs韩国一区三区二区| youjizz国产精品| 午夜久久久久久| 亚洲一区二区综合| 欧美福利视频一区| 国产精品乱人伦| 国产精品乱人伦| 综合电影一区二区三区 | 精品一二线国产| 国产精品伦一区二区三级视频| 成人黄色免费短视频| 日本aⅴ免费视频一区二区三区| 欧美国产成人在线| 亚洲欧美在线视频观看| 久久国产成人午夜av影院| 国产综合一区二区| 欧美日韩国产综合视频在线观看 | 狠狠网亚洲精品| 国产精品视频线看| 国产一区二区三区日韩| 日韩一区二区三| 综合自拍亚洲综合图不卡区| 中文字幕一区二区三区色视频| 26uuuu精品一区二区|