1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
-
-
|
|
|
|
|
!
-
|
!
|
#include "user32.as"
#include "gdi32.as"
#include "winmm.as"
#define global WM_NCLBUTTONDOWN $000000A1
#define global HTCAPTION 2
#module
#deffunc CreateWindowRgn int targetWin, int baseWin
gsel baseWin
wx = ginfo_winx : wy = ginfo_winy
pget 0, 0 tr = ginfo_r : tg = ginfo_g : tb = ginfo_b
CreateRectRgn 0, 0, 0, 0 tmpRgn = stat
x = 0 : y = 0 : flg = 0
repeat wy
repeat wx
pget x, y
if (wx == x + 1) | ((ginfo_r == tr) && (ginfo_g == tg) && (ginfo_b == tb)) {
if flg == 1 {
CreateRectRgn sx, y, x, y + 1 gRgn = stat
CombineRgn tmpRgn, tmpRgn, gRgn, 2 DeleteObject gRgn flg = 0 }
} else {
if flg == 0 : sx = x : flg = 1
}
x++
loop
x = 0
y++
loop
gsel targetWin SetWindowRgn hwnd, tmpRgn, 1 DeleteObject tmpRgn
return
#global
gosub *me_time
title "Now Loading..."
buffer 2
picload "nav.bmp"
wx = ginfo_winx : wy = ginfo_winy
bgscr 3, wx, wy
gsel 3, -1
timeGetTime
st = stat
CreateWindowRgn 3, 2
timeGetTime
et = stat
gsel 0
title "Start... Time is " + (et - st)
gsel 3, 1
gcopy 2, 0, 0, wx, wy
redraw 0
onclick *winmove
stop
*me_time
timeBeginPeriod 1
timeEndPeriod 1
return
*winmove
if iparam == 3 : end
if iparam : stop
if ginfo_act != 3 : stop
DefWindowProc hwnd,WM_NCLBUTTONDOWN,HTCAPTION,0
MoveWindow hwnd, ginfo_wx1, ginfo_wy1, ginfo_sizex, ginfo_sizey, 1
|