[fpc-pascal]win32 activate/close windows

Kanzelsberger Pavel kanzelsberger at rekt.umb.sk
Mon Sep 3 18:19:08 CEST 2001


Look at ShowWindow() function... here's preview of that topic, hope it
helps...
 
The ShowWindow function sets the specified window's show state. 
 
BOOL ShowWindow(
 
    HWND hWnd, // handle of window
    int nCmdShow  // show state of window
   ); 
 
 
Parameters
 
hWnd
 
Identifies the window. 
 
nCmdShow
 
Specifies how the window is to be shown. This parameter is ignored the first
time an application calls ShowWindow, if the program that launched the
application provides a STARTUPINFO structure. Otherwise, the first time
ShowWindow is called, the value should be the value obtained by the WinMain
function in its nCmdShow parameter. In subsequent calls, this parameter can
be one of the following values: 
 
Value Meaning
SW_HIDE Hides the window and activates another window.
SW_MAXIMIZE Maximizes the specified window.
SW_MINIMIZE Minimizes the specified window and activates the next top-level
window in the Z order.
SW_RESTORE Activates and displays the window. If the window is minimized or
maximized, Windows restores it to its original size and position. An
application should specify this flag when restoring a minimized window.
SW_SHOW Activates the window and displays it in its current size and
position. 
SW_SHOWDEFAULT Sets the show state based on the SW_ flag specified in the
STARTUPINFO structure passed to the CreateProcess function by the program
that started the application. 
SW_SHOWMAXIMIZED Activates the window and displays it as a maximized window.
SW_SHOWMINIMIZED Activates the window and displays it as a minimized window.
SW_SHOWMINNOACTIVE Displays the window as a minimized window. The active
window remains active.
SW_SHOWNA Displays the window in its current state. The active window
remains active.
.
.
.
etc
 
regards, Pavel Kanzelsberger

-----Original Message-----
From: Lee, John [mailto:LeeJ at logica.com] 
Sent: Monday, September 03, 2001 6:05 PM
To: 'fpc-pascal at deadlock.et.tudelft.nl'
Subject: RE: [fpc-pascal]win32 activate/close windows


I _did_ look at the win32 api docs... but couldn't see exaclty what I have
to do to max/min/restore/activate a named window... J
-----Original Message-----
From: Kanzelsberger Pavel [mailto:kanzelsberger at rekt.umb.sk]
Sent: 03 September 2001 12:57
To: 'fpc-pascal at deadlock.et.tudelft.nl'
Subject: RE: [fpc-pascal]win32 activate/close windows



You have to send special messages to dialog main procedures (you can also
control other applications) using standard Win32 API functions...

Just look at Win32 API docs 

Pavel Kanzelsberger 

-----Original Message----- 
From: Lee, John [mailto:LeeJ at logica.com <mailto:LeeJ at logica.com> ] 
Sent: Monday, September 03, 2001 1:42 PM 
To: 'fpc-pascal at deadlock.et.tudelft.nl' 
Subject: [fpc-pascal]win32 activate/close windows 


Does anyone have any working code or code snippets to
activate/close/restore/iconise named windows in win32? (win95) - sorry if I
asked this before- If not what is the general method/ algorithm? J

_______________________________________________ 
fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
<http://lists.freepascal.org/mailman/listinfo/fpc-pascal>  

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20010903/6a7f28b6/attachment.html>


More information about the fpc-pascal mailing list