HOW can I Link Manifest file to my EXE ?

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

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

#11 Post by skiman »

Hi,

It is working, but this has a side-effect which is logical.
novisualstyleincell.png
novisualstyleincell.png (5.27 KiB) Viewed 9849 times
If I understand it correctly, the cause is the USEVISUALSTYLE?
Best regards,

Chris.
www.aboservice.be

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

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

#12 Post by skiman »

Hi,

Meanwhile I did a few tests. Looks as I have two choices: disable usevisualstyle or using ownerdrawing.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

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

#13 Post by Tom »

Hi, Chris.
Looks as I have two choices: disable usevisualstyle or using ownerdrawing.
You're right. With the themes, Microsoft decided that selective components like browses, listboxes a.s.o. are not allowed to change their foreground colors for data representation.

Did you look at my sample code? It's quite simple to draw the browse contens by yourself. You can add multiline support (see sample), icons and any informations you want.

In addition to the ownerdrawing feature, Xbase++ supports HTML-based-formatting and CSS for browses and other controls. To be honest, I didn't try this out yet, since Xbase++ can't be used in a productive environment at it's current stage.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

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

#14 Post by rdonnay »

Tom That's very nice. Good effect.
The eXpress train is coming - and it has more cars.

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

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

#15 Post by Tom »

Roger - this is nothing. I show you what I'm doing with browses, listboxes and even statics and ownerdrawing in may.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

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

#16 Post by skiman »

Hi Tom,

Thanks for your sample.

I know that you are a specialist in browses with ownerdrawing. I have seen your agenda some years ago. I think it is time to look at this stuff. I will search for another thread on this forum where we already discussed this a bit.
Best regards,

Chris.
www.aboservice.be

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

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

#17 Post by skiman »

Hi Tom,

It is working now, but it is slooooooooooooooooow!
ownerdraw.png
ownerdraw.png (6.93 KiB) Viewed 9834 times
I modified your function, because there was an error on a numeric column.

Code: Select all

* Text anzeigen (der eigentliche Kern der Angelegenheit):
IF valtype(xData)=="C" .and. CRLF $ xData // enth„lt einen Zeilenumbruch
  xData1 := Trim(Left(xData,At(CRLF,xData)-1))
  xData2 := Trim(SubStr(xData,At(CRLF,xData)+2,Len(xData)-(At(CRLF,xData))))
  GraCaptionStr( oPS, { aInfo[ XBP_DRAWINFO_RECT, 1 ], aInfo[ XBP_DRAWINFO_RECT, 2 ]+15 }, { aInfo[ XBP_DRAWINFO_RECT, 3 ], aInfo[ XBP_DRAWINFO_RECT, 4 ] }, xData1, nAlign )
  IF aInfo[XBP_DRAWINFO_STATE] = XBP_DRAWSTATE_SELECTED
    oPs:SetFont(oFontSmallHilite)
    ELSE
    oPs:SetFont(oFontSmall)
  ENDIF
  GraCaptionStr( oPS, { aInfo[ XBP_DRAWINFO_RECT, 1 ], aInfo[ XBP_DRAWINFO_RECT, 2 ] }, { aInfo[ XBP_DRAWINFO_RECT, 3 ], aInfo[ XBP_DRAWINFO_RECT, 2 ]+15 }, xData2, nAlign )
ELSE
  GraCaptionStr( oPS, aInfo[ XBP_DRAWINFO_RECT ], { aInfo[ XBP_DRAWINFO_RECT, 3 ], aInfo[ XBP_DRAWINFO_RECT, 4 ] }, var2char(xData), nAlign )
ENDIF

I added an EVAL() to my dcread.

Code: Select all

DCCOLUMN .... OBJECT oCOlumn ...

DCREAD ... 
EVAL{|| oColumn:DataArea:DrawMode := XBP_DRAW_OWNER , oColumn:DataArea:CustomDrawCell := {|oPs,aInfo,oArea|PaintCellWithForeGround(oPs,aInfo,oArea)}  }
When refreshing the browse, you can see the refreshing of the row line by line. I can't use it this way. Have you encountered this kind of problem in your browses. I don't expect you did, otherwise you wouldn't use it in production.
Best regards,

Chris.
www.aboservice.be

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

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

#18 Post by Tom »

Hi, Chris.

That was just a small sample I created three or four years ago. There maybe errors in it with different datatypes.

I'dont use that the way you try to do. I create a subclass for DCBROWSE with a CustomDrawCell method. Anyway, it's very fast in my apps. I will check your code/approach these days and try to find out what's going wrong there. Looks like repainting is done ways too often.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

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

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

#19 Post by skiman »

Hi Tom,

I realize that I implemented it now the 'quick and dirty' way.

I will work on it to subclass it with a new method. The ownerdrawing on the buttons is fast, so there should be no reason why the speed isn't on the same level for the browse.
Best regards,

Chris.
www.aboservice.be

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

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

#20 Post by rdonnay »

The ownerdrawing on the buttons is fast, so there should be no reason why the speed isn't on the same level for the browse.
I agree. I haven't seen slowness due to ownerdrawing before.
It think it may be that there is a lot of redrawing going on here.
The eXpress train is coming - and it has more cars.

Post Reply