Register for your free account! | Forgot your password?

You last visited: Today at 03:41

  • Please register to post and access all features, it's quick, easy and FREE!

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.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2013
Posts: 3
Received Thanks: 1
Problem inserting custom window in Conquer

Hey guys, can you help me with a situation? I have a client from path 5079, I made a custom window using "Dear ImGui" + DirectX 8, to work directly on the Conquer screen, since it works in DirectX 8..... The screen is 100% in the child window of (1000) of "MyShell"... ok. However, I have a problem working with the mouse event. When clicking, the mouse hovers over and correctly displays the cursor for dragging or clicking, but to actually click, this doesn't work. It simply goes through the click and forces the character to walk or click on anything on the game screen itself... it doesn't obey the button that's there. I tried hooking "PeekMessageW" to capture what's passed to the Conquer screen, to analyze if it's displaying the screen and perform the necessary actions... but without success. Does anyone have any idea what I can do? Find the event associated with the mouse clicks in the Conquer process? or something similar...???



yuturueu is offline  
Old 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.
teroareboss1 is offline  
Old 11/23/2025, 21:06   #3
 
elite*gold: 0
Join Date: Apr 2013
Posts: 3
Received Thanks: 1
Quote:
Originally Posted by teroareboss1 View Post
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
yuturueu is offline  
Old 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.
Relic is offline  
Reply


Similar Threads 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.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.