Created
October 17, 2010 04:44
-
-
Save snaka/630543 to your computer and use it in GitHub Desktop.
デスクトップに文字を描画する(不完全版)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, | |
PSTR cmdLine, int cmdShow) | |
{ | |
HWND desktop = GetDesktopWindow(); | |
HDC hdc = GetWindowDC(desktop); | |
TCHAR label[] = TEXT("hoge"); | |
TextOut(hdc, 100, 100, label, lstrlen(label)); | |
UpdateWindow(desktop); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
この方法だと、スクリーンの前面のレイヤー(?)に描画されてしまいます。
また、他のウィンドウが重なったとき再描画されません。