POPCAPTION with resources in external DLL

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1194
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

POPCAPTION with resources in external DLL

#1 Post by skiman »

Hi Roger,

I was changing my application to use an external DLL for my buttons. It seems as the POPCAPTION doesn't work with this. I did the following:

- I created the external DLL, named ABO_RES.DLL
- At the start of my application, I have:
nResDll := dllLoad("ABORES.DLL')
DC_BitmapResourceFile( nResDll)
- The captions of the pushbuttons are OK.
- Where I used a POPCAPTION, there is nothing shown.
- As POPCAPTION i have ABO_SEARCH_MINI. I tested this on a button, and it is working correctly, so it must be in my DLL.
- I tested the wonderfull BITMAP_BUG_M as POPCAPTION, and this is also working.

Is it possible that POPCAPTION doesn't use the 'nResDll' which is specified with dc_BitmapResourceFile?
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4745
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: POPCAPTION with resources in external DLL

#2 Post by rdonnay »

Chris -

You are right about this.
I never noticed this before.

Made the following change to _DCXBPGT.PRG at line 592 then rebuild DCLIPX.DLL by running BUILD19_SL1.BAT.
DC_GetBitmap() always returns an XbpBitmap object from a resource or file name.

WAS:

Code: Select all

  IF Valtype(cCaption[2])='A'
    ::popupButton:caption := cCaption[2,1]
  ELSE
    ::popupButton:caption := cCaption[2]
  ENDIF
IS:

Code: Select all

  IF Valtype(cCaption[2])='A'
    ::popupButton:caption := DC_GetBitmap(cCaption[2,1])
  ELSE
    ::popupButton:caption := DC_GetBitmap(cCaption[2])
  ENDIF
The eXpress train is coming - and it has more cars.

skiman
Posts: 1194
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: POPCAPTION with resources in external DLL

#3 Post by skiman »

Roger,

Yes, this fixes it. :dance:

Another question, as Icon for my application I now have the eXpress++ icon. Is it possible to change this without changing something in express.arc?

In express.arc there is a define of ICON_APP 2.

Do I have to change that to a number of my resources?

Regards,
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4745
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: POPCAPTION with resources in external DLL

#4 Post by rdonnay »

Try this:

Code: Select all

DC_IconExpress( DC_GetBitmap( MYICON ))
The eXpress train is coming - and it has more cars.

skiman
Posts: 1194
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: POPCAPTION with resources in external DLL

#5 Post by skiman »

Roger,

Seems as dc_iconExpress() is a function for the future? :D There is dc_iconDefault() but this is not the problem.

I want to have my icon when my application is in a listing with Explorer. It is not the icon after startup. This can be changed.

Also when a user creates a shortcut to my application on his desktop, I want my icon as standard. Now they will get the eXpress rocket.

Regards
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4745
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: POPCAPTION with resources in external DLL

#6 Post by rdonnay »

I meant DC_IconDefault(). Sorry.

I think you need to assign your icon to resource #1 to make it show up in Explorer.
I also think it needs to be in the EXE.
The eXpress train is coming - and it has more cars.

Post Reply