WINDOWS基本数据类型示例

时间:2014-05-20 01:42:47   收藏:0   阅读:552

最近也学学这些,争取把所有东东都串起来。

bubuko.com,布布扣
#include <Windows.h>
#include <stdio.h>

int WINAPI WinMain(
    HINSTANCE hInstance,
    HINSTANCE PrevInstance,
    LPSTR lpCmdLine,
    int nCmdShow
    )
{
    LPSTR szString = "WINDOWS DATA TYPE, STRING";
    CHAR lpString[120];
    DWORD dwMax = 0xFFFFFFFF;
    DWORD dwOne = 0x1;
    INT iMax = 0xFFFFFFFF;
    INT iOne = 0x1;
    MessageBox(NULL,szString,"LPSTR",MB_OK);
    CopyMemory(lpString, szString,lstrlen(szString)+1);
    MessageBox(NULL,lpString,"CHAR",MB_OK);

    if(dwMax>dwOne)
    {
        MessageBox(NULL,"DWORD类型的数据OXFFFFFFFF > 0X1","DWORD",MB_OK);
    }
    if(iMax<iOne)
    {
        MessageBox(NULL,"INT类型的数据 OXFFFFFFFF < 0X1","INT",MB_OK);
    }

    return 0;
}
bubuko.com,布布扣

bubuko.com,布布扣

WINDOWS基本数据类型示例,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!