[xyzzy:03275] Re: 起動時にウィンドウのサイズ指定の方法
- Subject: [xyzzy:03275] Re: 起動時にウィンドウのサイズ指定の方法
- From: Tetsuya Kamei <kamei@xxxxxxxxxxxx>
- X-mailer: Denshin 8 Go V321.2b5
- X-yzzy-version: 0.1.0.104
Takahisa さん、こんにちは。
Sat, 25 Sep 1999 16:45:49 +0900 の
[xyzzy:03273] Re: 起動時にウィンドウのサイズ指定の方法
への返事です.
| この方法を試してみたんですが、「終了時にウィンドウサイズを保存」をはず
| して再起動したときに保存したウィンドウのサイズではなく、もともとのウィ
| ンドウサイズで立ち上がってきます。
今のところそれはそういうもんです。
起動時にウィンドウサイズを指定する真っ当な方法はありま
せんが、真っ当でない方法でよければこんな感じでできます。
(require "wip/winapi")
(c:define-dll-entry c:int GetWindowRect (winapi:HWND (winapi:RECT *)) "user32")
(let ((cr (winapi:make-RECT))
(wr (winapi:make-RECT)))
(winapi:GetClientRect (get-window-handle) cr)
(GetWindowRect (get-window-handle) wr)
(winapi:MoveWindow (get-window-handle)
(winapi:RECT-left wr)
(winapi:RECT-top wr)
(let ((w (- (winapi:RECT-right cr) (winapi:RECT-left cr))))
(+ (- (winapi:RECT-right wr) (winapi:RECT-left wr) w)
(* (truncate w (screen-width)) 80)))
(- (winapi:RECT-bottom wr) (winapi:RECT-top wr))
1))
--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx