August 06, 2020, 04:41:16 am

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Centre an Image in a Window

Started by GWS, June 27, 2013, 10:57:20 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

GWS

June 27, 2013, 10:57:20 am Last Edit: June 27, 2013, 11:09:37 am by GWS
Hi,

On the CM forum, Rosslcs asked how to centre an image in a window.

I posted a test program but here is a slightly more accurate version that obtains the window caption height using the GetSystemMetrics API routine.

In my CM post, I guessed the height as 20 pixels - GetSystemMetrics reports it as 19 pixels ..  ::)

I'll include a zip file with a test image so you can try it out ..  :)

all the best, :)

Graham
Tomorrow may be too late ..