Example #1
0
static void PrintStatusColour( void )
{
    char        fore[20];
    char        back[20];

    GetColourName( WndStatusColour.fore, fore );
    GetColourName( WndStatusColour.back, back );
    Format( TxtBuff, "%s status %s on %s", GetCmdName( CMD_PAINT ), fore, back );
    WndDlgTxt( TxtBuff );
}
Example #2
0
static void PrintDialogColours( void )
{
    int             i;
    gui_dlg_attr    dlgattr;
    char            fore[20];
    char            back[20];
    char            attr[30];

    GUIGetDialogColours( WndDlgColours );
    for( i = 0; i < ArraySize( DlgAttrMap ); ++i ) {
        dlgattr = DlgAttrMap[i].attr;
        GetAttrName( DlgAttrMap, i, attr );
        GetColourName( WndDlgColours[dlgattr].fore, fore );
        GetColourName( WndDlgColours[dlgattr].back, back );
        Format( TxtBuff, "%s dialog %s %s on %s", GetCmdName( CMD_PAINT ), attr, fore, back );
        WndDlgTxt( TxtBuff );
    }
}
Example #3
0
static void PrintColours( wnd_class wndcls, gui_colour_set *set, gui_colour_set *def )
{
    char        wndname[20];
    char        attr[30];
    char        fore[20];
    char        back[20];
    int         i;
    wnd_class   wndcls1;

    GetCmdEntry( WndNameTab, wndcls, wndname );
    for( i = 0; i < ArraySize( AttrMap ); ++i ) {
        wndcls1 = AttrMap[i].attr;
        if( def == NULL || memcmp( &set[wndcls1], &def[wndcls1], sizeof( *set ) ) != 0 ) {
            GetAttrName( AttrMap, i, attr );
            GetColourName( set[wndcls1].fore, fore );
            GetColourName( set[wndcls1].back, back );
            Format( TxtBuff, "%s %s %s %s on %s", GetCmdName( CMD_PAINT ), wndname, attr, fore, back );
            WndDlgTxt( TxtBuff );
        }
    }
}
void CColourPopup::CreateToolTips()
{
    // Create the tool tip
    if (!m_ToolTip.Create(this)) return;

    // Add a tool for each cell
    for (int i = 0; i < m_nNumColours; i++)
    {
        CRect rect;
        if (!GetCellRect(i, rect)) continue;
            m_ToolTip.AddTool(this, GetColourName(i), rect, 1);
    }
}