zoukankan      html  css  js  c++  java
  • Windows API一日一练(3)使用命令行参数

     1 #include <windows.h>
     2 #include "resource.h"
     3 //#include "windows.rc"
     4 
     5 /*  Declare Windows procedure  */
     6 LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
     7 
     8 /*  Make the class name into a global variable  */
     9 char szClassName[ ] = "CodeBlocksWindowsApp";
    10 
    11 int WINAPI WinMain (HINSTANCE hThisInstance,
    12                      HINSTANCE hPrevInstance,
    13                      LPSTR lpszArgument,
    14                      int nCmdShow)
    15 {
    16     const int MAXSIZE_APPBUFF = 255;
    17     char wAppTile[MAXSIZE_APPBUFF];
    18     LoadString(hThisInstance,IDS_1,wAppTile,MAXSIZE_APPBUFF);
    19     HWND hwnd = GetDesktopWindow();
    20     MessageBox(hwnd,lpszArgument,"nihao",MB_OK);
    21     MessageBoxA(hwnd,wAppTile,"你好",MB_OK);
    22 
    23       return 0;
    24 }

    CB编译成功  :项目 ---》设置程序参数

  • 相关阅读:
    Codeforces-541div2
    动态规划-线性dp-hdu-4055
    动态规划_线性dp
    动态规划_背包问题笔记
    codeforces-1111
    数论模板
    codeforces-1114F-线段树练习
    2-sat
    拓扑排序
    强连通分量
  • 原文地址:https://www.cnblogs.com/rainboy/p/3500847.html
Copyright © 2011-2022 走看看