home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_C
/
CENVIW9.ZIP
/
PMCORNER.CMM
< prev
next >
Wrap
Text File
|
1994-03-08
|
904b
|
27 lines
// PMCorner.cmm - Minimize the Program Manager and put its
// ver.1 icon into the lower right-hand corner of
// the screen. If Program Manager is not
// running then just exit.
#include <WinTools.lib> // Lots of useful routines
#include <Message.lib>
// Get the Window handle based on the "Program Manager" text
handle = GetWindowHandle("Program Manager");
if ( handle != NULL ) {
// Minimize this window
SendMessage(handle,WM_SYSCOMMAND,SC_MINIMIZE,0);
// Find out the size of this window and the size of the screen
GetWindowRect(handle,IconBox);
IconWidth = IconBox.right - IconBox.left + 1;
IconHeight = IconBox.bottom - IconBox.top + 1;
GetScreenSize(ScreenWidth,ScreenHeight);
// Move this icon to lower-right corner of screen
SetPosition(handle,ScreenWidth-IconWidth,ScreenHeight-IconHeight);
}