I am using Windows 8 RTM and Visual Studio Express 2012 for Windows Desktop. I am trying to write an application that uses UIRibbon in Visual C++. (Because I have the Express version only, I don't have access to MFC; please don't use it in your answer.)
The problem has to do with the icons I use in the ribbon. Because Windows 7 compatibility is a requirement for this project, I cannot use PNG images; I am stuck with old-school BMPs. The problem is that, while some of the BMPs are displaying correctly, most of the images have black bounding-boxes around them. I suspect the problem has to do with the BMP files, and is not in the ribbon XML file or in the code.
The BMP that displays correctly I downloaded off the Internet as part of a sample that I adapted. The BMPs that don't display correctly I extracted from an ICO file, then converted to a 32-bit image using the System.Drawing.Bitmap .NET API. (This conversion process is in done in a separate program as part of my build procedure, not at runtime.)
My question is: Does changing the bit depth of a BMP in this manner affect the colors in the image? And, if so, can anyone point out a free tool that can turn a PNG file into a 32-bit BMP file that works correctly in the Windows UIRibbon?
Do you speak of the Windows Ribbon Framework here? If so, you wouldn't be able to use PNGs anyway as the framework supports BMP only for Windows 7. With Windows 8 you can also use PNGs. See the regarding MSDN article for more information.
For a free tool which converts your PNGs into compatible BMP files, you should have a look at the visual designer that comes with the "Windows Ribbon Framework for Delphi".
You can simply load you XML markup into the editor and add your pictures. The editor will then convert the added files into BMPs if required. You can also use the editor to check if your Ribbon definition looks right. It produces valid "Windows Ribbon Framework" XML markup, so you can use the markup file in any other language such as C++, C# or Delphi for your further application development.
Related
Is there any possibility to open word or pdf file in Windows Phone ?
I get the file byte data from specified API, and I want to have possibility in my application to preview the file...
you might have a look at this tutorial:
http://mobile.dzone.com/news/displaying-pdf-files-windows
But the component used is not open source. http://www.componentone.com/SuperProducts/PdfViewerPhone/
As far as i know there are no open source pdf viewer implementations for WP7/8 available.
You could try to get ComponentOne for free or with an massiv discount if you are an registered windows phone developer. Have a look at http://dev.windowsphone.com/en-us/featured/partners
I think you need to use FOXIT SDK for WP7
My problem is when I open my old project (project that work by same Delphi Version), I lost the entire image picture contents. By this I mean picture property is None.
When I open dfm with notepad, the picture property has Data but when I open it with delphi, its picture data will disapear. It seems that Delphi recognize picture data invalid.
(in this situation Delphi erase all data).
This happen with all Image Components and all Components that have Picture Property
I encounted this problem when I reinstall Delphi, and I am now running Delphi version 2007.
Your problem is probably caused by a missing package supporting the stored image format. Check for any image or graphics library that has been installed on your previous system and is missing in the current one. A good candidate for that is always GraphicEx.
I remember reading once that there was a way to embed an image into a code file (e.g. a screenshot or diagram) in Visual Studio, but now I can't find any reference to that feature.
Is this possible to do, or am I imagining things?
EDIT: I don't mean embed the image in the executable, for use at runtime. I mean link or embed it literally in the code, for use by developers.
There is a plug-in for VS 2010 that can do this:
Plug-in
There is also a plugin for VS2012 and VS2013. At this moment installing for VS2013 does not seem to work for me though.
ImageComments extension on GitHub
You can embed images in your binary through the use of the ImageList control, which is typically used to store small icons for list controls, gridviews, etc., but could also be used for storing really any image for any purpose. A better solution would be to include a resource file and store your images there.
I've got a 16 pixel high image that I've created in Paint.NET that I'd like to use in a Visual Studio toolbar.
My image is a .PDN file with multiple layers. Visual Studio requires a 32bpp BMP file. How do I convert the .PDN file to the correct format .BMP file?
I'm not looking to have this happen in my program.
I'm cool with having to do something manually whenever a change is made to the .PDN file, although I'd prefer something I can integrate with my automated build.
I've tried using the BmpX extension to Paint.NET, but it saves the background as white, rather than transparent. I've tried using ImageMagick's convert utility, but something's wrong with the saved BMP file, and VS displays it slightly corrupted and offset to the right by a couple of pixels.
Note: I'm using convert.exe by saving from Paint.NET as a .PNG file and then using convert strip.png strip.bmp. The transparency's correct, though.
It turns out that VS2010 can cope with .PNG files.
How can I create the preview image for MS Office files like word, excel, power point in cocoa. Can anyone suggest me on this like how to handle those file? I tried using the Bitmap representation of the .doc files. It didn't work. Which API I can use?
It sounds like you want to use Quick Look. There is a great example of using Quick Look to generate an NSImage you can display anywhere with this code from Matt Gemmell
Look inside the snippets/QuickLook folder in the ZIP file he links to, and you'll find his code for getting the Quick Look preview for any file. Leopard and Snow Leopard can preview most Office files out of the box without needing Office to be installed.