Patch level : 10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Corretta gestione icone standard


git-svn-id: svn://10.65.10.50/trunk@16484 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2008-04-08 14:05:10 +00:00
parent 0fde2036d1
commit cd2cbe0c47
2 changed files with 1320 additions and 4 deletions

View File

@ -264,14 +264,17 @@ const wxIcon& _GetIconResource(int rid)
if (::wxFileExists(strName))
{
icon = new wxIcon(strName, wxBITMAP_TYPE_ICO);
_nice_icons.Put(rid, icon);
}
else
{
icon = (wxIcon*)_nice_icons.Get(ICON_RSRC);
if (icon == NULL)
icon = new wxIcon; // Icona nulla di salvezza
{
strName.Printf("%d", ICON_RSRC);
icon = new wxIcon(strName); // Icona di salvezza
}
}
_nice_icons.Put(rid, icon);
}
return *icon;
}
@ -1360,9 +1363,12 @@ void xvt_dwin_draw_gradient_linear(WINDOW win, const RCT* r, COLOR col1, COLOR c
void xvt_dwin_draw_icon(WINDOW win, int x, int y, int rid)
{
CAST_DC(win, dc);
const wxIcon& ico = _GetIconResource(rid);
dc.DrawIcon(ico, x, y);
if (ico.IsOk())
{
CAST_DC(win, dc);
dc.DrawIcon(ico, x, y);
}
}
static wxRect ComputeRect(const wxRect& rct, int h, int v, int k)

1310
xvaga/xvtctl.cpp Executable file

File diff suppressed because it is too large Load Diff