#177 Windres doesn't allow integer ctrl names

Feature_requests
closed-fixed
Luke Dunstan
binutils (105)
2003-04-04
2002-08-21
Luke Dunstan
No

A user reported that windres does not support bitmap-
style static controls such as:

DLG_101 DIALOGEX 0, 0, 132, 95
...
CONTROL MYPICTURE, IDB_BITMAP, "Static",
SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN, 6,
7, 120, 40
END

MYPICTURE BITMAP c:\app\peek.bmp

MYPICTURE is #defined integer identifier, but windres
only allows an (optional) quoted string for the first
parameter of a dialog control. From what I have tried,
MS RC supports integers for any control name,
including e.g. PUSHBUTTONS (not just CONTROL
controls).

Windres was modified to support integers for ICON
controls, so I propose that this be extended to all
controls.

I will start work on this change whenever I am able.

Discussion

  • Luke Dunstan
    Luke Dunstan
    2002-08-21

    • assigned_to: dannysmith --> infidel
     
  • Earnie Boyd
    Earnie Boyd
    2002-09-07

    Logged In: YES
    user_id=15438

    Is this fixed with the 09/03 version of binutils?

    Earnie.

     
  • Luke Dunstan
    Luke Dunstan
    2002-09-08

    Logged In: YES
    user_id=30442

    No.

    FYI, a proper test case is:

    #include <windows.h>

    101 DIALOGEX 0, 0, 200, 200

    BEGIN
    CONTROL "stringid", 102, "Static",
    SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN, 5,
    5, 10, 10
    CONTROL 300, 103, "Static",
    SS_BITMAP | SS_CENTERIMAGE | SS_SUNKEN, 20,
    20, 30, 30
    END

    The second control is rejected by windres because it uses
    an integer for the 'name' field instead of a string. In a
    working program you would need to define a corresponding
    bitmap resource:

    300 BITMAP foo.bmp

     
  • Earnie Boyd
    Earnie Boyd
    2003-01-06

    Logged In: YES
    user_id=15438

    Luke, is this fixed with the just announced release of binutils?

    Earnie.

     
  • Danny Smith
    Danny Smith
    2003-03-24

    Logged In: YES
    user_id=11494

    Luke, have you been following this on binutils list. Ian
    Lance Taylor has posted a patch that seems to fix, but
    is waiting for feedback.

    Danny

     
  • Luke Dunstan
    Luke Dunstan
    2003-03-24

    Logged In: YES
    user_id=30442

    No, I wasn't subscribed to binutils but I have just subscribed
    now. The patch does look correct so hopefully it will be
    accepted.

     
  • Danny Smith
    Danny Smith
    2003-04-04

    Logged In: YES
    user_id=11494

    Fixed in binutils srcs.
    Danny

     
  • Danny Smith
    Danny Smith
    2003-04-04

    • status: open --> closed-fixed