Ohhh, is it normal...
Thank you for your valious tip.
I will do that.
Image Get and Set Properties
Moderator: Rathinagiri
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Image Get and Set Properties
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Image Get and Set Properties
Yes is normal that the size increase. You need make the following step:
// nOldStyle := HMG_ChangeWindowStyle ( hWnd, [ nAddStyle ], [ nRemoveStyle ], [ lExStyle ], [ lRedrawWindow ] )
1) remove edge style if exist
old := HMG_ChangeWindowStyle ( hwnd, NIL, HB_bitOR (WS_EX_CLIENTEDGE, WS_EX_STATICEDGE, WS_EX_WINDOWEDGE), .T. )
2) get the image size
3) restore the old style
HMG_ChangeWindowStyle ( hwnd, old, NIL, .T. )
// nOldStyle := HMG_ChangeWindowStyle ( hWnd, [ nAddStyle ], [ nRemoveStyle ], [ lExStyle ], [ lRedrawWindow ] )
1) remove edge style if exist
old := HMG_ChangeWindowStyle ( hwnd, NIL, HB_bitOR (WS_EX_CLIENTEDGE, WS_EX_STATICEDGE, WS_EX_WINDOWEDGE), .T. )
2) get the image size
3) restore the old style
HMG_ChangeWindowStyle ( hwnd, old, NIL, .T. )
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Image Get and Set Properties
Claudio, have you seen this my question ?
In the attached executable file you can see image increading size.
In the attached executable file you can see image increading size.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- srvet_claudio
- Posts: 2193
- Joined: Thu Feb 25, 2010 8:43 pm
- Location: Uruguay
- Contact:
Re: Image Get and Set Properties
I will check.
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Image Get and Set Properties
Hi Claudio,
I'm sorry to distrubing again. But now after my last experience in sources of my "What displays when no image available?" topic and I've to appoint this observation:
When we use SET CONTROL <Image_Control_Name> OF <Form_Name> CLIENTEDGE, image control size (width and height) is increasing due edge's size. is it normal ?
I test with all internal function to get image's size and figures returns wrong by the reason of image's container are bigger...
I've tried with these 4 options:
BT_BitmapWidth (hBitmap)/BT_BitmapHeight (hBitmap)
IMHO this EDGE's size should it be not be considered as part of control's size.
In short:
Best regards,
I'm sorry to distrubing again. But now after my last experience in sources of my "What displays when no image available?" topic and I've to appoint this observation:
When we use SET CONTROL <Image_Control_Name> OF <Form_Name> CLIENTEDGE, image control size (width and height) is increasing due edge's size. is it normal ?
I test with all internal function to get image's size and figures returns wrong by the reason of image's container are bigger...
I've tried with these 4 options:
BT_BitmapWidth (hBitmap)/BT_BitmapHeight (hBitmap)
- GetProperty(cForm,cControl,"Width")/GetProperty(cForm,cControl,"Height")
- GetWindowWidth()/GetWindowHeight()
- _HMG_SYSDATA [ 31 ]/_HMG_SYSDATA [ 32 ]
IMHO this EDGE's size should it be not be considered as part of control's size.
In short:
- Is it normal to increase the image size when EDGE style is choosen ?
- Is it possible the EDGE's properties not being part as control's size and not interering int width/height of image control ? (not increasing)
Best regards,
Last edited by Pablo César on Mon Feb 27, 2017 3:08 pm, edited 9 times in total.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein