// book21_s2.cpp
#include <stdlib.h> // EXIT_SUCCESS
#include "screen_int.fx" // 画面初期化関数
#include "symbol.fx" // 文字列拡大関数
#include "ellipse.fx" // 楕円関数
#include "wait.fx" // 時間待関数
#include "select_window.fx" // ウィンドウ選択関数
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpszCmdLine,int nCmdShow)
{
char *font1="Arail"; // 書体1
char *font2="MS ゴシック"; // 書体2
int x=7, y=8; // 文字拡大率
screen_int(320,160,"ABC",RGB(90,0,0)); // ウィンドウ1(320x160dot)
symbol(0,0,"A",7,x,y,0,FW_BOLD,font1);wait(2);
screen_int(360,200,"123",RGB(0,0,90)); // ウィンドウ2(360x200dot)
symbol(0,0,"1",7,x,y,0,FW_BOLD,font1);wait(2);
screen_int(400,240,"いろは",RGB(0,30,0)); // ウィンドウ3(400x240dot)
for(int r=10;r<200;r+=5)
{
ellipse(320,200,r*1.6,r,3,1,PS_DASHDOTDOT); // 楕円
} // for
symbol(0,0,"い",7,x,y,0,FW_BOLD,font2);
symbol(20,120,"http://www.hir-net.com/",6,2,2,0,FW_BOLD,font2);
symbol(0,160,"『Windowsプログラムを10倍強力に作る』",
7,1.6,3,0,FW_BOLD,font2);
wait(2);
select_window(0);symbol(100,0,"B", 6,x,y,0,FW_BOLD,font1);wait(5);
select_window(1);symbol(100,0,"2", 6,x,y,0,FW_BOLD,font1);wait(5);
select_window(2);symbol(110,0,"ろ",6,x,y,0,FW_BOLD,font2);
symbol(20,205,"サンプルプログラム",5,2,2,0,FW_BOLD,font2);
wait(5);
select_window(1);symbol(200,0,"3", 5,x,y,0,FW_BOLD,font1);wait(5);
select_window(0);symbol(200,0,"C", 5,x,y,0,FW_BOLD,font1);
return EXIT_SUCCESS;
} // main
//** 終わり **