delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/01/11/19:33:00

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
X-Authentication-Warning: hp2.xraylith.wisc.edu: khan owned process doing -bs
Date: Tue, 11 Jan 2000 18:35:02 -0600 (CST)
From: Mumit Khan <khan AT NanoTech DOT Wisc DOT EDU>
To: Sascha Ziemann <szi AT khs-ag DOT de>
cc: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: windres and an icon in a dialog
In-Reply-To: <m3ln5xd0hc.fsf@intra.do.khs-ag.de>
Message-ID: <Pine.HPP.3.96.1000111183304.29850A-100000@hp2.xraylith.wisc.edu>
MIME-Version: 1.0

On 10 Jan 2000, Sascha Ziemann wrote:

> I have defined the icon:
> 
> ABOUT1 ICON DISCARDABLE "icon5.ico"
> 
> And then I use it:
> 
> ABOUT_WINDOW DIALOG DISCARDABLE 32, 32, 180, 100
> STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
> FONT 8, "MS Sans Serif"
> BEGIN
>   DEFPUSHBUTTON  "Ok", IDOK, 66, 80, 50, 14
>   ICON           "ABOUT1", IDC_STATIC, 7, 7, 32, 32, 0
>   CTEXT          "text one", IDC_STATIC, 40, 12, 100, 8
>   CTEXT          "text two", IDC_STATIC, 7, 52, 166, 8
> END
> 
> But it is missing in the dialog.  The strings and the button are there
> and windres does not report any errors.
> 

It looks like a bug in windres. Here's a fix that works for both windres
and MS RC. The bug seems to be the icon controls within dialogs don't
like being defined in terms of "id", but rather expect a "name" instead.

    about_icon ICON DISCARDABLE "icon5.ico"

    ABOUT_WINDOW DIALOG DISCARDABLE 32, 32, 180, 100
    STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
    FONT 8, "MS Sans Serif"
    BEGIN
      DEFPUSHBUTTON  "Ok", IDOK, 66, 80, 50, 14
      ICON           "about_icon", IDC_STATIC, 7, 7, 32, 32, SS_ICON
      CTEXT          "text one", IDC_STATIC, 40, 12, 100, 8
      CTEXT          "text two", IDC_STATIC, 7, 52, 166, 8
    END

I'll fix this for the next release. Thanks for the bug report with a 
easy to work with testcase!

Regards,
Mumit



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019