Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #6850 > unrolled thread
| Started by | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| First post | 2014-05-15 20:22 -0700 |
| Last post | 2014-05-23 12:21 -0400 |
| Articles | 13 — 2 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-15 20:22 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-18 15:32 -0400
Re: Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-18 19:35 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-19 11:45 -0400
Re: Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-19 10:26 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-19 13:43 -0400
Re: Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-20 13:41 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-20 16:57 -0400
Re: Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-20 16:42 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-20 21:32 -0400
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-20 21:58 -0400
Re: Help - Manifest Breaks FabCtrl Kuno Egger <kuno@retailsoftware.com> - 2014-05-22 19:00 -0700
Re: Help - Manifest Breaks FabCtrl "Jamal" <someone@example.com> - 2014-05-23 12:21 -0400
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-15 20:22 -0700 |
| Subject | Help - Manifest Breaks FabCtrl |
| Message-ID | <f0d020d3-6e60-4135-8299-c4355003fe50@googlegroups.com> |
I have been using Fab Ctrl (3.014 I think) to re-size and display jpeg, bmp, etc. When I add the following application manifest it breaks the photo display: RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST cctl6.man Has anyone seen this before? Any advice would be greatly appreciated. Kuno
[toc] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-18 15:32 -0400 |
| Message-ID | <llb1sq$itj$1@speranza.aioe.org> |
| In reply to | #6850 |
cctl6.man is the default Visual Objects manifest file. Did you make changes to it? You should really create a a copy of the file and place it into the EXE folder and provide FULL PATH in the resource statement, then "touch" app and compile. Show us the contents of manifest file to make sure it is correctly coded. Jamal "Kuno Egger" wrote in message news:f0d020d3-6e60-4135-8299-c4355003fe50@googlegroups.com... I have been using Fab Ctrl (3.014 I think) to re-size and display jpeg, bmp, etc. When I add the following application manifest it breaks the photo display: RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST cctl6.man Has anyone seen this before? Any advice would be greatly appreciated. Kuno
[toc] | [prev] | [next] | [standalone]
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-18 19:35 -0700 |
| Message-ID | <2b948990-7762-4292-b4dc-6fbf40a40548@googlegroups.com> |
| In reply to | #6857 |
Jamal: RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST %appwizdir%\cctl6.man Thanks, Kuno
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-19 11:45 -0400 |
| Message-ID | <lld8u5$1ru$1@speranza.aioe.org> |
| In reply to | #6859 |
Kuno, I asked for the contents of the file not the statement with the path. Can you list the actual contents here? One other question, are you running Windows in classic mode or the XP theme mode? Jamal "Kuno Egger" wrote in message news:2b948990-7762-4292-b4dc-6fbf40a40548@googlegroups.com... Jamal: RESOURCE CREATEPROCESS_MANIFEST_RESOURCE_ID RC_RT_MANIFEST %appwizdir%\cctl6.man Thanks, Kuno
[toc] | [prev] | [next] | [standalone]
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-19 10:26 -0700 |
| Message-ID | <2cdd50da-222f-41a3-97c7-66f143972373@googlegroups.com> |
| In reply to | #6864 |
Oops - sorry. See below.
The FabPaintLib Demo works fine with the same manifest in both Win7 and Win8 but I have not been able to locate the offending code in my app. Without the manifest it works fine - with the manifest it doesn't. <scratching head>
Cheers
Kuno
-----------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="VO.Application"
type="win32"
/>
<description>Visual Objects Application.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-19 13:43 -0400 |
| Message-ID | <lldfrn$l3c$1@speranza.aioe.org> |
| In reply to | #6865 |
The manifest file looks fine.
Let go back to the initial question when you said "it breaks the photo
display". What did mean by that? What happens?
Does it have to do with the background of the images?
Jamal
"Kuno Egger" wrote in message
news:2cdd50da-222f-41a3-97c7-66f143972373@googlegroups.com...
Oops - sorry. See below.
The FabPaintLib Demo works fine with the same manifest in both Win7 and Win8
but I have not been able to locate the offending code in my app. Without the
manifest it works fine - with the manifest it doesn't. <scratching head>
Cheers
Kuno
-----------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="X86"
name="VO.Application"
type="win32"
/>
<description>Visual Objects Application.</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="X86"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
[toc] | [prev] | [next] | [standalone]
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-20 13:41 -0700 |
| Message-ID | <0b8f01b8-dd9e-41cd-a4cf-01b9ee462968@googlegroups.com> |
| In reply to | #6866 |
The following code displays a photo in a FabPaintLibCtrl if the manifest is NOT declared. As soon as the manifest is added back in the control remains blank. Can you spot the offending code? If I comment out the lines that resize large photos it still behaves the same.
------------------------------------------------------------------------
METHOD GetPhoto(sImagePath) CLASS FotoWin
LOCAL cFileName, cNameOnServer AS STRING
LOCAL oFS AS FILESPEC
LOCAL nWidth, nHeight AS LONG
cFileName := AllTrim(sImagePath)
cNameOnServer := cFileName
IF Empty(cFileName)
SELF:oDCbmpPict:Hide()
RETURN NIL
ELSE
IF ! Upper(SubStr(cProgramDir,1,1))$"CDEF"
cFileName := SubStr(cProgramDir,1,1) + alltrim(SubStr(cFileName,2,len(cFilename) - 1) )
ENDIF
oFS := FileSpec{cFileName}
ENDIF
IF ! Upper(Right(cFileName,4))$".BMP,.JPG,JPEG,TIFF,.JPE,.DIB,.RLE,.JIF,.PNG,.PCT,.TIF,.EPS,.TGA,.WMF,.EMF,.PCX,.PGM,.GIF,.EPS"
cFileName := ""
ENDIF
IF ! Empty(cFileName)
SELF:Pointer := Pointer{ POINTERHOURGLASS }
SELF:oDCbmpPict:Hide()
IF File(cFileName)
SELF:oDCbmpPict:Image := FabPaintLib{ cFileName }
nWidth := SELF:oDCbmpPict:Image:width
nHeight := SELF:oDCbmpPict:Image:height
IF nWidth > 411 .OR. nHeight > 284
DO WHILE nWidth > 411 .OR. nHeight > 284
IF Integer(nWidth * .6) < 411
nWidth := Integer(nWidth * .99)
nHeight := Integer(nHeight * .99)
ELSE
nWidth := Integer(nWidth * .6)
nHeight := Integer(nHeight * .6)
ENDIF
ENDDO
SELF:oDCbmpPict:Image:ResizeBox( nWidth, nHeight, 1 )
ENDIF
SELF:oDCbmpPict:Show()
ENDIF
SELF:Pointer := Pointer{ POINTERARROW }
ELSE
SELF:oDCbmpPict:Hide()
ENDIF
CollectForced()
RETURN NIL
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-20 16:57 -0400 |
| Message-ID | <llgfkd$cbd$1@speranza.aioe.org> |
| In reply to | #6873 |
Can you change the FabPaintLibCtrl library code of __DrawBackgroundDC()
method to the following which was heavily changed in 2012!
METHOD __DrawBackgroundDC( hMemDC AS PTR ) AS VOID PASCAL CLASS
FabPaintLibCtrl
LOCAL pRect IS _winRect
// LOCAL dwClr AS DWORD
LOCAL oBrush AS brush
IF SELF:BrushColor = NULL_OBJECT // jamal added 12-24-2012
oBrush := Brush{Color{COLORWHITE}} // JAMAL. ADDED brush Object
ELSE
oBrush := SELF:BrushColor // Brush{Color{COLORWHITE}} // JAMAL.
ADDED brush Object
ENDIF
GetClientRect( SELF:Handle(), @pRect )
// IF SELF:IsValid
// dwClr := COLOR_3DFACE
// ELSE
// dwClr := COLOR_3DSHADOW
// ENDIF
FillRect( hMemDC, @pRect, oBrush:Handle()) // PTR(_CAST,
dwClr+1 ) ) // jamal - modified
RETURN
HTH,
Jamal
"Kuno Egger" wrote in message
news:0b8f01b8-dd9e-41cd-a4cf-01b9ee462968@googlegroups.com...
The following code displays a photo in a FabPaintLibCtrl if the manifest is
NOT declared. As soon as the manifest is added back in the control remains
blank. Can you spot the offending code? If I comment out the lines that
resize large photos it still behaves the same.
------------------------------------------------------------------------
METHOD GetPhoto(sImagePath) CLASS FotoWin
LOCAL cFileName, cNameOnServer AS STRING
LOCAL oFS AS FILESPEC
LOCAL nWidth, nHeight AS LONG
cFileName := AllTrim(sImagePath)
cNameOnServer := cFileName
IF Empty(cFileName)
SELF:oDCbmpPict:Hide()
RETURN NIL
ELSE
IF ! Upper(SubStr(cProgramDir,1,1))$"CDEF"
cFileName := SubStr(cProgramDir,1,1) +
alltrim(SubStr(cFileName,2,len(cFilename) - 1) )
ENDIF
oFS := FileSpec{cFileName}
ENDIF
IF !
Upper(Right(cFileName,4))$".BMP,.JPG,JPEG,TIFF,.JPE,.DIB,.RLE,.JIF,.PNG,.PCT,.TIF,.EPS,.TGA,.WMF,.EMF,.PCX,.PGM,.GIF,.EPS"
cFileName := ""
ENDIF
IF ! Empty(cFileName)
SELF:Pointer := Pointer{ POINTERHOURGLASS }
SELF:oDCbmpPict:Hide()
IF File(cFileName)
SELF:oDCbmpPict:Image := FabPaintLib{ cFileName }
nWidth := SELF:oDCbmpPict:Image:width
nHeight := SELF:oDCbmpPict:Image:height
IF nWidth > 411 .OR. nHeight > 284
DO WHILE nWidth > 411 .OR. nHeight > 284
IF Integer(nWidth * .6) < 411
nWidth := Integer(nWidth * .99)
nHeight := Integer(nHeight * .99)
ELSE
nWidth := Integer(nWidth * .6)
nHeight := Integer(nHeight * .6)
ENDIF
ENDDO
SELF:oDCbmpPict:Image:ResizeBox( nWidth, nHeight, 1 )
ENDIF
SELF:oDCbmpPict:Show()
ENDIF
SELF:Pointer := Pointer{ POINTERARROW }
ELSE
SELF:oDCbmpPict:Hide()
ENDIF
CollectForced()
RETURN NIL
[toc] | [prev] | [next] | [standalone]
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-20 16:42 -0700 |
| Message-ID | <b9445e75-a8d9-4109-a027-f31f2310db58@googlegroups.com> |
| In reply to | #6874 |
Hello Jamal, I made the code changes you sent but no luck. It looks like the photos are flashing briefly then the control goes blank. Kuno
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-20 21:32 -0400 |
| Message-ID | <llgvna$ejq$1@speranza.aioe.org> |
| In reply to | #6875 |
We are getting close then:
Replace the _DrawBack(hDC) with this:
METHOD _DrawBack(hDC) CLASS FabPaintLibCtrl
LOCAL rc IS _WINRECT
LOCAL oBrush AS Brush
LOCAL hDC1 := GetDC( SELF:handle()) AS PTR
oBrush := Brush{Color{COLORBLUE}}
GetClientRect(SELF:handle(),@rc)
FillRect(hDC1,@rc,oBrush:handle())
// SetBkMode( hDC1, TRANSPARENT ) // comment out this line
RETURN NIL
HTH,
Jamal
"Kuno Egger" wrote in message
news:b9445e75-a8d9-4109-a027-f31f2310db58@googlegroups.com...
Hello Jamal,
I made the code changes you sent but no luck. It looks like the photos are
flashing briefly then the control goes blank.
Kuno
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-20 21:58 -0400 |
| Message-ID | <llh18e$hb2$1@speranza.aioe.org> |
| In reply to | #6873 |
I updated your method to the following. My changes should be obvious.
METHOD GetPhoto(sImagePath) CLASS FotoWin
LOCAL cFileName, cNameOnServer as STRING
LOCAL oFS as FILESPEC
LOCAL nWidth, nHeight as LONG
LOCAL oImage as FabPaintLib // Jamal - Add this line to work with a
local variable
cFileName := AllTrim(sImagePath)
cNameOnServer := cFileName
IF Empty(cFileName)
self:oDCbmpPict:Hide()
RETURN nil
ELSE
IF ! Upper(SubStr(cProgramDir,1,1))$"CDEF"
cFileName := SubStr(cProgramDir,1,1) +
AllTrim(SubStr(cFileName,2,Len(cFileName) - 1) )
ENDIF
oFS := FileSpec{cFileName}
ENDIF
IF !
Upper(Right(cFileName,4))$".BMP,.JPG,JPEG,TIFF,.JPE,.DIB,.RLE,.JIF,.PNG,.PCT,.TIF,.EPS,.TGA,.WMF,.EMF,.PCX,.PGM,.GIF,.EPS"
cFileName := ""
ENDIF
IF ! Empty(cFileName)
self:Pointer := Pointer{ POINTERHOURGLASS }
self:oDCbmpPict:Hide()
IF File(cFileName)
oImage := FabPaintLib{ cFileName }
nWidth := oImage :width
nHeight := oImage:height
IF nWidth > 411 .or. nHeight > 284
DO WHILE nWidth > 411 .or. nHeight > 284
IF Integer(nWidth * .6) < 411
nWidth := Integer(nWidth * .99)
nHeight := Integer(nHeight * .99)
ELSE
nWidth := Integer(nWidth * .6)
nHeight := Integer(nHeight * .6)
ENDIF
ENDDO
oImage:ResizeBox( nWidth, nHeight, 1 )
ENDIF
self:oDCbmpPict:Show()
// SELF:oDCbmpPict:ImageFit := TRUE // Jamal - Optional if
you want Image Fit and forget about resizing
self:oDCbmpPict:Image := oImage // Jamal - Assign image
ENDIF
self:Pointer := Pointer{ POINTERARROW }
ELSE
self:oDCbmpPict:Hide()
ENDIF
CollectForced() // <--- Is this needed?
RETURN nil
HTH,
Jamal
"Kuno Egger" wrote in message
news:0b8f01b8-dd9e-41cd-a4cf-01b9ee462968@googlegroups.com...
The following code displays a photo in a FabPaintLibCtrl if the manifest is
NOT declared. As soon as the manifest is added back in the control remains
blank. Can you spot the offending code? If I comment out the lines that
resize large photos it still behaves the same.
------------------------------------------------------------------------
METHOD GetPhoto(sImagePath) CLASS FotoWin
LOCAL cFileName, cNameOnServer AS STRING
LOCAL oFS AS FILESPEC
LOCAL nWidth, nHeight AS LONG
cFileName := AllTrim(sImagePath)
cNameOnServer := cFileName
IF Empty(cFileName)
SELF:oDCbmpPict:Hide()
RETURN NIL
ELSE
IF ! Upper(SubStr(cProgramDir,1,1))$"CDEF"
cFileName := SubStr(cProgramDir,1,1) +
alltrim(SubStr(cFileName,2,len(cFilename) - 1) )
ENDIF
oFS := FileSpec{cFileName}
ENDIF
IF !
Upper(Right(cFileName,4))$".BMP,.JPG,JPEG,TIFF,.JPE,.DIB,.RLE,.JIF,.PNG,.PCT,.TIF,.EPS,.TGA,.WMF,.EMF,.PCX,.PGM,.GIF,.EPS"
cFileName := ""
ENDIF
IF ! Empty(cFileName)
SELF:Pointer := Pointer{ POINTERHOURGLASS }
SELF:oDCbmpPict:Hide()
IF File(cFileName)
SELF:oDCbmpPict:Image := FabPaintLib{ cFileName }
nWidth := SELF:oDCbmpPict:Image:width
nHeight := SELF:oDCbmpPict:Image:height
IF nWidth > 411 .OR. nHeight > 284
DO WHILE nWidth > 411 .OR. nHeight > 284
IF Integer(nWidth * .6) < 411
nWidth := Integer(nWidth * .99)
nHeight := Integer(nHeight * .99)
ELSE
nWidth := Integer(nWidth * .6)
nHeight := Integer(nHeight * .6)
ENDIF
ENDDO
SELF:oDCbmpPict:Image:ResizeBox( nWidth, nHeight, 1 )
ENDIF
SELF:oDCbmpPict:Show()
ENDIF
SELF:Pointer := Pointer{ POINTERARROW }
ELSE
SELF:oDCbmpPict:Hide()
ENDIF
CollectForced()
RETURN NIL
[toc] | [prev] | [next] | [standalone]
| From | Kuno Egger <kuno@retailsoftware.com> |
|---|---|
| Date | 2014-05-22 19:00 -0700 |
| Message-ID | <53d55f8c-34a8-4920-9a2e-7ba3d4ad12a8@googlegroups.com> |
| In reply to | #6877 |
Jamal - that did it - way to go! I really appreciate all the help. I made your changes, re-created the controls and all is well. Thanks Kuno
[toc] | [prev] | [next] | [standalone]
| From | "Jamal" <someone@example.com> |
|---|---|
| Date | 2014-05-23 12:21 -0400 |
| Message-ID | <llnshr$5ts$1@speranza.aioe.org> |
| In reply to | #6888 |
Great! I am glad I was of help! Jamal "Kuno Egger" wrote in message news:53d55f8c-34a8-4920-9a2e-7ba3d4ad12a8@googlegroups.com... Jamal - that did it - way to go! I really appreciate all the help. I made your changes, re-created the controls and all is well. Thanks Kuno
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web