?? ???? ???? ???????? ????? ?????? GDI + ?????? ?????? ??????

?????? ????????? ?????? ?????????
???? ???????: 319261 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???? | ?? ????

?? ??? ??????

???????

?? ???? ?? ???? ???? ???????? ???? ??? ??????? ?????? GDI + ?????? ?????? ??????. ???? ??? ??????? ??? ?? ??????? ???? ?????? GDI + ? ??? ?? ??? Microsoft Office XP Microsoft Visio 2002 Microsoft .NET Framework ?shell Windows.

?????

GDI + ?????? ???? ???? DCI ?????? ?????? ?? ?????? ?????? ????????. + GDI ?? ?????? ????????? DDI GDI ????? ???? ???? ???????. ??? ???? ???? ?????? ?????? ?????? ?? ?????? ?? ???? ????? ???? ???? GDI. ?????? ?????? ??? ????????? DDI GDI ?????? ???? ????? ??? ????? ???? ?? ???? ??? ?? ?????? ??????? ???? ???? ??? ??????.

?? ???? ????? ?????? ???? ?????? ??? ????? ???? ?????? GDI + ? ??? ??? ??? ????? ?? ?????? ???????? ?? ??? ??? ??? ????? unmagnified.

????

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? Windows XP. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
322389????? ?????? ??? ???? ???? ???? XP Windows
??? ??? ???????? ?????? ??? ??????? ??????? ?? ????? "????? ????? Microsoft" ???????:
318966????? ??? ?? ????? ?? ????? ??? ????? ?? ???? ??????? Windows XP

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

??? ??? ???? ?????? ??? ???? ????? ???????? ????? ?? ???? ?????? GDI + ???????? GDI ????? ?? DCI ???????. ????? ?? ???? GDI + ??? ???? ??????? ???? ????? ??????? ????? ?? ?? "GDI + ????" ????? ?? ??? ????? ??? ???? ??? GDI +. ??? ????? ??????? ?????? ?? ??????? Q318966 ???? ??????? GDI + ????????? ?????? ???? ???? ?????? "GDI + ??????." ??? ???? ???? ??????? GDI + ??? ???????, ????? ??????? DCI ??????? ?? ??? ??????? ???????? GDI ????? ?? ???. ??? ???? ???? ???? ???? ?? ?????? ?????? GDI +.

??? ????? ?????? ???? ???? ??????? ??? ????? ???? ???? ?????? "GDI + ??????." GDI + ????? ????? ???? ?? ??? ?????? ??? ???? ??????? ?? GDI + ??????? ???????? ??? ???????. ??? ?? ?? ???? ?????? ???? ???????? ?????? ????? ????????. ??? ??? ?????? ??? ?????? ???? ??? ????? "GDI + ????" ????? ?? ??? ????? ??? ???? ??? GDI + ? ??? ?? ?????? ????? ??????? "GDI + ??????" ??? ??? ????????. ???? ?? GDI + ??????? ???????? ??????? ???? ????.

??? ?? ?????? ?????? ?????? ????? ?? GDI + ??????? ??????? ???? ??? ??????? ??? ??? ??????. ???? ?????? ?????? ???? ?? ???? ????? ????? ?? ????? ???????? SetWinEventHook ???? ?? ??? ??? ???? ????? ???? ????. ??? ?? ????? ???? ???? ?? ??????? ?????? ???? ????? ? ???? ?????? ?? ????? ????? "GDI + ??????" ????.

?????? ?????? ??? ??? ???? ??? ?? GDI + ???? ???????? GDI ????? ?? DCI ?????? ???? ?? ???? ??????? ??? ??????? DCI ??? ??? ????? ???????? ?????? ??????. GDI + ???? ???? ???? ???????? GDI ???? ???????? DCI. ??? ??? ???????? ?? ??? ????? ?????? ?? GDI + ????? ?????? ???? ??????? ? ???? ???????? ????? ????? ?????? GDI +.

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ????? ??? ???????. ?? ????? ??? ??????? ???? ??? ?? ???? ?????? Service Pack 1 ?????? ?? Windows XP.

??????? ????

