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
Mailing lists / fpc-pascal / 2001-09
win32 activate/close windows
9 messages · 6 people · –
- LLee, John 3
- KKanzelsberger Pavel 2
- CCarlo Kok 1
- EEdward J. Krall 1
- GGabor DEAK JAHN 1
- UUnknown author 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
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
Earlier message 11 lines
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
Earlier message 26 lines
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
Earlier message 35 lines
Does anyone have any working code or code snippets to activate/close/restore/iconise…
From: "Lee, John"
To: "''"
Date sent: Mon, 3 Sep 2001 12:42:23 +0100
Subject: [fpc-pascal]win32 activate/close windows Send reply to:
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
find the named windows if you know the class
FindWindow(Classname, WindowName: PChar): HWnd; else try with class=nil
or if not check find it for all window that exist
repeat
b:=GetWindow(a,GW_child); or b:=GetWindow(a,GW_hwndnext); depend
of the type of window..
GetClassName(b,className,250);
until find it;Send a message to it !
like
postMessage(a,Wm_char,$20,$20d+$39*65536);Look at ShowWindow() function... here's preview of that topic, hope it helps... The…
Hello fpc-pascal,
The thread on Win API prompts me to ask this question, which is only slightly off-topic.
I have been using a program, written a number of years ago, by someone in Ireland. It was written in Turbo Pascal and 8086 assembler, and does indefinite length arithmetic. It was a DOS program that runs OK on Windows 95 and 98.
But on Windows NT 4, I get a division by zero error when the program starts. I asked the author about it. He replied that there is a patch available that will eliminate the source of the error, but that he has forgotten what it is. He also indicated that he has no interest in rewriting the program.
Do any of you know what the "patch" is?
Ed
_________________________________________________________ | Edward J. Krall | |
| 10838 North 110 Place | (480) 614-0423 | | Scottsdale, AZ 85259 | | |_______________________|_________________________________|
----- Original Message -----
Earlier message 41 lines
The thread on Win API prompts me to ask this question, which is only slightly off-topic.…
At 12/8/2001 09:55 AM, you wrote:
Ed,
But on Windows NT 4, I get a division by zero error when the program starts. I asked the author about it. He replied that there is a
It's not the operating system, actually, but the speed of the processor. The startup routine in the original RTL used a counter to perform some timing which was only a word in size. While this was perfectly OK back then, around the appearance 200-300 MHz processors it started to overflow. The patched RTL uses a longint instead.
Bye,
Gábor
------------------------------------------------------------------- Gabor DEAK JAHN -- Budapest, Hungary.
E-mail:
It's the dreaded clock patch for crt, which shows up on PCs faster that 200 Mhz (ie all recent ones)...It'd be better if it was converted to fpc...Guess the difficult bit might be the assembler...Do you have the source/is it public? J
o:
Subject: [fpc-pascal]Another Windows API Questions
Hello fpc-pascal,
The thread on Win API prompts me to ask this question, which is only slightly off-topic.
I have been using a program, written a number of years ago, by someone in Ireland. It was written in Turbo Pascal and 8086 assembler, and does indefinite length arithmetic. It was a DOS program that runs OK on Windows 95 and 98.
But on Windows NT 4, I get a division by zero error when the program starts. I asked the author about it. He replied that there is a patch available that will eliminate the source of the error, but that he has forgotten what it is. He also indicated that he has no interest in rewriting the program.
Do any of you know what the "patch" is?
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
