IMDisplay: common image files in file open dialog

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
User avatar
tilman
Posts: 19
Joined: 2010-09-15T03:23:33-07:00
Authentication code: 8675308
Location: Berlin, Germany

IMDisplay: common image files in file open dialog

Post by tilman »

Hello,

The file open dialogbox is unpractical because it doesn't show all image types immediately. I suggest an improvement, so that people get shown all common images:

In the rc file, add this below IDR_IMGIFTYPE:

Code: Select all

 IDR_IMIMAGETYPE         "\nImage\n\nCommon image files\n.jpg;.png;.tif;.tiff;.bmp;.wmf;.mif;.miff;.svg;.eps;.gif\n\n"
define IDR_IMIMAGETYPE in resource.h or in the gui:

Code: Select all

#define IDR_IMIMAGETYPE                 139
correct _APS_NEXT_RESOURCE_VALUE:

Code: Select all

#define _APS_NEXT_RESOURCE_VALUE        140
below this

Code: Select all

CMultiDocTemplate* pDocTemplate;
add this:

Code: Select all

            //TH all image types, default
        pDocTemplate = new CMultiDocTemplate(
	        IDR_IMIMAGETYPE,
	        RUNTIME_CLASS(CIMDisplayDoc),
	        RUNTIME_CLASS(CChildFrame), // custom MDI child frame
	        RUNTIME_CLASS(CIMDisplayView));
	AddDocTemplate(pDocTemplate);
and remove the block with "JPEG (default)".

result:
Image

Tilman Hausherr
Post Reply