???? ????? ???????? ?????? ????? ??????? ????? GDI + ????? ?? ????????. ????? Gdipacs.c ?????? Gdipacs.h ?? ???????. ??? ??????? GDIPlusDCIOff_Init ??? ??? ????? ????????. ???? ??? ???? ???????? GDI + ??????? ?? ????? ???????? DCI ?? ????? ?? GDI + ??????? ??????? ???? ??? ??????? ??? ??????? DCI ??????. ??? ??????? GDIPlusDCIOff_Uninit ??? ????? ????????. ????? ????? GDI + ??????? ???????? ??? ??????? DCI ???? GDI + ????? ????? ?????? DCI ??? ?????? ?????.

???? ????? Testmain.c ??? ???????. ????? ?????? ????? ??????? ????? "GDI + ??????" ?? ????? GDI +.

??? ?????

???? Microsoft ??????? ???????? ??? ??? ?? ???? ??????? ?? ?? ????? ? ? ?? ????? ??? ?????? ???????? ??????? ?/?? ???????? ???? ????. ????? ??? ??????? ??? ????? ??? ??? ??????? ???? ?? ????? ???????? ????????? ?????? ????????? ????????. ???? ?? ????? ??????? ????? Microsoft ??? ????? ????? ???? ???? ?? ?????? ?????? ??? ??????? ?????? ????? ?????? ?? ????? ??????? ?????? ????????? ???????.
??? ??? ??? ?? ???? ???? ???? ?????? ?? ???? ???????? ?? ????? ??? ??????? ????? Microsoft ?? ????? ???????. ????? ?? ?????????? ?? ?????? ????? ??? Microsoft ???:

Microsoft ????????? Partners ? https://partner.microsoft.com/global/30000104

????? Microsoft ??????? ???? ???? ??????? - http://support.microsoft.com/gp/advisoryservice

?????? ??? ???? ?? ????????? ??? ?????? ????? ???????? ???? ????? ??????? ????? Microsoft ?? ?????? ???? Microsoft ?????? ??? ?????: http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS
/*********************** Module*Header ************************\ 
* Module Name: gdipacs.h
*
* Copyright (c) 2002 Microsoft Corporation
\**************************************************************/ 

/* 
 * To tell GDI+ to stop using DCI:
 * Call GDIPlusDCIOff_Init as part of your program startup.
 * This must be called by a thread that has a message pump.
 * Before terminating, call GDIPlusDCIOff_Uninit on that
 * same thread to clean up.
 */ 

BOOL GDIPlusDCIOff_Init();
VOID GDIPlusDCIOff_Uninit();




/*********************** Module*Header ************************\ 
* Module Name: gdipacs.cpp
*
* Copyright (c) 2002 Microsoft Corporation
\**************************************************************/ 

// Need WINVER 0x0500 to get the definitions for WinEvents.
// (They will still work on Windows 95 and Windows NT 4.0 SP6.)
#define WINVER 0x0500
#include <windows.h>
#include "gdipacs.h"


#define GDIPLUS_TITLE      TEXT("GDI+ Window")
#define GDIPLUS_CLASSNAME  TEXT("GDI+ Hook Window Class")
#define GDIPLUS_DCIOFFMSG  TEXT("GDI+ Accessibility")


HWINEVENTHOOK ghWinEventHook = NULL;
UINT gwmGdipMessage = 0;


static BOOL IsGDIPlusWindow(HWND hwnd)
{
    TCHAR str[MAX_PATH];

     // Check that window is top-level and unowned...
     if(GetParent(hwnd) != NULL)
          return FALSE;

     // Check window class name...
    if(GetClassName(hwnd, str, MAX_PATH) == 0
     || lstrcmp(str, GDIPLUS_CLASSNAME) != 0)
          return FALSE;

     // Check window title...
    if(GetWindowText(hwnd, str, MAX_PATH) == 0
      || lstrcmp(str, GDIPLUS_TITLE) != 0)
          return FALSE;

     return TRUE;
}

static VOID SendDCIOFFMessage(HWND hwnd)
{
    SendMessage(hwnd, gwmGdipMessage, 0, 0);
    
#ifdef _DEBUG
     {
          TCHAR strDebug[MAX_PATH];

          // For debug purposes, output handle to hidden window.
          wsprintf(
               strDebug,
               TEXT("Sent GDI+ Message: HWND=%08x\n"),
               hwnd);

          OutputDebugString(strDebug);
     }
#endif
}



