Exemplo n.º 1
0
///////////////////////////////////////////////////////////////////////////////
//// Toggles between the active state and disabled state bitmaps
//
BOOL CTrayIcon::SetBitmaps(UINT nItem, UINT nUnChecked, UINT nChecked){

	return SetBitmaps( nItem,
		LoadBitmap( m_hinst, MAKEINTRESOURCE( nUnChecked ) ),
		LoadBitmap( m_hinst, MAKEINTRESOURCE( nChecked ) ) );

}
Exemplo n.º 2
0
	wxBuildBitmap(wxWindow* parent, wxWindowID id, const wxBitmap& bitmap)
	: wxBaseBitmapButton(parent, id, wxPoint(1, 1), 
		wxSize(bitmap.GetWidth(), bitmap.GetHeight()))
	, BuildPopup(this)
	{
		SetBitmaps(bitmap, bitmap);
	}
Exemplo n.º 3
0
DWORD CMySliderCtrl::SetBitmaps(LPCTSTR sChannel, COLORREF crTransCh,
                                LPCTSTR sThumb, COLORREF crTransThumb)
{
    HBITMAP    hChannel		= NULL;
    HBITMAP	   hThumb		= NULL;
    hChannel = (HBITMAP)::LoadImage(0, sChannel, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    hThumb = (HBITMAP)::LoadImage(0, sThumb, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    return SetBitmaps(hChannel, crTransCh,
                      hThumb, crTransThumb);
}
Exemplo n.º 4
0
DWORD SkinBmp::SetBitmaps(CWnd * cwnd, CDC * cdc, int nBitmap, COLORREF crTransBitmap)
{
	HBITMAP		hBitmap		= NULL;
	HINSTANCE	hInstResource	= NULL;
	
	// Find correct resource handle
	hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nBitmap), RT_BITMAP);

	// Load bitmap In
	hBitmap = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(nBitmap), IMAGE_BITMAP, 0, 0, 0);

	return SetBitmaps(cwnd, cdc, hBitmap, crTransBitmap);
} // End of SetBitmaps
DWORD CButtonST::SetBitmaps(_U_STRINGorID nBitmapIn, COLORREF crTransColorIn, _U_STRINGorID nBitmapOut, COLORREF crTransColorOut, HMODULE rsrcModule)
{
	HBITMAP		hBitmapIn	= 0;
	HBITMAP		hBitmapOut	= 0;
	HINSTANCE	hInstResource = 0;
	
	// Find correct resource handle
	hInstResource = (rsrcModule != 0 ? rsrcModule : _Module.GetResourceInstance());
	// Load bitmap In
	hBitmapIn = (HBITMAP)::LoadImage(hInstResource, nBitmapIn.m_lpstr, IMAGE_BITMAP, 0, 0, 0);
	// Load bitmap Out
	hBitmapOut = (HBITMAP)::LoadImage(hInstResource, nBitmapOut.m_lpstr, IMAGE_BITMAP, 0, 0, 0);
	return SetBitmaps(hBitmapIn, crTransColorIn, hBitmapOut, crTransColorOut);
}
//Create menu items
void CTray::CreateItemList(HMENU hMenu)
{
	int ret=0; // buffer for errors
 		
	// CREATE POPUP MENU ( on the fly )
	//hMenu = CreatePopupMenu(); // create the popupmenu (See BOOL TRAY_Init()...)
//	AppendMenu(hMenu,MF_STRING ,IDM_ONTOP,IDM_TEXT_ONTOP);// append menu    
//	AppendMenu(hMenu,MF_STRING ,IDM_MINIMIZE,IDM_TEXT_MINIMIZE);// append menu
//	AppendMenu(hMenu,MF_SEPARATOR,0,0);// append menu
	AppendMenu(hMenu,MF_STRING,IDM_CLOSE,"Close");// append menu 
	AppendMenu(hMenu,MF_STRING,IDM_ABOUT,"About");// append menu 
//	AppendMenu(hMenu,MF_SEPARATOR,0,0);// append menu
//	AppendMenu(hMenu,MF_STRING,IDM_ABOUT,IDM_TEXT_ABOUT);// append menu  
	
    SetBitmaps(hMenu); 
}
Exemplo n.º 7
0
DWORD CButtonST::SetBitmaps(int nBitmapIn, COLORREF crTransColorIn, int nBitmapOut, COLORREF crTransColorOut)
{
    HBITMAP        hBitmapIn    = NULL;
    HBITMAP        hBitmapOut    = NULL;
    HINSTANCE hInstResource    = NULL;
    
    // Find correct resource handle
    hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nBitmapIn), RT_BITMAP);

    // Load bitmap In
    hBitmapIn = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(nBitmapIn), IMAGE_BITMAP, 0, 0, 0);

    // Load bitmap Out
    hBitmapOut = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(nBitmapOut), IMAGE_BITMAP, 0, 0, 0);

    return SetBitmaps(hBitmapIn, crTransColorIn, hBitmapOut, crTransColorOut);
} // End of SetBitmaps
Exemplo n.º 8
0
DWORD CMySliderCtrl::SetBitmaps(int nChannel, COLORREF crTransCh,
                                int nThumb,	COLORREF crTransThumb)
{
    HBITMAP		hChannel		= NULL;
    HBITMAP		hThumb			= NULL;
    HINSTANCE	hInstResource	= NULL;

    // Find correct resource handle
    hInstResource = AfxFindResourceHandle(MAKEINTRESOURCE(nBitmap), RT_BITMAP);

    // Load bitmap In
    hChannel = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(nChannel), IMAGE_BITMAP, 0, 0, 0);
    hThumb = (HBITMAP)::LoadImage(hInstResource, MAKEINTRESOURCE(nThumb), IMAGE_BITMAP, 0, 0, 0);

    return SetBitmaps(hChannel, crTransCh,
                      hThumb, crTransThumb);
} // End of SetBitmaps
Exemplo n.º 9
0
DWORD SkinBmp::SetBitmaps(CWnd * cwnd, CDC * cdc, LPCTSTR sBitmap, COLORREF crTransBitmap)
{
    HBITMAP    hBitmap	    = NULL;
    hBitmap = (HBITMAP)::LoadImage(0, sBitmap, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE);
    return SetBitmaps(cwnd, cdc, hBitmap, crTransBitmap);
}
Exemplo n.º 10
0
static void CreateBitmapsTask(GCTaskId *, void *arg1, void *arg2)
{
    LocalMemSpace *lSpace = (LocalMemSpace *)arg1;
    lSpace->bitmap.ClearBits(0, lSpace->spaceSize());
    SetBitmaps(lSpace, lSpace->bottom, lSpace->top);
}
Exemplo n.º 11
0
void CMainToolBar::Init() {
  static TBBUTTONEX
  tbButtons[] = { { { 0,               ID_BACK,
                      TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN,
                      0,               0 },
                    true },
                  { { 1,               ID_FORWARD,
                      TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN,
                      0,               0 },
                    true },
                  { { 2, ID_UP, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 }, true },
                  { { 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0 }, true },
                  //{ {  3, ID_SEARCH,			TBSTATE_ENABLED,
                  //TBSTYLE_BUTTON, 0, 0 }, true },
                  { { 4, ID_FOLDERTREE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 18, ID_FAVS, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 19, ID_NEWFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 5, ID_COPYTO, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 6, ID_MOVETO, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 7, ID_DELETE, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 16,             ID_COMMANDS_CLEAN, TBSTATE_ENABLED,
                      TBSTYLE_BUTTON, 0,                 0 },
                    true },
                  { { 20,              ID_COMMANDS_FINDDUPLICATES,
                      TBSTATE_ENABLED, TBSTYLE_BUTTON,
                      0,               0 },
                    true },
                  { { 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0 }, true },
                  { { 9,               ID_MYCOMPUTER,
                      TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN,
                      0,               0 },
                    true },
                  { { 17, ID_DESKTOP, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 10,              ID_RECYCLEBIN,
                      TBSTATE_ENABLED, TBSTYLE_BUTTON | TBSTYLE_DROPDOWN,
                      0,               0 },
                    true },
                  { { 15, ID_MYDOCUMENTS, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 21, ID_TEMPFOLDER, TBSTATE_ENABLED, TBSTYLE_BUTTON, 0, 0 },
                    true },
                  { { 0, 0, TBSTATE_ENABLED, TBSTYLE_SEP, 0, 0 }, true },
                  { { 12,             ID_WINDOW_CASCADE, TBSTATE_ENABLED,
                      TBSTYLE_BUTTON, 0,                 0 },
                    true },
                  { { 13,             ID_WINDOW_TILE_HORZ, TBSTATE_ENABLED,
                      TBSTYLE_BUTTON, 0,                   0 },
                    true },
                  { { 14,             ID_WINDOW_TILE_VERT, TBSTATE_ENABLED,
                      TBSTYLE_BUTTON, 0,                   0 },
                    true }, };

  // ID_IMAGE_TOOLBAR_TGA
  SetBitmaps(gWinVersion.IsXPorLater() ? ID_IMAGE_TOOLBAR_TGA : IDR_BUTTONBAR,
             0, 0,
             gWinVersion.IsXPorLater() ? ID_IMAGE_TOOLBAR_TGA : IDR_BUTTONBAR,
             0, 0, ioLargeIcons, RGB(255, 255, 255));

  SetButtons(sizeof(tbButtons) / sizeof(tbButtons[0]), tbButtons,
             toTextOnRight);

  m_DropTarget.Register(this);
}
Exemplo n.º 12
0
PHPOutlineTree::PHPOutlineTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
    : clThemedTreeCtrl(parent, id, pos, size, style)
{
    SetBitmaps(clGetManager()->GetStdIcons()->GetStandardMimeBitmapListPtr());
}