Hi Roger
It appears that DC_IconDefault( [<nIcon>] ) only works with resource file linked to the .EXEcutable program.
My application resource file is a .DLL loaded with the DC_BitmapResourceFile( {DllLoad('PPSRES.DLL')} ). How can this be achieved.
Thanks.
Joe
DC_IconDefault()
Re: DC_IconDefault()
have a look into Source c:\exp19\Source\Dclipx\_dcmsg.prgunixkd wrote:It appears that DC_IconDefault( [<nIcon>] ) only works with resource file linked to the .EXEcutable program.
My application resource file is a .DLL loaded with the DC_BitmapResourceFile( {DllLoad('PPSRES.DLL')} ). How can this be achieved.
Code: Select all
FUNCTION DC_IconDefault( nIcon )
STATIC snIcon := nil
LOCAL nOldIcon := snIcon
snIcon := IIF(Valtype(nIcon)='N',nIcon,snIcon )
RETURN nOldIcon
greetings by OHR
Jimmy
Jimmy
Re: DC_IconDefault()
Thanks.
How can I set a default ICON for my application. All forms/dialogs will have this ICON.
Joe
How can I set a default ICON for my application. All forms/dialogs will have this ICON.
Joe
Re: DC_IconDefault()
You are looking at some old code.
I updated this a few builds back.
I don't recall which. This now accepts an XbpIcon object.
Try this:
oIcon := DC_GetBitmap( <nIconRes> )
DC_IconDefault(oIcon)
I updated this a few builds back.
I don't recall which. This now accepts an XbpIcon object.
Try this:
oIcon := DC_GetBitmap( <nIconRes> )
DC_IconDefault(oIcon)
Code: Select all
FUNCTION DC_IconDefault( noIcon )
STATIC snoIcon := nil
LOCAL noOldIcon := snoIcon
snoIcon := IIF(Valtype(noIcon)$'NO',noIcon,snoIcon )
RETURN noOldIcon
The eXpress train is coming - and it has more cars.
Re: DC_IconDefault()
Hi Roger
Your suggested solution did not work. I discover that the DC_GetBitmap() returns the resource ID and not a Bitmap object from the ICON id passed.
Thanks.
Joe
Your suggested solution did not work. I discover that the DC_GetBitmap() returns the resource ID and not a Bitmap object from the ICON id passed.
Thanks.
Joe
Re: DC_IconDefault()
Send me your .DLL and the resource number.
Better yet, send me a small sample of code too.
I will work on this and give you a solution.
Better yet, send me a small sample of code too.
I will work on this and give you a solution.
The eXpress train is coming - and it has more cars.
Re: DC_IconDefault()
Hi Roger
I solved the problem.
it is required that one link the ICON resource to the EXE and the function will work correctly.
Thanks.
Joe
I solved the problem.
it is required that one link the ICON resource to the EXE and the function will work correctly.
Thanks.
Joe
Re: DC_IconDefault()
I knew, of course, that this would work, but I thought you were trying to use the resource from a DLL.it is required that one link the ICON resource to the EXE and the function will work correctly.
The eXpress train is coming - and it has more cars.