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.
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.
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 ...
}
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).