File: w_main.srw
Size: 2128
Date: Sun, 01 Jan 2017 20:28:11 +0100
$PBExportHeader$w_main.srw
forward
global type w_main from window
end type
type cb_add from commandbutton within w_main
end type
type cb_cancel from commandbutton within w_main
end type
end forward

global type w_main from window
integer width = 1367
integer height = 684
boolean titlebar = true
string title = "Printer Install"
boolean controlmenu = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_add cb_add
cb_cancel cb_cancel
end type
global w_main w_main

type prototypes
Function long ShellExecute ( &
   long hwnd, &
   string lpOperation, &
   string lpFile, &
   string lpParameters, &
   string lpDirectory, &
   long nShowCmd &
   ) Library "shell32.dll" Alias For "ShellExecuteW"

end prototypes

on w_main.create
this.cb_add=create cb_add
this.cb_cancel=create cb_cancel
this.Control[]={this.cb_add,&
this.cb_cancel}
end on

on w_main.destroy
destroy(this.cb_add)
destroy(this.cb_cancel)
end on

type cb_add from commandbutton within w_main
integer x = 37
integer y = 32
integer width = 882
integer height = 164
integer taborder = 20
integer textsize = -10
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Tahoma"
string text = "Add Sybase DataWindow PS"
end type

event clicked;n_addprinter ln_addptr
String ls_pathname, ls_filename
Integer li_rc

li_rc = GetFileOpenName("Select Printer Setup File", &
            ls_pathname, ls_filename, &
            "inf", "Setup Information file (*.inf), *.inf")

If li_rc = 1 Then
   ln_addptr.of_AddDataWindowPS(ls_pathname)
   MessageBox("Add Printer", "Complete!")
End If

end event

type cb_cancel from commandbutton within w_main
integer x = 951
integer y = 448
integer width = 334
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