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 ...
随机推荐
- Angular报错记录
一 找不到Controller 出现这种错误,一般都是没有找到需要的Controller,需要仔细检查是否所需的Controller已经正确引入
- JQuery插件开发初探——结构熟悉
工作之余,对Jquery插件做了一点尝试,想着之前总用别人写的插件,自己要是也写一个用岂不是很cool.于是说干就干,动手开始写. 首先是模仿,从一个简单的功能进行入手,了解一下插件开发的流程和结构. ...
- 4、Cocos2dx 3.0三,找一个小游戏开发Hello World 分析
尊重开发人员的劳动成果.转载的时候请务必注明出处:http://blog.csdn.net/haomengzhu/article/details/27186557 Hello World 分析 打开新 ...
- SSH框架总结(帧分析+环境结构+示例源代码下载)
首先,SSH不是一个框架.而是多个框架(struts+spring+hibernate)的集成,是眼下较流行的一种Web应用程序开源集成框架,用于构建灵活.易于扩展的多层Web应用程序. 集成SSH框 ...
- Eddy's mistakes(字母大小写转换)strlwr函数的应用
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for ...
- DirectSound应用
只是使用的假设PlaySound()这个API函数来显示的声音效果,然后,然后,它不会出现在混合声音,因为PlaySound还有播放期间声音,这将不可避免地导致现有声音停止. 因此,使用 PlaySo ...
- stl之map容器的原理及应用
容器的数据结构同样是采用红黑树进行管理,插入的元素健位不允许重复,所使用的节点元素的比较函数,只对元素的健值进行比较,元素的各项数据可通过健值检索出来.map容器是一种关联容器,实现了SortedAs ...
- Mono 4 和Jexus 5.6
Mono 4 和Jexus 5.6 概述 在这篇文章中我们将讨论如何在CentOS 7操作系统,安装 jexus. mono 和 配置 jexus,因此它将能够在这种环境中运行一个asp.net mv ...
- java中IO写文件工具类
以下是一些依据经常使用java类进行组装的对文件进行操作的类,平时,我更喜欢使用Jodd.io中提供的一些对文件的操作类,里面的方法写的简单易懂. 当中jodd中提供的JavaUtil类中提供的方法足 ...
- linux c ping 实现
用c语言实现的linux中的ping命令 #include <stdio.h> #include <signal.h> #include <arpa/inet.h> ...