{"id":237,"date":"2022-03-15T01:05:48","date_gmt":"2022-03-14T16:05:48","guid":{"rendered":"https:\/\/hack.jp\/?p=237"},"modified":"2022-03-15T20:18:06","modified_gmt":"2022-03-15T11:18:06","slug":"%e7%84%a1%e9%a7%84%e3%81%ab%e3%81%8b%e3%81%a3%e3%81%93%e3%81%84%e3%81%84%e3%82%b3%e3%83%9e%e3%83%b3%e3%83%89%e3%83%97%e3%83%ad%e3%83%b3%e3%83%97%e3%83%88%ef%bc%88win1011%ef%bc%89","status":"publish","type":"post","link":"https:\/\/hack.jp\/237\/","title":{"rendered":"\u7121\u99c4\u306b\u304b\u3063\u3053\u3044\u3044\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\uff08Win10,11\uff09"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u80cc\u666f\u3092\u307c\u304b\u3059\u96a0\u3057API<\/h2>\n\n\n\n<p>Windows 10,11\u306e\u96a0\u3057API SetWindowCompositionAttribute\u3092\u4f7f\u3046\u3053\u3068\u3067\u4efb\u610f\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u80cc\u666f\u3092\u307c\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u80cc\u666f\u3092\u307c\u304b\u3059\u3068\u4e0b\u8a18\u306e\u3088\u3046\u306a\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"480\" height=\"327\" src=\"\/wp-content\/uploads\/2022\/03\/59d0fdf2-s.png\" alt=\"\" class=\"wp-image-238\" srcset=\"\/wp-content\/uploads\/2022\/03\/59d0fdf2-s.png 480w, \/wp-content\/uploads\/2022\/03\/59d0fdf2-s-300x204.png 300w\" sizes=\"(max-width: 480px) 100vw, 480px\" \/><\/figure>\n\n\n\n<p>\u80cc\u9762\u304c\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u753b\u50cf\u306e\u5834\u5408\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u307c\u3084\u3051\u305f\u3059\u308a\u30ac\u30e9\u30b9\u306e\u3088\u3046\u306a\u52b9\u679c\u306e\u8868\u793a\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u6280\u8853\u3092\u4f7f\u3063\u3066Windows\u306e\u6a19\u6e96\u306e\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u5bfe\u3057\u3066\u9069\u7528\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u304b\u3063\u3053\u3088\u304f\u306a\u3063\u305f\u306e\u3067\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3078\u306e\u9069\u7528<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"725\" height=\"497\" src=\"\/wp-content\/uploads\/2022\/03\/image-21.png\" alt=\"\" class=\"wp-image-240\" srcset=\"\/wp-content\/uploads\/2022\/03\/image-21.png 725w, \/wp-content\/uploads\/2022\/03\/image-21-300x206.png 300w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/figure>\n\n\n\n<p>\u30bf\u30a4\u30c8\u30eb\u30d0\u30fc\u306e\u90e8\u5206\u306e\u6587\u5b57\u306e\u80cc\u666f\u306f\u767d\u304f\u306a\u3063\u3066\u3044\u307e\u3059\u304c\u3002\u3002\u3061\u3087\u3063\u3068\u304b\u3063\u3053\u3088\u304f\u306a\u308a\u307e\u3057\u305f\u3002\u4e0b\u8a18\u306b\u4f5c\u6210\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u3068\u305d\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8cbc\u308a\u4ed8\u3051\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"is-style-st-paragraph-check\">\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u6587\u5b57\u3068\u80cc\u666f\u8272\u304c\u540c\u8272\u306e\u5834\u5408\u306f\u3001\u6587\u5b57\u304c\u975e\u5e38\u306b\u898b\u3048\u305a\u3089\u304f\u306a\u3063\u3066\u3057\u307e\u3046\u305f\u3081\u3001\u6587\u5b57\u3068\u53cd\u5bfe\u8272\u306e\u80cc\u666f\u753b\u50cf\u3092\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3092\u304a\u52e7\u3081\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"is-style-st-paragraph-attention\">\u96a0\u3057API\u3092\u4f7f\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u5b8c\u5168\u306a\u52d5\u4f5c\u3092\u4fdd\u8a3c\u3059\u308b\u3082\u306e\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u81ea\u5df1\u8cac\u4efb\u3067\u3054\u4f7f\u7528\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button is-style-fill\"><a class=\"wp-block-button__link has-vivid-cyan-blue-background-color has-background\" href=\"https:\/\/github.com\/kenjinote\/CmdBlur\/releases\/download\/1.0.0\/CmdBlur100.zip\" rel=\"\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/div>\n<\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-c\" data-lang=\"C\"><code>#include&lt;windows.h&gt;\n\nBOOL bSetWindowBlur;\n\nvoid SetWindowBlur(HWND hWnd)\n{\n\tconst HINSTANCE hModule = LoadLibrary(TEXT(&quot;user32.dll&quot;));\n\tif (hModule)\n\t{\n\t\tstruct ACCENTPOLICY\n\t\t{\n\t\t\tint nAccentState;\n\t\t\tint nFlags;\n\t\t\tint nColor;\n\t\t\tint nAnimationId;\n\t\t};\n\t\tstruct WINCOMPATTRDATA\n\t\t{\n\t\t\tint nAttribute;\n\t\t\tPVOID pData;\n\t\t\tULONG ulDataSize;\n\t\t};\n\t\ttypedef BOOL(WINAPI*pSetWindowCompositionAttribute)(HWND, WINCOMPATTRDATA*);\n\t\tconst pSetWindowCompositionAttribute SetWindowCompositionAttribute = (pSetWindowCompositionAttribute)GetProcAddress(hModule, &quot;SetWindowCompositionAttribute&quot;);\n\t\tif (SetWindowCompositionAttribute)\n\t\t{\n\t\t\tACCENTPOLICY policy = { 3, 0, 0, 0 };\n\t\t\tWINCOMPATTRDATA data = { 19, &policy, sizeof(ACCENTPOLICY) };\n\t\t\tSetWindowCompositionAttribute(hWnd, &data);\n\t\t}\n\t\tFreeLibrary(hModule);\n\t}\n}\n\nBOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)\n{\n\tDWORD dwProcessId;\n\tGetWindowThreadProcessId(hWnd, &dwProcessId);\n\tif (dwProcessId == lParam)\n\t{\n\t\tSetWindowBlur(hWnd);\n\t\tbSetWindowBlur = TRUE;\n\t\treturn FALSE;\n\t}\n\treturn TRUE;\n}\n\nint WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPreInst, LPSTR pCmdLine, int nCmdShow)\n{\n\tPROCESS_INFORMATION pInfo = { 0 };\n\tSTARTUPINFO sInfo = { 0 };\n\n\tsInfo.cb = sizeof(STARTUPINFO);\n\tsInfo.dwFlags = STARTF_USESHOWWINDOW;\n\tsInfo.wShowWindow = nCmdShow;\n\n\tTCHAR szCommandLine[MAX_PATH];\n\tif (GetEnvironmentVariable(TEXT(&quot;ComSpec&quot;), szCommandLine, MAX_PATH) && CreateProcess(0, szCommandLine, 0, 0, 0, 0, 0, 0, &sInfo, &pInfo))\n\t{\n\t\tCloseHandle(pInfo.hThread);\n\t\tWaitForInputIdle(pInfo.hProcess, INFINITE);\n\t\tCloseHandle(pInfo.hProcess);\n\t\twhile (!bSetWindowBlur)\n\t\t{\n\t\t\tEnumWindows(EnumWindowsProc, (LPARAM)pInfo.dwProcessId);\n\t\t}\n\t}\n\treturn 0;\n}<\/code><\/pre><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u80cc\u666f\u3092\u307c\u304b\u3059\u96a0\u3057API Windows 10,11\u306e\u96a0\u3057API SetWindowCompositionAttribute\u3092\u4f7f\u3046\u3053\u3068\u3067\u4efb\u610f\u306e\u30a6\u30a3\u30f3\u30c9\u30a6\u306e\u80cc\u666f\u3092\u307c\u304b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a6\u30a3\u30f3\u30c9 &#8230; <\/p>\n","protected":false},"author":1,"featured_media":251,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[60,45,61],"class_list":["post-237","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-9","tag-c","tag-45","tag-api"],"_links":{"self":[{"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/posts\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":0,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/posts\/237\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/media\/251"}],"wp:attachment":[{"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/media?parent=237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/categories?post=237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hack.jp\/wp-json\/wp\/v2\/tags?post=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}