标题:程序中0与NULL还有区别?
取消只看楼主
David_o
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2012-2-23
结帖率:50%
已结贴  问题点数:20 回复次数:0 
程序中0与NULL还有区别?
#include "windows.h"

LRESULT WndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM IParam)
{
     return DefWindowProc(hWnd,uMsg,wParam,IParam);
}

int WinMain(HINSTANCE hlnstance,HINSTANCE hPrevlnstance,LPSTR lpCmdLine,int nCmdShow)
{
    HWND hWnd=0;
    WNDCLASS window_o={0};
    MSG nMsg={0};
    window_o.style = CS_HREDRAW|CS_VREDRAW;
    window_o.lpfnWndProc = (WNDPROC)WndProc;
    window_o.cbWndExtra =0;
    window_o.hInstance = 0;
    window_o.hIcon=NULL;
    window_o.hCursor=NULL;
    window_o.hbrBackground=(HBRUSH)(COLOR_WINDOW+1);
    window_o.lpszMenuName = NULL;
    window_o.lpszClassName = "DDD";
    RegisterClass(&window_o);
    hWnd = CreateWindow("DDD","David",WS_OVERLAPPEDWINDOW,100,100,300,500,NULL,NULL,hlnstance,NULL);
    ShowWindow(hWnd,SW_SHOW);
    UpdateWindow(hWnd);
    while(GetMessage(&nMsg,NULL,0,0))
    {
          TranslateMessage(&nMsg);
          DispatchMessage(&nMsg);
    }
}
搜索更多相关主题的帖子: return include 
2012-02-23 23:36



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-361498-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.561659 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved