启用/禁用CLEARTYPE

时间:2016-03-02 09:58:58

标签: c# user32 cleartype

我使用以下代码尝试强制在user32.dll中启用CLEARTYPE选项,但不能使用报表文本表示图像。

    [DllImport("user32.dll", SetLastError = true)]
            [return: MarshalAs(UnmanagedType.Bool)]
            static extern bool SystemParametersInfo(
                uint uiAction,
                uint uiParam,
                bool pvParam,
                uint fWinIni
            );

            const uint SPI_SETCLEARTYPE = 0x1049;
            const uint SPIF_UPDATEINIFILE = 0x01;
            const uint SPIF_SENDWININICHANGE = 0x02;

SystemParametersInfo(SPI_SETCLEARTYPE, 0, true, SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE);

任何建议?

0 个答案:

没有答案