$PBExportHeader$w_tmp_resource.srw forward global type w_tmp_resource from window end type type st_1 from statictext within w_tmp_resource end type type lv_1 from listview within w_tmp_resource end type end forward global type w_tmp_resource from window boolean visible = false integer width = 462 integer height = 464 windowtype windowtype = child! long backcolor = 67108864 string icon = "AppIcon!" boolean center = true st_1 st_1 lv_1 lv_1 end type global w_tmp_resource w_tmp_resource type variables protected: ulong iul_font, iul_fontbold end variables forward prototypes public function listview of_getlistview () public function long of_gettextwidth (readonly string as_text) public subroutine of_createfont () end prototypes public function listview of_getlistview ();RETURN lv_1 end function public function long of_gettextwidth (readonly string as_text);n_svc_mgr lnv_svc n_svc_win32 lnv_win32 long ll_dc tagsize lstr_size long lul_oldfont lnv_svc.of_LoadSvc(lnv_win32, CSvc.WIN32) ll_dc = lnv_win32.GetDC(Handle(st_1)) //set the font lul_oldfont = lnv_win32.SelectObject(ll_dc, iul_font) lnv_win32.GetTextExtentPoint32(ll_dc, as_text, LEN(as_text), lstr_size) lnv_win32.SelectObject(ll_dc, lul_oldfont) lnv_Win32.ReleaseDC(Handle(st_1), ll_dc) RETURN PixelsToUnits(lstr_size.cx, XPixelsToUnits!) end function public subroutine of_createfont ();LogFont lstr_Lf uLong lul_Font n_svc_mgr lnv_svc n_svc_win32 lnv_win32 n_svc_iif lnv_iif lnv_svc.of_loadsvc(lnv_win32, CSvc.WIN32) lnv_svc.of_loadsvc(lnv_iif, CSvc.IIF) lstr_Lf.lffacename = "Tahoma"//#FontName lstr_Lf.lfweight = 400 lstr_Lf.lfheight = 11 * -1 lstr_Lf.lfPitchAndFamily = '1' lstr_Lf.lfClipPrecision = Char(2) lstr_Lf.lfOutPrecision = Char(1) lstr_Lf.lfQuality = Char(1) lstr_Lf.lfCharset = Char(1) IF iul_font <> 0 THEN & lnv_win32.DeleteObject(iul_font) IF iul_fontbold <> 0 THEN & lnv_win32.DeleteObject(iul_font) iul_font = lnv_win32.CreateFontIndirect( lstr_Lf ) lstr_Lf.lfweight = 700 iul_fontbold = lnv_win32.CreateFontIndirect( lstr_Lf ) end subroutine on w_tmp_resource.create this.st_1=create st_1 this.lv_1=create lv_1 this.Control[]={this.st_1,& this.lv_1} end on on w_tmp_resource.destroy destroy(this.st_1) destroy(this.lv_1) end on event close;n_svc_mgr lnv_svc n_svc_win32 lnv_win32 lnv_svc.of_loadsvc(lnv_win32, CSvc.WIN32) lnv_win32.DeleteObject(iul_font) lnv_win32.DeleteObject(iul_fontbold) end event event open;of_CreateFont() end event type st_1 from statictext within w_tmp_resource integer x = 18 integer y = 368 integer width = 343 integer height = 52 integer textsize = -8 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 long backcolor = 67108864 string text = "none" boolean focusrectangle = false end type type lv_1 from listview within w_tmp_resource integer width = 411 integer height = 352 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = ansi! fontpitch fontpitch = variable! fontfamily fontfamily = swiss! string facename = "Tahoma" long textcolor = 33554432 borderstyle borderstyle = stylelowered! long largepicturemaskcolor = 536870912 long smallpicturemaskcolor = 536870912 long statepicturemaskcolor = 536870912 end type
- Sources
- Kodigo
- OpenExplorer
- w_tmp_resource.srw
File: w_tmp_resource.srw
Size: 3466
Date: Mon, 07 Apr 2008 21:32:04 +0200
Size: 3466
Date: Mon, 07 Apr 2008 21:32:04 +0200
- window w_tmp_resource(srw)
- of_createfont ()
- of_getlistview () returns listview
- of_gettextwidth (readonly string as_text) returns long
- statictext st_1
- listview lv_1