Re: WinLoadDlg fails on a WSeB system (WinGetLastError = 0x00081003), works fine for me with eCS 1.0 :(
- From: Marty <net@xxxxxxxxxxxxxxxxxxx>
- Date: Fri, 01 Feb 2008 18:20:52 -0800
Rich Walsh wrote:
On Fri, 1 Feb 2008 21:08:42 UTC, Marty <net@xxxxxxxxxxxxxxxxxxx> wrote:
A user running a piece of software that I wrote reports that he can't get up a certain dialog window with the current software version (but somehow past versions were fine). I added one new kind of control to this dialog window - a standard pushbutton with a mini-icon picture instead of text. The resource definition is as follows:
CONTROL "#2", PB_widgetID, <x>, <y>, <cx>, <cy>, WC_BUTTON,
BS_PUSHBUTTON | BS_MINIICON | WS_VISIBLE | WS_GROUP | WS_TABSTOP
This resource resides in a DLL, which also has an icon in the "#2" slot. The executable itself only has a single resource of an icon in the "#1" slot.
ISTR encountering something like this but I can't remember where
or when. My guess is that although you're supplying the HMOD for
the dll when you create the dialog, something is using the handle
for your exe to load the icon
As a workaround, try setting the button to use the icon from the
exe. In WM_INITDLG, load the correct icon, then send the button
a WM_SETWINDOWPARAMS. Refer to the definitions for the WNDPARAMS
and BTNCDATA structures for more details on what goes where.
I'll give it a shot, thanks!
BTW... those msgs you listed were of no particular use because they
were all frame (dialog window) msgs. Actually, I don't think any
msgs would illuminate the situation. AFAIK, if the dialog creation
code finds that the control it's about to create needs an additional
resource (e.g. an icon), it attempts to load it. If the load fails,
it aborts the entire process & destroys the dialog. I don't think
it directly generates any messages at all except WM_INITDLG (what
msgs you might see are the byproduct of calls like WinCreateWindow()).
Figured it was something like that.
--
[Reverse the parts of the e-mail address to reply.]
.
- Follow-Ups:
- References:
- Prev by Date: Re: WinLoadDlg fails on a WSeB system (WinGetLastError = 0x00081003), works fine for me with eCS 1.0 :(
- Next by Date: Crash address in DOSCALL1
- Previous by thread: Re: WinLoadDlg fails on a WSeB system (WinGetLastError = 0x00081003), works fine for me with eCS 1.0 :(
- Next by thread: Re: WinLoadDlg fails on a WSeB system (WinGetLastError = 0x00081003), works fine for me with eCS 1.0 :(
- Index(es):
Relevant Pages
|