File: w_response.srw
Size: 2719
Date: Thu, 14 Jul 2022 19:32:34 +0200
$PBExportHeader$w_response.srw
forward
global type w_response from window
end type
type cb_cancel from commandbutton within w_response
end type
type r_1 from rectangle within w_response
end type
type point from structure within w_response
end type
type minmaxinfo from structure within w_response
end type
end forward

type point from structure
   long     lx
   long     ly
end type

type minmaxinfo from structure
   point    ptreserved
   point    ptmaxsize
   point    ptmaxposition
   point    ptmintracksize
   point    ptmaxtracksize
end type

global type w_response from window
integer width = 2135
integer height = 1204
boolean titlebar = true
string title = "Resizable Response Window"
boolean controlmenu = true
windowtype windowtype = response!
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
event getminmaxinfo pbm_getminmaxinfo
cb_cancel cb_cancel
r_1 r_1
end type
global w_response w_response

type prototypes
Subroutine GetMinMaxInfo ( &
   Ref MINMAXINFO d, &
   longptr s, &
   long l &
   ) Library "kernel32.dll" Alias For "RtlMoveMemory"

Subroutine SetMinMaxInfo ( &
   longptr d, &
   MINMAXINFO s, &
   long l &
   ) Library "kernel32.dll" Alias For "RtlMoveMemory"

end prototypes

type variables
n_resizable_response in_rsz

end variables

event getminmaxinfo;MINMAXINFO lstr_minmaxinfo

If in_rsz.IsResizable Then
   // copy the data to a local structure
   GetMinMaxInfo(lstr_minmaxinfo, minmaxinfo, 40)
   // set the minimum size for our window
   lstr_minmaxinfo.ptMinTrackSize.lx = in_rsz.iOrigXPixels
   lstr_minmaxinfo.ptMinTrackSize.ly = in_rsz.iOrigYPixels
   // copy the structure back into window memory
   SetMinMaxInfo(MINMAXINFO, lstr_minmaxinfo, 40)
End If

// important: must return 0
Return 0

end event

on w_response.create
this.cb_cancel=create cb_cancel
this.r_1=create r_1
this.Control[]={this.cb_cancel,&
this.r_1}
end on

on w_response.destroy
destroy(this.cb_cancel)
destroy(this.r_1)
end on

event open;// make resizable
in_rsz.of_SetResizable(this)

end event

type cb_cancel from commandbutton within w_response
integer x = 1353
integer y = 768
integer width = 407
integer height = 100
integer taborder = 10
integer textsize = -8
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "Cancel"
boolean cancel = true
end type

event clicked;Close(Parent)

end event

type r_1 from rectangle within w_response
long linecolor = 33554432
integer linethickness = 4
long fillcolor = 67108864
integer x = 1792
integer y = 896
integer width = 334
integer height = 228
end type