IMDisplay: version string

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: version string

Post by tilman »

Hello,

I suggest the following change, which would have the version string displayed in the about box.

in the rc file, in IDD_ABOUTBOX add the line with IDC_STATIC_VERSION, and possibly change the numbers from the first line (I can't remember if I had to enlarge the dialogbox)

Code: Select all

IDD_ABOUTBOX DIALOGEX 0, 0, 235, 69
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "About IMDisplay"
FONT 8, "MS Sans Serif", 0, 0, 0x0
BEGIN
    ICON            IDR_MAINFRAME,IDC_STATIC,11,17,20,20
    LTEXT           "IMDisplay Version 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
    LTEXT           "Copyright (C) 2002 ImageMagick Studio",IDC_STATIC,40,25,119,8
    LTEXT           "Version Text",IDC_STATIC_VERSION,40,40,188,8
    DEFPUSHBUTTON   "OK",IDOK,178,7,50,14,WS_GROUP
END

In resource.h, add

Code: Select all

#define IDC_STATIC_VERSION              1009
and change _APS_NEXT_CONTROL_VALUE to 1010 (or do the whole change with the gui, by creating a static named IDC_STATIC_VERSION, like I did)


In IMDisplay.cpp, add an OnInitDialog() override. There, add this line:

Code: Select all

    SetDlgItemText (IDC_STATIC_VERSION, CString("Version: ") + MagickVersion); //TH
Result:

Image

Uploaded with ImageShack.us


Tilman Hausherr
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: IMDisplay: version string

Post by magick »

Good stuff. Can you post a URL to your modified Resource.h, IMDisplay.rc, and IMDisplay.cpp so we can download it and test your changes. If they work as expected, we'll get the patches into the main ImageMagick distribution.
User avatar
tilman
Posts: 19
Joined: 2010-09-15T03:23:33-07:00
Authentication code: 8675308
Location: Berlin, Germany

Re: IMDisplay: version string

Post by tilman »

magick wrote:Good stuff. Can you post a URL to your modified Resource.h, IMDisplay.rc, and IMDisplay.cpp so we can download it and test your changes. If they work as expected, we'll get the patches into the main ImageMagick distribution.
There it is:

http://pastebin.com/reZce6Bs
http://pastebin.com/EaX0SNmn
http://pastebin.com/QTMq1f1s

I've set an expiration time of a month.

Tilman Hausherr
User avatar
tilman
Posts: 19
Joined: 2010-09-15T03:23:33-07:00
Authentication code: 8675308
Location: Berlin, Germany

Re: IMDisplay: version string

Post by tilman »

tilman wrote:
magick wrote:Good stuff. Can you post a URL to your modified Resource.h, IMDisplay.rc, and IMDisplay.cpp so we can download it and test your changes. If they work as expected, we'll get the patches into the main ImageMagick distribution.
There it is:

http://pastebin.com/reZce6Bs
http://pastebin.com/EaX0SNmn
http://pastebin.com/QTMq1f1s

I've set an expiration time of a month.

Tilman Hausherr
http://pastebin.com/Se78gtid (resource.h) updated, there was a bug that resulted in the expanded menu not to be shown after a file was opened.
Post Reply