Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

APSAccounts

@APSAccounts
About
Posts
5
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Icons are displayed as black squares on remote desktops
    A APSAccounts

    Well, we have to distinguish between published knowledge, unpublished/internal one and achieved by experience one. Writing here we primarly hope to find the third kind... but the first two kinds are welcome, too, of course.

    C / C++ / MFC help c++ database graphics

  • Icons are displayed as black squares on remote desktops
    A APSAccounts

    The demo project gives you the function GetBitmapAsText(); which constantly and reliably delivers the same picture because it always returns a hardcoded string of base64-encoded picture data. Despite of this fact and despite of the constant algorithm for the presentation the presentation of the picture differs depending on the system. Therefore, for me the reason for the problem is situated somewhere in the interaction of the presentation algorithm with the specific system. The only bridge I could build for you in order to make the picture data more transparent, would be to get rid of the base64 encoding and hardcode the picture data directly into picInBytes (BYTE*) as it is consumed by the API function CreateBitmap. But would it really help? The only reason for checking the picutre data once again would be for me the knowledge of a limitation saying that CreateBitmap needs the data on different systems in different forms...

    C / C++ / MFC help c++ database graphics

  • Icons are displayed as black squares on remote desktops
    A APSAccounts

    Please don't bother about GetBitmapAsText(); because it only exists in the demo project in order to replace the complex algorithm and database infrastructure in the real project and make the problem portable. The correct loading of picture data from DB can be assumed because the problem is not that the picture can't be seen at all but that it can only be seen in certain circumstances.

    C / C++ / MFC help c++ database graphics

  • Icons are displayed as black squares on remote desktops
    A APSAccounts

    They represent the remote desktop on which the application runs, sorry for the unclarity.

    C / C++ / MFC help c++ database graphics

  • Icons are displayed as black squares on remote desktops
    A APSAccounts

    Hey guys, I'm encountering the following problem. I wolud very much appreciate your help. Description of the problem MFC Desktop Application VisualStudio 2010 Icons are supposed to be displayed in a CListCtrl as a CImageList. It usually works fine except when using RemoteDesktop with the OS Windows 2008 / 2003. In these particular cases the icons are just displayed as a black square. Connecting with VMware vSphere (alternative to RemoteDesktop) -> Icons are shown appropriately Remotdesktop on Windows XP / 7 / 8 -> Icons are shown appropriately Code: OnInitDialog() { /* ~Standardcode */ // Setting the symbol for this dialog-field. This is done automatically // if the mainwindow of the application is no dialog-field. SetIcon(m_hIcon, TRUE); // using big symbol SetIcon(m_hIcon, FALSE); // using small symbol // TODO: appending additional initialization InitList(); // m_list.SetImageList(imageList, LVSIL_NORMAL); //captions CString buf = _T("testitem"); m_list.InsertItem(0, buf, 0); m_list.SetItemData(0, (DWORD) 0); m_list.SetItemText(0, 0, _T("0")); m_list.SetItemState(0, 2, LVIS_SELECTED); m_list.EnsureVisible(0, FALSE); } void CDispomarkierungTestDlg::InitList() { imageList = new CImageList(); int err = imageList->Create(16, 16, ILC_COLOR32 | ILC_MASK, 1, 1); //ILC_COLOR16 , ILC_COLOR8 , ... getested int id = 40; int requiredLength = 3154; LPCSTR picInCharsFromDB = GetBitmapAsText(); int width = 24; int heigth = 24; int pixel = 32; int planes = 1; BYTE *picInBytes = new BYTE[requiredLength]; int lengthVariable = requiredLength; int* lengthPointer; lengthPointer = &lengthVariable; Base64Decode(picInCharsFromDB, requiredLength, picInBytes, lengthPointer); HANDLE hBitMap = CreateBitmap(width, heigth, planes, pixel, picInBytes); BITMAP bitmap; GetObject(hBitMap,sizeof(BITMAP),&bitmap); CImage image; image.Attach((HBITMAP)hBitMap); CBitmap icon; icon.Attach((HBITMAP)hBitMap); CBitmap* bitmappointer; bitmappointer = &icon; BITMAP bmp; icon.GetBitmap(&bmp); CClientDC dcClient(this); CDC memDC; memDC.CreateCompatibleDC(&dcClient); HBITMAP hbmMask = ::CreateCompatibleBitmap(memDC.GetSafeHdc(), width, heigth); ICONINFO ii = {0}; ii.fIcon = TRUE; ii.hbmColor = icon; ii.hbmMask = hbmMask; HICON hIcon = ::CreateIconIndirect(&ii); ::DeleteObject(hbmMask); err = imageList->Add(hIcon); } In the real application, the source is a database which

    C / C++ / MFC help c++ database graphics
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups