예제 #1
0
        public static void SetBkModeChecked(HDC hdc, Gdi32BackgroundMode mode)
        {
            Gdi32BackgroundMode oldMode = SetBkMode(hdc, mode);

            // todo: is it worth checking?
            if (oldMode == Gdi32BackgroundMode.ERROR)
            {
                throw new InvalidOperationException($"{nameof(SetBkMode)} failed. Mode: {mode}.");
            }
        }
예제 #2
0
 private static extern Gdi32BackgroundMode SetBkMode(HDC hdc, Gdi32BackgroundMode mode);