??? ????? ????? ??? ???? ???? ?????? ??? ????? ?? Windows NT ? Windows 2000 ? Windows Server 2003

?????? ????????? ?????? ?????????
???? ???????: 140723 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

??????

??????? ????? ??????? ?????? ???? ???? ???? ??? ??????? ??????. ?? Microsoft Windows 95, ???? ???? ?? ??? ????? ?????? ?? ??? ????? ????? WM_CLOSE ?? ???? ?????? ?????? ?????? ?????? ??? ?? ???? ?? ??? ??????:
postMessage (GetActiveWindow() ? WM_CLOSE, 0, 0 L);
???? Microsoft Windows NT ??? ????? ?? ???? ????? ???? ?????? ???? ???? ????? ??????? ??? ??? ??? ???? ????? ???? ?????? ??? ???. ???? ????? ?????? ?????? ??? Windows NT ? Windows 2000 ? Windows Server 2003 ?????? ???? ?????.

??????? ????

????? ????? ?????? ??? ???? ??? ???? ?????? ?????? ?????? ?????? ?? ????? ??????? ???? ??? ????? ???? ?? Microsoft Windows 95. ?? Microsoft Windows NT ??? ???? ??????? Microsoft Windows 2000 ? ??? ???? ??????? Windows Server 2003, ?? ??? ????? ???? ?????? ??? ??? ??? ?????? ????????? ?? ??? ??? ???? ?????, ???????? ??? ????? ?? ????? ?????:
  • ??? ??? ?????? ???? ???????? ??? ?????????? ????? ???? ?????? ?? ????? ??????? ???? ?????? ?? ???? ?????? ????? ????? ????? ???? ?????? ??? ??? ?????? ????? ??.
  • ??? ??? ?????? ????? ???? ???????? ??????? ?? ???? ??????? ????? ???? ?????? ??? ??? ?????? ?????????.
?? ????? ??????? ?????? GetForegroundWindow() ?? FindWindow ?????? ?????? ?? ??? ???? ???? ?????? ?????? ??????:
  • ???? ?????? GetForegroundWindow() NULL ???? ????? ???? ?????? ??? ??? ???? ?????? ?? ??? ?????? ???? ??? ????? ?????????.
  • ?? ???? ?????? FindWindow ("WindowsScreenSaverClass" ? NULL) ???.
???? ???? Microsoft ???????:
  • ???? ??? ?????? ???? ?????? ????? ????? ???? ?????? ??? ??? ?????? ????? ??.
  • ?? ???? ????? ???? ?????? ??? ??? ?????? ????? ??, ???????? ???????? ????? ???? ?????? ????.
  • ?? ???? ?? ??? ?????? ????? ?????? ?????? ????? ??? ?????? ?????????.


?????? ????? ?????? ??? ???? ??? ??? ?????? ???? ?????? ????? ???????? ??? ??? ?????? ? ?? ??? WM_CLOSE ??? ???? ???? ??????.

???? ???????? ???????? ??????? ????? ?????? ????. ???? ??? ??? ?? ????? ???? ???? ????? ???? ???????? ???????? ??????? ????? ???? ?????? ???? ?????? ?????? ???????? ????? ???? ? ????? ??????? ???? ?????? ??????.
BOOL CALLBACK KillScreenSaverFunc(HWND hwnd, LPARAM lParam) 
{ 
	if(IsWindowVisible(hwnd)) 
		PostMessage(hwnd, WM_CLOSE, 0, 0); 
	return TRUE; 
} 
HDESK hdesk; 
hdesk = OpenDesktop(TEXT("Screen-saver"), 0, FALSE, DESKTOP_READOBJECTS | DESKTOP_WRITEOBJECTS); 
if (hdesk) 
{ 
	EnumDesktopWindows(hdesk, KillScreenSaverFunc, 0);
	CloseDesktop(hdesk); } 
else 
{ 
	// Windows 2000 and later: 
	// If there is no screen saver desktop, the screen saver 
	// is on the default desktop. Close it by sending a 
	// WM_CLOSE. PostMessage(GetForegroundWindow(), WM_CLOSE, 0, 0L); 
} 
???? ?? ????? ???? ???? ???? ???? ?????? ??? ??????? ??? ?? ????? ????? ?????? ???? ?? ????? ???? ?????? ?????, ???? ???? ?? ???? ?????? ??? ?????? ?????? ??????? ?? ???????. ???? ?????? ???? ?????? ????????:
SystemParametersInfo( SPI_SETSCREENSAVEACTIVE,
                      FALSE,
                      0,
                      SPIF_SENDWININICHANGE
                     );				
???? ??? ??????? ???? ??? ?? ????? ???? ?????? ??? ??????? ??????. ??? ???? ???? ??????? ????? ???? ?? ??????? ?? ?????? ?? ???? ??? ????? ????? ???? ?????? ??? ??? ??? ???????? ?????? ?????? ?? ???? ?????. ??? ??? ?? ???? ??? ???? ?????? ??? ??????? ??? ???? ????? ?????? ????? ???? ??????. ?????? ???? ???????? ???? ????? ???????:
  • ??????? SystemParametersInfo (SPI_SETSCREENSAVEACTIVE ? TRUE? 0 SPIF_SENDWININICHANGE).
  • ???????? SetCursorPos() ??????? ????? ????????.
??? ????????? ????? ??? ????? ????? ?????? ?????? ?? ??? ???? ???? ??????.

???????

???? ???????: 140723 - ????? ??? ??????: 04/???/1428 - ??????: 3.2
????? ???
  • Microsoft Win32 Software Development Kit (SDK) 3.1, ????? ?????? ??:
    • Microsoft Windows NT Advanced Server 3.1
    • Microsoft Windows NT 4.0
    • Microsoft Windows NT 3.51 Service Pack 5
    • Microsoft Windows NT 4.0
    • the operating system: Microsoft Windows 2000
    • Microsoft Windows Server 2003, Standard Edition (32-bit x86)
????? ??????: 
kbmt kbcode kbhowto kbscreensaver KB140723 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????140723

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com