Beispiel #1
0
int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap)
{
    const int n = wxComboBox::Append(item);
    if ( n != wxNOT_FOUND )
        SetItemBitmap(n, bitmap);
    return n;
}
Beispiel #2
0
int wxBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap,
                             unsigned int pos, void *clientData)
{
    const int n = wxComboBox::Insert(item, pos, clientData);
    if ( n != wxNOT_FOUND )
        SetItemBitmap(n, bitmap);
    return n;
}
Beispiel #3
0
int wxBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap,
                             wxClientData *clientData)
{
    const int n = wxOwnerDrawnComboBox::Append(item, clientData);
    if(n != wxNOT_FOUND)
        SetItemBitmap(n, bitmap);
    return n;
}
Beispiel #4
0
int wxBitmapComboBox::Insert(const wxString& item,
                             const wxBitmap& bitmap,
                             unsigned int pos)
{
    const int n = wxOwnerDrawnComboBox::Insert(item, pos);
    if(n != wxNOT_FOUND)
        SetItemBitmap(n, bitmap);
    return n;
}
int CBOINCBitmapComboBox::Append(const wxString& item, const wxBitmap& bitmap, void *clientData) {
    if (m_bHaveLargeBitmaps) {
        m_BitmapCache.push_back(bitmap);
    }

    int n = m_ChoiceControl->Append(item, clientData);
    SetItemBitmap(n, bitmap);
    return n;
}
int CBOINCBitmapComboBox::Insert(const wxString& item, const wxBitmap& bitmap, unsigned int pos) {
    if (m_bHaveLargeBitmaps) {
        std::vector<wxBitmap>::iterator insertionPoint = m_BitmapCache.begin();
        wxBitmap* bm = new wxBitmap(bitmap);
        m_BitmapCache.insert(insertionPoint + pos, *bm);
        delete bm;
    }
    int n = m_ChoiceControl->Insert(item, pos);
    SetItemBitmap(n, bitmap);
    return n;
}
Beispiel #7
0
		void DialogLoggedOutSAS::ApplyLogoImage()
		{
			if(m_bitmap == NULL)
			{
				std::wstring tileImage = pGina::Registry::GetString(L"TileImage", L"");
				if(tileImage.empty() || tileImage.length() == 1)
				{
					// Use builtin
					m_bitmap = LoadBitmap(GetMyInstance(), MAKEINTRESOURCE(IDB_PGINA_LOGO));
				}
				else
				{
					pDEBUG(L"Credential::GetBitmapValue: Loading image from: %s", tileImage.c_str());
					m_bitmap = (HBITMAP) LoadImageW((HINSTANCE) NULL, tileImage.c_str(), IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);			
				}				
			}

			if(m_bitmap)
			{
				SetItemBitmap(IDC_LOGO, m_bitmap);
			}
		}
Beispiel #8
0
// Initialize this menu.
BOOL BCMenu::Init( LPCTSTR pszMenuName, HIMAGELIST hImages, BOOL bChildren, BOOL bContext )
{
	// Context menu?
	if ( bContext )
	{
		if ( Create( TRUE ))
		{
			// Setup the imagelist.
			SetImageList( hImages );

			// We are a popup menu...
			IsPopupMenu() = TRUE;

			// Create the context menu items.
			ClsMenuItemInfo mi;

			mi.wID = IDM_COPY;
			mi.fType  = MFT_STRING;
			mi.fMask  = MIIM_TYPE | MIIM_ID;
			mi.dwTypeData = _T( "&Copy\tCtrl+C" );
			mi.cch = _tcslen( mi.dwTypeData );
			InsertItem(( UINT )-1, mi, TRUE );

			mi.wID = IDM_SELECTALL;
			mi.fType  = MFT_STRING;
			mi.fMask  = MIIM_TYPE | MIIM_ID;
			mi.dwTypeData = _T( "Select A&ll\tCtrl+A" );
			mi.cch = _tcslen( mi.dwTypeData );
			InsertItem(( UINT )-1, mi, TRUE );

			/*mi.fType = MFT_SEPARATOR;
			mi.fMask  = MIIM_TYPE;
			InsertItem(( UINT )-1, mi, TRUE );

      mi.wID = IDM_OPEN_SELECTED_PATH;
			mi.fType  = MFT_STRING;
			mi.fMask  = MIIM_TYPE | MIIM_ID;
			mi.dwTypeData = _T( "Open Selected Folder/File\tEnter" );
			mi.cch = _tcslen( mi.dwTypeData );
			InsertItem(( UINT )-1, mi, TRUE );*/

			// Convert...
			return	SetItemBitmap( &ibContext[ 0 ] );
		}
		return FALSE;
	}

	// Loadup the menu.
	if ( Load( pszMenuName ))
	{
		// Setup the imagelist.
		SetImageList( hImages );

		// Is this the frame or the child menu?
		StrItemBitmap *pTable = ( bChildren ? &ibChild[ 0 ] : &ibFrame[ 0 ] );

		// Set the bitmaps for this menu.
		if ( SetItemBitmap( pTable ))
			return TRUE;
	}
	return FALSE;
}