This is the right code to center the bitmaps. Thanks!

Code: Select all | Expand
TransBmp( hBmp, nBmpWidth( hBmp ), nBmpHeight( hBmp ), nZeroZeroClr, ::hDC,;
( ::nWidth / 2 ) - ( nBmpWidth( hBmp ) / 2 ) + If( ::lPressed, 2, 1 ),;
Max( 0, ( ::nHeight / ( 2 + If( ! Empty( ::cCaption ), 1, 0 ) ) ) - ;
( nBmpHeight( hBmp ) / 2 ) ) + If( ::lPressed, 2, 1 ),;
nBmpWidth( hBmp ), nBmpHeight( hBmp ) )