static BOOL CALLBACK WndEnumProc(
    HWND hwnd,
    LPARAM lParam
    )
{
     if(IsGDIPlusWindow(hwnd))
     {
          SendDCIOFFMessage(hwnd);
    }
    return TRUE;
}

VOID CALLBACK WindowCreateProc(
    HWINEVENTHOOK hWinEventHook,
    DWORD event,
    HWND hwnd,
    LONG idObject,
    LONG idChild,
    DWORD dwEventThread,
    DWORD dwmsEventTime
    )
{
    if (idObject == OBJID_WINDOW && IsGDIPlusWindow(hwnd))
     {
          SendDCIOFFMessage(hwnd);
    }
}



BOOL GDIPlusDCIOff_Init()
{
     if(ghWinEventHook != NULL)
          return FALSE;

     // Register the "turn off DCI" message...
    gwmGdipMessage = RegisterWindowMessage(GDIPLUS_DCIOFFMSG);
    if (gwmGdipMessage == 0)
    {
        return FALSE;
    }

     // Set a hook to watch for new windows being created...
    ghWinEventHook = SetWinEventHook(
        EVENT_OBJECT_CREATE,
        EVENT_OBJECT_CREATE,
        NULL,
        WindowCreateProc,
        0,
        0,
        WINEVENT_OUTOFCONTEXT | WINEVENT_SKIPOWNPROCESS);
    if (ghWinEventHook == NULL)
    {
        return FALSE;
    }

     // Scan through existing windows...
    EnumWindows(WndEnumProc, 0);

     return TRUE;
}

VOID GDIPlusDCIOff_Uninit()
{
     if(ghWinEventHook != NULL)
     {
         UnhookWinEvent(ghWinEventHook);
          ghWinEventHook = NULL;
     }
}


/*********************** Module*Header ************************\ 
* Module Name: testmain.c
*
* Copyright (c) 2002 Microsoft Corporation
\**************************************************************/ 

/* 
 * Sample program that demonstrates using GDIPACS.h to turn off
 * the GDI+ use of DCI.
 */ 

#include <windows.h>
#include "gdipacs.h"

#define TITLE TEXT("GDI+ DCI Disabler")

int WINAPI
WinMain( HINSTANCE  hInstance,
         HINSTANCE  hPrevInstance,
         LPSTR      szCmdLine, 
         int        nCmdShow )
{
     MessageBox(NULL,TEXT("Click OK to start disabling use of DCI..."), TITLE, MB_OK);

     /*
      * GDIPlusDCIOff_Init() must be called from a thread that pumps
      * messages - typically the main UI thread. In this sample, the
      * MessageBox calls contain message pumps. A real-world program
      * likely has its own GetMessage() loop instead.
      */ 
     if( ! GDIPlusDCIOff_Init() )
     {
          MessageBox(NULL,TEXT("GDIPlusDCIOff_Init() failed"), TITLE, MB_OK);
          return 0;
     }

     MessageBox(NULL,TEXT("DCI is now turned off in all existing GDI+ programs. Click OK to turn on DCI again..."), TITLE, MB_OK);

     GDIPlusDCIOff_Uninit();
     
     MessageBox(NULL,TEXT("DCI remains turned off in all existing GDI+ programs, but will be turned on for new programs that start. Click OK to exit this sample."), TITLE, MB_OK);

    return 0;
}
				

???????

???? ???????: 319261 - ????? ??? ??????: 04/????? ??????/1428 - ??????: 4.7
????? ???
  • Microsoft .NET Framework 1.0, ????? ?????? ??:
    • the operating system: Microsoft Windows XP
  • Microsoft GDI+ 1.0, ????? ?????? ??:
    • the operating system: Microsoft Windows XP
  • Microsoft Office XP, ????? ?????? ??:
    • the operating system: Microsoft Windows XP
  • Microsoft Visio 2002 Professional Edition, ????? ?????? ??:
    • the operating system: Microsoft Windows XP
  • Microsoft Visio 2002 Standard Edition, ????? ?????? ??:
    • the operating system: Microsoft Windows XP
????? ??????: 
kbmt kbbug kbfix kbshell kbwinxpsp1fix KB319261 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????319261

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

 

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