vs下创建智能设备应用程序

在vs下新建VC++智能项目,利用仿真器代替真实设备测试应用程序。
这里以smartphone平台为例:

这里写图片描述

// test1.cpp : 定义应用程序的入口点。
//

#include "stdafx.h"
#include "test1.h"
#include <windows.h>
#include <commctrl.h>

#define MAX_LOADSTRING 100

// 全局变量:
HINSTANCE           g_hInst;            // 当前实例
HWND                g_hWndMenuBar;      // 菜单栏句柄

// 此代码模块中包含的函数的前向声明:
ATOM            MyRegisterClass(HINSTANCE, LPTSTR);
BOOL            InitInstance(HINSTANCE, int);
LRESULT CALLBACK    WndProc(HWND, UINT, WPARAM, LPARAM);
INT_PTR CALLBACK    About(HWND, UINT, WPARAM, LPARAM);

int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPTSTR    lpCmdLine,
                   int       nCmdShow)
{
    MSG msg;

    // 执行应用程序初始化:
    if (!InitInstance(hInstance, nCmdShow)) 
    {
        return FALSE;
    }

    HACCEL hAccelTable;
    hAccelTable = LoadAccelerators(hInstance,     MAKEINTRESOURCE(IDC_TEST1));
    MessageBox(NULL,TEXT("welcome to smartphone!"),TEXT("hello"),MB_OK);

    // 主消息循环:
    while (GetMessage(&msg, NULL, 0, 0)) 
    {
        if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) 
        {
            TranslateMessage(&msg);
            DispatchMessage(&msg);
        }
    }

    return (int) msg.wParam;
}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值