SetSQLEditorFont 

Syntax:             BOOL SetSQLEditiorFont (LPCTSTR lpszFontName,

        BOOL bItalic,

        BOOL bBold,

        long lSize);

Return Value:    TRUE if the operation was successful, FALSE otherwise.

Parameters:

lpszFontName      Specifies the typeface name of the font to be set.

bItalic                 Specifies if the font to be set is Italic or not.

bBold                  Specifies if the font to be set is bold or not.

lSize                   Specifies the size of the font to be set.

Remarks:

Call this method to set the font of the SQL pane editor of  ELS-QB Component.

Example:

                           This sample code shows how to use SetSQLEditiorFont ()  and SetGridFont ()methods to set the fonts of ELS- QB Controlís SQL editor pane or Result tab correspondingly. The task is accomplished with the help of Common Dialog for Fonts.

void CELS_QBDemoView::OnViewFont()

{

CFontDialog dlg;

........................

// Initialize corresonding dlg settings

........................

if (dlg.DoModal() == IDOK)

{

CString strFontName;

BOOL bItalic, bBold;

long lFontSize;

if(m_QBCtrl.GetActiveTab() == 0)

{

strFontName = dlg.GetFaceName();

bItalic = !!(dlg.m_cf.lpLogFont->lfItalic);

bBold = (dlg.m_cf.lpLogFont->lfWeight == FW_BOLD);

lFontSize = dlg.GetSize()/10;

m_QBCtrl.SetSQLEditiorFont(strSQLFontName,bSQLItalic,bSQLBold,  lSQLFontSize);

 }

 else if(m_QBCtrl.GetActiveTab() == 0)

 {

bBold = (dlg.m_cf.lpLogFont->lfWeight == FW_BOLD);

bItalic = !!(dlg.m_cf.lpLogFont->lfItalic);

strFontName = dlg.GetFaceName();

lFontSize = dlg.GetSize()/10;

BOOL bStikeOut, bUnderline;

bStikeOut = !!(dlg.m_cf.lpLogFont->lfStrikeOut);

bUnderline = !!(dlg.m_cf.lpLogFont->lfUnderline);

long lFontColor = (long )dlg.m_cf.rgbColors;

m_QBCtrl.SetGridFont(strFontName, bItalic, bBold, lFontSize,bStikeOut,bUnderline,lFontColor);

 }

       }

                   }