Win32API質問箱 Build55at TECH
Win32API質問箱 Build55 - 暇つぶし2ch255:デフォルトの名無しさん
07/07/26 14:06:12
>>245
ほら、LinuxでもMacでも(恐らく)最小のウインドウを表示するプログラムやるからどっか行け。
--
/// For compile: gcc -std=c99 this.c -lX11 -L/usr/X11R6/lib
#include <X11/Xlib.h>

int main()
{
static const int WinWidth = 100;
static const int WinHeight = 100;
static const int WinBorder = 2;

Display * dpy = XOpenDisplay(NULL);
Window win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
0, 0, WinWidth, WinHeight, WinBorder,
BlackPixel(dpy, DefaultScreen(dpy)), WhitePixel(dpy, DefaultScreen(dpy)));
XSelectInput(dpy, win, KeyPressMask);
XMapWindow(dpy, win);

XEvent event;
do {
XNextEvent(dpy, & event);
} while (event.type != KeyPress);
XDestroyWindow(dpy, win);
XCloseDisplay(dpy);
return 0;
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch