Page 1 of 3

HOW can I Link Manifest file to my EXE ?

Posted: Wed Mar 18, 2015 5:23 pm
by unixkd
Hi All,

HOW can I Link Manifest file to my EXE ? I included it im my resource file which is compiled to a DLL (MyApp.Res to MyApp.DLL)

Thanks.

Joe

Re: HOW can I Link Manifest file to my EXE ?

Posted: Wed Mar 18, 2015 7:09 pm
by rdonnay
You put it in the same folder as your EXE and then recompile the EXE.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 3:30 am
by Tom
Add a section like this to the .ARC-file of your app:

Code: Select all

#define MANIFEST_RESID 1
#define MANIFEST 24

USERDEF MANIFEST
  MANIFEST_RESID = FILE "c\myapp\manifest\myapp.exe.manifest"
Create the ressource file and recompile your app. You don't need to deliver a manifest file anymore.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 4:25 am
by rdonnay
You don't need to deliver a manifest file anymore.
Tom - Thanks for that. I will use it.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 6:05 am
by skiman
Hi,

I have a problem when using a manifest file. Colors in a browse aren't working anymore when I have a Manifest file in combination with Windows 7. I never noticed it with Windows XP.
With the manifest the column with the quantity remains black.
withmanifest.png
withmanifest.png (5.45 KiB) Viewed 11786 times
When I delete the manifest file, I have the following result, which I want.
withoutmanifest.png
withoutmanifest.png (4.28 KiB) Viewed 11786 times
When the manifest is part of the exe, you don't have the option to delete it. Or is there a possibility to enable/disable the manifest file?

Im' using ...COLOR {|o| ... } in my dcbrowsecol.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 6:10 am
by rdonnay
Chris -

Do you have a small sample program?
I will help you with this if you can save me some time creating the sample.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 8:06 am
by skiman
Hi Roger,

here it is.

I modified the sample browtip.prg.

If you compile it, you will see that column two isn't colored when you are using the browtip.exe.manifest file.

The browse.zip contains a browtip.prg and a browtip.exe.manifest.

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 2:20 pm
by Auge_Ohr
skiman wrote:I have a problem when using a manifest file. Colors in a browse aren't working anymore when I have a Manifest file in combination with Windows 7. I never noticed it with Windows XP.
XP "visual Style" is not the same as Win7 which use DWM ... and not Win8/10 (checkit)

ColorBlock does NOT work while it is covered by "visual Style" so you have 2 Solution
a.) disable "visual Style" for Browse
b.) use Ownerdraw (without GraBackground )

Re: HOW can I Link Manifest file to my EXE ?

Posted: Thu Mar 19, 2015 8:00 pm
by rdonnay
This worked for me:

Code: Select all

DCBROWSECOL FIELD COLLECT->DESCRIP  PARENT oBrowse   WIDTH 10 HEADER "Description"
DCBROWSECOL FIELD COLLECT->TYPE     PARENT oBrowse   WIDTH 8  HEADER "Type" ;
   EVAL {|o|o:dataArea:useVisualStyle := .f.} ;
   COLOR {|o| if( .T. , { GRA_CLR_RED , GRA_CLR_WHITE },{GRA_CLR_GREEN ,GRA_CLR_WHITE } ) }
DCBROWSECOL FIELD COLLECT->LOCATION PARENT oBrowse   WIDTH 6  HEADER "Location"
DCBROWSECOL FIELD COLLECT->BITMAP1  PARENT oBrowse   WIDTH 6  HEADER "Bitmap 1"
DCBROWSECOL FIELD COLLECT->BITMAP2  PARENT oBrowse   WIDTH 6  HEADER "Bitmap 2"

Re: HOW can I Link Manifest file to my EXE ?

Posted: Fri Mar 20, 2015 1:05 am
by Tom
This is fixed in Xbase++ 2.0 (although Xbase++ 2.0 comes with new errors).

Switching off the visual styles causes the browse to look ugly ("classic"). I added a subclass to all dcbrowses, retrieve the foreground color, if visual styles are enable for the dataarea, and paint the text by myself. Attached is a small sample (plain Xbase++, no eXpress++), which shows how to do this. This could be used in a DCBROWSE with some small changes.