Menu

#5 G_CICON transformed to G_USERDEF

open
nobody
None
5
2005-12-06
2005-12-06
No

It seems that G_CICON are not always transformed to
G_USERDEF object. I've found this by reading the code,
not tested.

When a RSC is loaded with RsrcXload(), then all G_CICON
objects are transformed to G_USERDEF (only if the
running AES doesn't support color icon in last cvs
version of windom). This allows color icons to be
correctly rendered on the screen even if the AES
doesn't support color icons.

When a RSC is loaded with RsrcLoad(), then G_CICON
objects remain G_CICON objects (no way to transform
them to G_USERDEF). The function RsrcXtype() won't
help. In other words, if the AES doesn't support color
icons, then the screen rendering of forms with color
icons loaded by RsrcLoad() won't be correct.

Modification:
G_CICON object should always be transformed to
G_USERDEF by RsrcXload() and RsrcLoad() if the AES
doesn't support color icons => RsrcLoad() behaviour
shall be similar to RsrcXload()'s for color icons feature.

Discussion

  • Arnaud BERCEGEAY

    Logged In: YES
    user_id=233304

    The functionality should be the same with RsrcLoad() and
    RsrcXload(), but it's good to let the user chose if G_CICON
    should be transformed to G_USERDEF or not.

    => the transformation may be perfomed in another function.
    RsrcXtype() seems to be a good place.

     
  • STanda Opichal

    STanda Opichal - 2006-02-14

    Logged In: YES
    user_id=338626

    What is the real benefit of having two different Rsrc*Load()
    functions?

    If we generalize this it can work as follows (we should only
    leave RsrcLoad() there for backward compatibility IMO):

    RsrcLoad() {
    app->rsc = RsrcXLoad();
    ... fix all the remaining things to let
    mt_objc_gaddr() and family work ...
    }

     
  • STanda Opichal

    STanda Opichal - 2006-02-14

    Logged In: YES
    user_id=338626

    WinDom is there to shield the AES incompatibilities for the
    programmer so from the logical point of view it should do
    the tranformation automatically when needed.

    However that changes the the OBJECT structure to G_USEDEF...
    which would make it inconsistent between different OSes.

    In the end Arnaud is right that this should only be done
    upon an extra application programmer request (e.g. via an
    extra mode introduced to RsrcXtype()). However the
    RsrcLoad() should still IMO use the RsrcXLoad() internally
    (which should not convert anything however).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.