ActiveX Property stdole.Picture/stdole.Font
ActiveX Property stdole.Picture/stdole.Font
Hi all,
I am working on an activex control and need to assign a bitmap object to the stdole.picture property of the activex. Similarly I want to assign a Font object to the stdole.font property of the activex.
Thanks
Joe
I am working on an activex control and need to assign a bitmap object to the stdole.picture property of the activex. Similarly I want to assign a Font object to the stdole.font property of the activex.
Thanks
Joe
Re: ActiveX Property stdole.Picture/stdole.Font
Look at the :getIPicture() and :setIPicture() methods of the XbpBitmap() class.
Look at the :getIFont() and :setIFont() methods of the XbpFont() class.
Look at the :getIFont() and :setIFont() methods of the XbpFont() class.
The eXpress train is coming - and it has more cars.
Re: ActiveX Property stdole.Picture/stdole.Font
Hi Roger
Below is the activex I am evaluating, its call Teebo PopupNotify.
Here is my code, NOT working.
FUNCTION PPSNotify()
Local oNotify := ActiveXObject():create( "tssCPopupNotifyDemo.CPopupNotifyDLL" )
Local oFoto := DC_GetBitmap("C:\PPS\MetaLink-Taxi.BMP")
oNotify:AllowAnimation := .t.
oNotify:AutoSize := .t.
oNotify:ShowCloseButton := .t.
oNotify:Picture := oFoto:GetIPicture()
oNotify:TimeOut := -1
//oNotify:Text := "RESIZE DCGUI_RESIZE_RESIZEONLY CLSID cCLSID REGISTER"
oNotify:Show()
Return(oNotify)
*
Below is the activex I am evaluating, its call Teebo PopupNotify.
Here is my code, NOT working.
FUNCTION PPSNotify()
Local oNotify := ActiveXObject():create( "tssCPopupNotifyDemo.CPopupNotifyDLL" )
Local oFoto := DC_GetBitmap("C:\PPS\MetaLink-Taxi.BMP")
oNotify:AllowAnimation := .t.
oNotify:AutoSize := .t.
oNotify:ShowCloseButton := .t.
oNotify:Picture := oFoto:GetIPicture()
oNotify:TimeOut := -1
//oNotify:Text := "RESIZE DCGUI_RESIZE_RESIZEONLY CLSID cCLSID REGISTER"
oNotify:Show()
Return(oNotify)
*
Re: ActiveX Property stdole.Picture/stdole.Font
Is it just the picture that isn't working?
Does it cause an error?
Does it cause an error?
The eXpress train is coming - and it has more cars.
Re: ActiveX Property stdole.Picture/stdole.Font
Thanks Roger.
For now only the picture appear not to be working. For the FONT I use CJ_Font() like oNotify:Font := CJ_Font("26.Arial.Bold") and it works perfectly.
The picture gives error "Type mismatch parameter has a wrong data type"
For now only the picture appear not to be working. For the FONT I use CJ_Font() like oNotify:Font := CJ_Font("26.Arial.Bold") and it works perfectly.
The picture gives error "Type mismatch parameter has a wrong data type"
Re: ActiveX Property stdole.Picture/stdole.Font
greetings by OHR
Jimmy
Jimmy
Re: ActiveX Property stdole.Picture/stdole.Font
Yes I included the "#Pragma ..."
The COM actually initialized properly and working when I comment-out the .picture property.
Has anybody used the :GetIPicture() method for any activex component, and what is the experience like ?
Joe
The COM actually initialized properly and working when I comment-out the .picture property.
Has anybody used the :GetIPicture() method for any activex component, and what is the experience like ?
Joe
Re: ActiveX Property stdole.Picture/stdole.Font
are you using XbpStatusbar() or XbpIcon() ? both include GetIPicture() to work proper.unixkd wrote:Has anybody used the :GetIPicture() method for any activex component, and what is the experience like ?
try other Image ... Size ... Colors ...
btw. did you try Icon/GetIPicture() ?
greetings by OHR
Jimmy
Jimmy
Re: ActiveX Property stdole.Picture/stdole.Font
Hi Jimmy
I am using xbpBitmap, see my code above. I also want to assign a color property. The documentation of the control for FONT, COLOR, and PICTURE are provided as follows:
COLOR
=====
Description
Specifies a color to use for the background
Syntax
object.BackColor1 [ = oColor ]
The syntax of the BackColor1 property has these parts:
Part Description
object - An instance of a PopupNotify object
oColor - An OLE_COLOR value to be used for the caption
Remarks
This specifies the first gradient color when used in gradient modes. When using a solid background, this color is used.
This property has no effect when eBorderStyle is eBorderOfficeXP or eBorderOffice2003.
FONT
====
Description
Specifies a font to use when drawing the text
Syntax
object.Font [ = oFnt ]
The syntax of the Font property has these parts:
Part Description
object - An instance of a PopupNotify object
oFnt - A StdFont object to use as the new font
PICTURE
======
Description
Specifies the picture used in the popup notification.
Syntax
object.Picture [ = oPic ]
The syntax of the Picture property has these parts:
Part Description
object - An instance of a PopupNotify object
oPic - A StdPicture object
Remarks
If oPic is equal to Nothing, no image will be visible in the popup notification. If eBorderStyle is eBorderPhoto, the picture will be resized to fill the content area.
FONT works well but PICTURE and COLOR not working.
I am using xbpBitmap, see my code above. I also want to assign a color property. The documentation of the control for FONT, COLOR, and PICTURE are provided as follows:
COLOR
=====
Description
Specifies a color to use for the background
Syntax
object.BackColor1 [ = oColor ]
The syntax of the BackColor1 property has these parts:
Part Description
object - An instance of a PopupNotify object
oColor - An OLE_COLOR value to be used for the caption
Remarks
This specifies the first gradient color when used in gradient modes. When using a solid background, this color is used.
This property has no effect when eBorderStyle is eBorderOfficeXP or eBorderOffice2003.
FONT
====
Description
Specifies a font to use when drawing the text
Syntax
object.Font [ = oFnt ]
The syntax of the Font property has these parts:
Part Description
object - An instance of a PopupNotify object
oFnt - A StdFont object to use as the new font
PICTURE
======
Description
Specifies the picture used in the popup notification.
Syntax
object.Picture [ = oPic ]
The syntax of the Picture property has these parts:
Part Description
object - An instance of a PopupNotify object
oPic - A StdPicture object
Remarks
If oPic is equal to Nothing, no image will be visible in the popup notification. If eBorderStyle is eBorderPhoto, the picture will be resized to fill the content area.
FONT works well but PICTURE and COLOR not working.
Re: ActiveX Property stdole.Picture/stdole.Font
Xbase++ "translate" FONT rightunixkd wrote:FONT works well but PICTURE and COLOR not working.

COLOR : did you try AutomationTranslateColor() for OLE_Color
PICTURE : hm ... it might mean "Handle" of Image ?
you can try to use
Code: Select all
STATIC DLLFUNCTION LoadImageA( hMod, nId, uType, nX, nY, fuLoad ) ;
USING STDCALL ;
FROM USER32.DLL
or use XbpBitmap() PDR 6009 Workaround and GetHandle() -> "Handle"
http://www.alaska-software.com/scripts/ ... PDRID=6009
greetings by OHR
Jimmy
Jimmy