Jump to content

HarmlessDave

Newbies
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

HarmlessDave's Achievements

Newbie

Newbie (1/14)

  • First Post
  • Conversation Starter

Recent Badges

0

Reputation

  1. Thanks, that makes sense to avoid maintaining a bunch of codecs when Microsoft has done that for you, but it's a shame that for 32-bit with alpha the results aren't compatible with their own Win32 API call. https://stackoverflow.com/questions/17602548/how-to-covert-iwicbitmapsource-to-hbitmap It looks like it might be possible to get a HBITMAP from a WIC bitmap, though for now it's easier for us to keep using the old BMPX export DLL.
  2. This code works fine with files created by Paint.Net 4.0.x and the old BMPX export DLL (BMP32 Paint.NET FileType.dll): m_hbm = (HBITMAP)::LoadImage(hInst, MAKEINTRESOURCE(idb_toolbar), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION); if (m_hbm == NULL) { DWORD derr = GetLastError(); Logger("toolbar LoadImage error = %d %u %x", derr, derr, derr); } m_ilToolBar = ImageList_Create(bmpw, bmph, ILC_COLOR32, 11, 4); ok2 = ImageList_Add(m_ilToolBar, m_hbm, NULL); If I use 4.3.12 with the same PDN file and save as 32-bit BMP, the ::LoadImage fails with GetLastError() == 183: 11:58:24.266 - toolbar LoadImage error = 183 183 b7 If I look at the old DLL export and the new built-in export, I see that the new version uses a larger header. I can provide samples of both if needed. Our use case is creating bitmaps with transparency for Windows UI elements like toolbar buttons. The old Win32 API calls won't read PNG.
×
×
  • Create New...