

| Type | Description | |||
| IFontDisp | A Font object that specifies the font to display the panels. |
The following VB sample shows "How can I change the control's font":
With StatusBar1
.BeginUpdate
.VisualAppearance.Add 4,"c:\exontrol\images\border.ebn"
.VisualAppearance.Add 5,"CP:4 1 1 -1 -1"
.BackColorPanels = 83886080
Set f = CreateObject("StdFont")
With f
.Name = "Verdana"
.Size = 12
End With
.Font = f
.Format = """static text""[fg=255][a=17],11,22,(33/44)"
.EndUpdate
End With
The following VB.NET sample shows "How can I change the
control's font":
Dim f
With AxStatusBar1
.BeginUpdate
.VisualAppearance.Add 4,"c:\exontrol\images\border.ebn"
.VisualAppearance.Add 5,"CP:4 1 1 -1 -1"
.GetOcx().BackColorPanels = &H5000000
f = CreateObject("StdFont")
With f
.Name = "Verdana"
.Size = 12
End With
.Font = f
.Format = """static text""[fg=255][a=17],11,22,(33/44)"
.EndUpdate
End With
The following C++ sample shows "How can I change the
control's font":
/*
Copy and paste the following directives to your header file as
it defines the namespace 'EXSTATUSBARLib' for the library: 'ExStatusBar 1.0 Control Library'
#import "D:\\Exontrol\\ExStatusBar\\project\\Debug\\ExStatusBar.dll"
using namespace EXSTATUSBARLib;
*/
EXSTATUSBARLib::IStatusBarPtr spStatusBar1 = GetDlgItem(IDC_STATUSBAR1)->GetControlUnknown();
spStatusBar1->BeginUpdate();
spStatusBar1->GetVisualAppearance()->Add(4,"c:\\exontrol\\images\\border.ebn");
spStatusBar1->GetVisualAppearance()->Add(5,"CP:4 1 1 -1 -1");
spStatusBar1->PutBackColorPanels(83886080);
/*
Includes the definition for CreateObject function like follows:
#include <comdef.h>
IUnknownPtr CreateObject( BSTR Object )
{
IUnknownPtr spResult;
spResult.CreateInstance( Object );
return spResult;
};
*/
/*
Copy and paste the following directives to your header file as
it defines the namespace 'stdole' for the library: 'OLE Automation'
#import "C:\\WINNT\\System32\\stdole2.tlb"
*/
stdole::FontPtr f = ::CreateObject(L"StdFont");
f->PutName(L"Verdana");
f->PutSize(_variant_t(long(12)));
spStatusBar1->PutFont(IFontDispPtr(((stdole::FontPtr)(f))));
spStatusBar1->PutFormat(L"\"static text\"[fg=255][a=17],11,22,(33/44)");
spStatusBar1->EndUpdate();
The following C# sample shows "How can I change the
control's font":
axStatusBar1.BeginUpdate(); axStatusBar1.VisualAppearance.Add(4,"c:\\exontrol\\images\\border.ebn"); axStatusBar1.VisualAppearance.Add(5,"CP:4 1 1 -1 -1"); (axStatusBar1.GetOcx() as EXSTATUSBARLib.StatusBar).BackColorPanels = 0x5000000; stdole.IFontDisp f = new stdole.StdFont() as stdole.IFontDisp; f.Name = "Verdana"; f.Size = 12; axStatusBar1.Font = (f as stdole.IFontDisp); axStatusBar1.Format = "\"static text\"[fg=255][a=17],11,22,(33/44)"; axStatusBar1.EndUpdate();The following VFP sample shows "How can I change the control's font":
with thisform.StatusBar1
.BeginUpdate
.VisualAppearance.Add(4,"c:\exontrol\images\border.ebn")
.VisualAppearance.Add(5,"CP:4 1 1 -1 -1")
.BackColorPanels = 83886080
f = CreateObject("StdFont")
with f
.Name = "Verdana"
.Size = 12
endwith
.Font = f
.Format = ""+chr(34)+"static text"+chr(34)+"[fg=255][a=17],11,22,(33/44)"
.EndUpdate
endwith