|
You last visited: Today at 03:41
Advertisement
Problem inserting custom window in Conquer
Discussion on Problem inserting custom window in Conquer within the CO2 Weapon, Armor, Effects & Interface edits forum part of the CO2 Guides & Templates category.
11/18/2025, 16:24
|
#1
|
elite*gold: 0
Join Date: Apr 2013
Posts: 3
Received Thanks: 1
|
Problem inserting custom window in Conquer
|
|
|
11/22/2025, 13:55
|
#2
|
elite*gold: 0
Join Date: Feb 2009
Posts: 262
Received Thanks: 161
|
I haven’t worked with ImGui. But Windows GUI windows are global. You can use Spy++ to identify them, move them, or change their parents, etc. I remember testing this idea once with a ‘Custom GUI’. What I did was simply draw a button. I used CreateWindow to create the button, and then I applied an image over it using DirectX.
|
|
|
11/23/2025, 21:06
|
#3
|
elite*gold: 0
Join Date: Apr 2013
Posts: 3
Received Thanks: 1
|
Quote:
Originally Posted by teroareboss1
I haven’t worked with ImGui. But Windows GUI windows are global. You can use Spy++ to identify them, move them, or change their parents, etc. I remember testing this idea once with a ‘Custom GUI’. What I did was simply draw a button. I used CreateWindow to create the button, and then I applied an image over it using DirectX.
|
thankyou
|
|
|
11/23/2025, 21:36
|
#4
|
elite*gold: 52
Join Date: Jul 2008
Posts: 50
Received Thanks: 15
|
You need to hook into the child window proc and swallow any mouse events if imgui requests mouse capture:
HTML Code:
class MouseHook {
inline static HWND parentWindow;
inline static HWND childWindow;
inline static WNDPROC oChildWndProc = NULL;
inline static LRESULT __stdcall ChildWndProc(HWND hWnd, uint32_t uMsg, WPARAM wParam, LPARAM lParam)
{
ImGuiIO& io = ImGui::GetIO();
switch (uMsg)
{
case WM_LBUTTONDOWN:
case WM_LBUTTONUP:
case WM_MOUSEMOVE:
case WM_RBUTTONDOWN:
case WM_RBUTTONUP:
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_MOUSEWHEEL:
case WM_MOUSEHWHEEL:
{
if (io.WantCaptureMouse)
{
// swallow mouse events
return 0;
}
break;
}
}
// Otherwise let normal processing happen
return CallWindowProc(oChildWndProc, hWnd, uMsg, wParam, lParam);
}
public:
inline static void Init()
{
parentWindow = GetParent(GetActiveWindow());
childWindow = GetWindow(parentWindow, GW_CHILD);
oChildWndProc = (WNDPROC)SetWindowLongPtr(childWindow, GWLP_WNDPROC, (LONG_PTR)ChildWndProc);
}
};
I haven't tested the above code but it should work.
|
|
|
Similar Threads
|
Inserting
06/17/2011 - Rappelz - 4 Replies
Hey,
I'm abit stuck with inserting items, i tried adding items, but the Server command guide doesn't help me too much, because i dont know how to set it out properly.
For example, The field saying FLAG "#insert_item(ID, VALUE, ENCHANT, LVL, FLAG, "char_name")" could someone write it out for me please? Any help would be appriciated.
Regards Aaron
|
Help xP Inserting new items into a private server
03/13/2011 - CO2 Private Server - 0 Replies
hey, im starting a new private server and i was wondering if somone out there can help me figure out how to create new files to insert the new items. please :P
|
questions about s4league settings and inserting one dll
05/10/2010 - S4 League - 4 Replies
hello friends i have two questions:
1. is there a resolution setting in s4?
2. how to insert some dll in s4? i cant do it because perx or winject dont see my s4legue exe:( can any one solve this problem...
|
All times are GMT +1. The time now is 03:42.
|
|