> I need to know the accurate pixel size of a map window. But all the > reference I have doesn't include this information. The function > WindowInfo(id,WIN_INFO_WIDTH) and WindowInfo(id, WIN_INFO_HEIGHT)are not > the accurate pixel size. Does any one have experience in that? Thanks!
Oh, it gets worse than that. The two WindowInfo() calls return the size of the MDI child frame window that the Map window sits in. What you probably want is the size of the *client area* where any Map is actually drawn. Now, you can use WindowInfo (WIN_INFO_HWND) and make some Windows API calls (GetClientRect()) to get the client area size of the window, in pixels. I think. Unfortunately, this client window doesn't reflect what you're actually seeing, because it includes any scrollbars that are created in the window. Not only that, MapperInfo (MAPPER_INFO_Mxxx) calls include the area hidden behind the scrollbars. (If they didn't, the scale could never be set accurately.) If you're trying to set the exact form factor of a map, or set a specific size, I feel your pain. If you're trying to place objects at specific locations on the map window, give up and put them in a layout. Best regards Spencer _______________________________________________________________________ List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, send e-mail to [EMAIL PROTECTED] and put "unsubscribe MapInfo-L" in the message body.
