Прозрачное окно с переходом по клику и сверхуC++

Программы на C++. Форум разработчиков
Ответить
Anonymous
 Прозрачное окно с переходом по клику и сверху

Сообщение Anonymous »


I am currently working on a small overlay project in Game Maker that I want to always render on top, have a transparent background, and allow clickthrough to the window behind it. Using GML extensions and a DLL has worked for the transparent background part, although nothing I have tried for the rest have worked.

Using SetWindowPos for HWND_TOPMOST or calling it with HWND_TOP every time it get minimized has seemingly no effect. This thread seems to be close to what I am looking for, except I do not need the DirectX rendering as Game Maker should do that for me, and I do not think it will connect with the GML extension that I need it to.
#include "pch.h" #include //[DllImport("User32.dll")] //#include extern "C" __declspec(dllexport) void DLLMakeWindowTransparent2(HWND hwnd) { //get HWND from Gamemaker //makes the background of the gamemaker window transparent, this works fantastically MARGINS margins = { -1,0,0,0 }; DwmExtendFrameIntoClientArea(hwnd, &margins); } extern "C" __declspec(dllexport) void DLLMakeWindowTop(HWND hwnd) { //should force the window to always display on top, but hasnt worked //SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); }

Источник: https://stackoverflow.com/questions/780 ... and-on-top
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «C++»