Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Toolbars for Visual Studio 2019
#1
Hello, 

I'm trying to use GIMP 2.10.24 to draw toolbars for MS VS 2019 with Gimp. Although it seems to work fine for icons, none of the BMP parameters seem to produce valid toolbars :

Using these explanations, I can save the BMP file so that it opens in Visual Studio. I also set the mode to RGB and made sure there is no alpha channel.

The app builds OK, but when I run it,
Code:
VERIFY(toolBar->LoadToolBar(nID));

fails with an exception.


Is there anything workaround for this?


Thanks,

Werner
Reply
#2
(06-03-2021, 12:58 PM)werner Wrote: Hello, 

I'm trying to use GIMP 2.10.24 to draw toolbars for MS VS 2019 with Gimp. Although it seems to work fine for icons, none of the BMP parameters seem to produce valid toolbars :

Using these explanations, I can save the BMP file so that it opens in Visual Studio. I also set the mode to RGB and made sure there is no alpha channel.

The app builds OK, but when I run it,
Code:
VERIFY(toolBar->LoadToolBar(nID));

fails with an exception.


Is there anything workaround for this?


Thanks,

Werner

What exception? Any specific message?
Reply
#3
(06-03-2021, 11:55 PM)Ofnuts Wrote:
(06-03-2021, 12:58 PM)werner Wrote: Hello, 

I'm trying to use GIMP 2.10.24 to draw toolbars for MS VS 2019 with Gimp. Although it seems to work fine for icons, none of the BMP parameters seem to produce valid toolbars :

Using these explanations, I can save the BMP file so that it opens in Visual Studio. I also set the mode to RGB and made sure there is no alpha channel.

The app builds OK, but when I run it,
Code:
VERIFY(toolBar->LoadToolBar(nID));

fails with an exception.


Is there anything workaround for this?


Thanks,

Werner

What exception? Any specific message?

Hello, thanks for looking at my question. 

Actually, when I start Visual Studio after saving the bitmap with Gimp, there is only a popup that says, "Unknownbitmap format".

When I try to open it inside VM, I get a COM error :

An error occurred while initializing the frame's content
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowPaneDocumentObject.Init(Boolean initSize)
   at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.InitializeDocumentSite(Boolean creatingStubFrame, Boolean replacingStubView, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid)
   at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(FrameMoniker frameMoniker, Boolean isDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Guid rguidCmdUI, ViewGroup parent, IVsWindowFrame& ppWindowFrame)


Famemode: VSFM_Float
Error code 0x8004005
Reply
#4
Can you post a small bitmap that works, and one that doesn't?
Reply
#5
(06-08-2021, 10:12 PM)Ofnuts Wrote: Can you post a small bitmap that works, and one that doesn't?

OK, so trying to put a ZIP with examples together I got a whole new idea : do the opposite of what they say on the forum - and it works! 

One must NOT convert to RGB! Maybe that changed at one point in MSVS or in GIMP... anyway, the settings that finally worked are :
Image/Mode -> Indexed colors (the original setting when opening an existing bitmap, DO NOT CHANGE THIS)

File/Export as ... : 
- Run-Length encoded : do not check
- Compatibility options : do not write color space information : check
- Advanced options : is not accessible, but that DOESN'T MATTER !

Tested with Microsoft Visual Studio 2019 enterprise edition. 


Thanks for your help !

Werner


Attached Files
.zip   Res.zip (Size: 2.4 KB / Downloads: 74)
Reply


Forum Jump: