ウィンドウのキャプチャについて暗中模索しているのですが、
SetParentでウィンドウの親子関係を設定してキャプションしてみたのですが
子ウィンドウの部分が無視されてしまいます。
オブジェクトがキャプションされているところを見ると、
同じ子ウィンドウのはずなのに結果が異なってきます。
GetParentで設定したウィンドウの親を調べたところエラーの0を返してきました。
画面上は親子関係が設定されたはずだと思うですが、どこが間違っているのでしょうか。
#module
#include "gdi32.as"
#define WM_PRINT 0x0317
#define WM_PRINTCLIENT 0x0318
#define SRCCOPY 0x00CC0020
#define PRF_CHECKVISIBLE 0x00000001
#define PRF_NONCLIENT 0x00000002
#define PRF_CLIENT 0x00000004
#define PRF_ERASEBKGND 0x00000008
#define PRF_CHILDREN 0x00000010
#define PRF_OWNED 0x00000020
#deffunc copy_window int b1,int a1
a=a1
b=b1
gsel a
oncmd gosub *cmd_pricli,WM_PRINTCLIENT
hwnd_a=hwnd
gsel b
sendmsg hwnd_a,WM_PRINT,hdc,PRF_NONCLIENT|PRF_CLIENT|PRF_CHILDREN|PRF_OWNED
redraw
return
*cmd_pricli
if ginfo_intid!a:return
sel=ginfo_sel
gsel a
BitBlt wParam,0,0,ginfo_winx,ginfo_winy,hdc,0,0,SRCCOPY
gsel sel
return
#global
#uselib "user32.dll"
#func SetParent "SetParent" int,int
#cfunc GetParent "GetParent" int
id=hwnd
button "OK",*f
mes "OK OK ok"
screen 5
bgscr 3,400,400
color 255
boxf
bgscr 4,300,300
color ,255,
boxf
gsel 3
width ,,50,50
id2=hwnd
SetParent hwnd,id
gsel 4
width ,,50,50
SetParent hwnd,id2
;dialog ""+GetParent(hwnd)
wait 100
copy_window 5,0
*f