Page 1 of 1

IMDisplay: version string

Posted: 2010-09-18T05:56:49-07:00
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

Re: IMDisplay: version string

Posted: 2010-09-18T07:20:35-07:00
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.

Re: IMDisplay: version string

Posted: 2010-09-18T08:06:04-07:00
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

Re: IMDisplay: version string

Posted: 2010-09-18T10:03:56-07:00
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.