How to ensure that the entire dialog box remains visible

22 01 2012

Sometimes we may move our application’s main window around screen and it may be partly outside the screen/desktop. That means we can see only a part of our application window. How can we bring back this window to full view.

Windows has a message DM_REPOSITION, which repositions a top-level dialog box so that it fits within the desktop area. An application can send this message to a dialog box after resizing it to ensure that the entire dialog box remains visible.

 

 

SendMessage(DM_REPOSITION);

This message will work only for top level dialog boxes.

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: