If you are using a picture window you can use the .bw and .bh properties to return the size of the drawing bitmap in the window. The size of the bitmap is not necessarily related to the window size (I think this was discussed in another thread some time ago). mIRC tracks where you have drawn in the bitmap and expands it automatically if necessary.