MINIGUI 编译 helloworld
#include <minigui/common.h>
#include <minigui/minigui.h>
#include <minigui/gdi.h>
#include <minigui/window.h>
static int HelloWinProc(HWND hWnd, int message, WPARAM wParam, LPARAM lparam)
{
HDC hdc;
switch(message){
case MSG_PAINT:
hdc = BeginPaint(hWnd);
TextOut(hdc, 60, 60, "duanYuLei!");
EndPaint(hWnd, hdc);
return 0;
case MSG_CLOSE:
DestroyMainWindow(hWnd);
PostQuitMessage(hWnd);
return 0;
}
return DefaultMainWinProc(hWnd, message, wParam, lparam);
}
int MiniGUIMain(int argc, char const *argv[])
{
MSG Msg;
HWND hMainWnd;
MAINWINCREATE CreateInfo;
#ifdef _MGRM_PROCESSES
JoinLayer(NAME_DEF_LAYER, "HelloWorld", 0, 0);
#endif
CreateInfo.dwStyle = WS_VISIBLE | WS_BORDER | WS_CAPTION;
CreateInfo.dwExStyle = WS_EX_NONE;
CreateInfo.spCaption = "HelloWorld";
CreateInfo.hMenu = 0;
CreateInfo.hCursor = GetSystemCursor(0);
CreateInfo.hIcon = 0;
CreateInfo.MainWindowProc = HelloWinProc;
CreateInfo.lx = 0;
CreateInfo.ty = 0;
CreateInfo.rx = 240;
CreateInfo.by = 180;
CreateInfo.iBkColor = COLOR_lightwhite;
CreateInfo.dwAddData = 0;
CreateInfo.hHosting = HWND_DESKTOP;
hMainWnd = CreateMainWindow(&CreateInfo);
if(hMainWnd == HWND_INVALID)
return -1;
ShowWindow(hMainWnd, SW_SHOWNORMAL);
while(GetMessage(&Msg, hMainWnd)){
TranslateMessage(&Msg);
DispatchMessage(&Msg);
}
MainWindowThreadCleanup(hMainWnd);
return 0;
}
#ifndef _MGRM_PROCESSES
#include <minigui/dti.c>
#endif

MINIGUI 编译 helloworld的更多相关文章
- 使用gnu automake编译helloworld
使用gnu automake编译helloworld 按照许多介绍automake基本步骤的教程中的说法,我在尝试使用automake编译helloworld示例程序的时候,仍然遇到了几个小坑,所幸后 ...
- Linux - wxWidgets安装和编译HelloWorld
安装参考http://codelite.org/LiteEditor/WxWidgets30Binaries#toc2 源 /etc/apt/source.list deb http://repos. ...
- 手动调用NDK编译HelloWorld
首先,你得有NDK(木有的自行搜索) /home/xxxx/tools/android-ndk-r12b 准备好你的HelloWorld程序源码: #include<stdio.h> in ...
- centos编译helloworld的几个小问题
1.GCC使用在使用GCC编译程序时,编译过程可以被细分为四个阶段:预处理(Pre-Processing)编译(Compiling)汇编(Assembling)链接(Linking).例如: ...
- Linux下gcc和g++编译helloworld
linux C(hello world) 1.使用vi/vim进行编写代码并保存为hello_world.c.如下: 1 2 3 4 5 6 /* This is my first C program ...
- HI3531编译helloworld,执行错误
若在嵌入式系统中执行某文件出现如下错误: -/bin/sh: XXX: not found 一般是因为缺少库文件,解决方法有2: 1,文件系统的busybox编译时使用动态编译方式 2,或编译该文件的 ...
- RedHat下使用gcc编译HelloWorld.cpp
gcc ./HelloWorld.cpp 错误: /tmp/ccZuz3Ca.o:(.eh_frame+0x12): undefined reference to `__gxx_personality ...
- minigui编译
1, libminigui修改单 file: src/kernel/desktop.c func: def_mouse_handler keywords: MSG_DT_RBUTTONUP break ...
- Ubuntu中编译helloworld驱动
1. 新建hello文件夹 2.hello.c #ifndef __KERNEL__ # define __KERNEL__ #endif #ifndef MODULE # define MODULE ...
随机推荐
- android tv 全屏幕垂直画
它们的定义view 采纳canvas双缓冲方式,它可以减少呈现时间.提高性能. StaggeredView.java 源码例如以下: package com.xxx.demo; import andr ...
- SSH没有password安全日志
client: ssh-keygen -t rsa server结束 mkdir .ssh chmod 755 .ssh 从公开密钥client上传server scp .ssh/id_rsa.phb ...
- UML对象图和包图
UML九已经介绍过的基本图,然后,我们再来看看对象图和包图. 一.对象图 谈到对象.我们不得不说一下对象.对象(Object)是对象类的实例(Instance),用于模型化特定的实体.对象是唯一的. ...
- git branch(转)
git branch git branch 不带参数:列出本地已经存在的分支,并且在当前分支的前面加“*”号标记,例如: #git branch* master newbranch gi ...
- error:stray'\243'in program
error:stray'\243'in program 问题: C原因在编译时出现例如以下错误 error:stray'\243'in program 错误原因: 非 - 标准ascII字 ...
- MVC使用Bootstrap
ASP.NET MVC使用Bootstrap系列(5)——创建ASP.NET MVC Bootstrap Helpers 摘要: 序言ASP.NET MVC允许开发者创建自定义的HTML Helper ...
- 【百度地图API】如何制作一张魔兽地图!!——CS地图也可以,哈哈哈
原文:[百度地图API]如何制作一张魔兽地图!!--CS地图也可以,哈哈哈 摘要: 你玩魔兽不?你知道如何做一张魔兽地图不?! 快来看此文吧! ---------------------------- ...
- UIApplicationMain方法介绍
在IOS程序的main函数中执行了一个UIApplicationMain这个函数,下面介绍以下这个函数的作用. int UIApplicationMain(int argc, char *argv[] ...
- 合并多段zip文件并解压缩
cat xxx.zip.*** >xxx.zip unzip xxx.zip
- TCP通信中的大文件传送
TCP通信中的大文件传送 源码 (为节省空间,不包含通信框架源码,通信框架源码请另行下载) 文件传送在TCP通信中是经常用到的,本文针对文件传送进行探讨 经过测试,可以发送比较大的文件,比如1个G ...