Log in

View Full Version : [C++] How to show ur own window in full screen game ?



keciciler
February 21st, 2014, 01:22 PM
I'm trying below code for showing my window after i injected my dll.It's for an free mmo game by the way.But i stucked cause my window is opening but i can view my form or the game window what i need be able to view them both.
When the game is not running fullscreeen my code works perfect but this problem is when game running in fullscreen.




HWND hWnd;
MSG iMsg;
WNDCLASSEX wc;

ZeroMemory(&wc,sizeof(WNDCLASSEX));

wc.cbSize = sizeof(WNDCLASSEX);
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hbrBackground = (HBRUSH)COLOR_BTNSHADOW;
wc.hIcon = LoadIcon(NULL,IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.hInstance = hModule;
wc.lpfnWndProc = WndProc;
wc.lpszMenuName = NULL;
wc.lpszClassName = _T("WindowClass");
wc.hIconSm = LoadIcon(NULL,IDI_APPLICATION);


if (!RegisterClassEx(&wc)){
MessageBox(0,_T("Failed"),0,0);
ExitWindow();
}
hWnd = CreateWindowEx( WS_EX_TOPMOST | WS_EX_OVERLAPPEDWINDOW,_T("WindowClass"),_T("DLL Window"), WS_OVERLAPPED| WS_VISIBLE | WS_CAPTION ,CW_USEDEFAULT,CW_USEDEFAULT,200,200,0,0,hModule,0 );
ShowWindow(hWnd,SW_SHOW);
UpdateWindow(hWnd);

What's could be wrong ?
I have tried setting the WS_EX_TOPMOST but it's still not working,most probabily cause of fullscreen thing from DirectX but how can imanaged to do this any idea ?

AlexEe
February 21st, 2014, 04:54 PM
Do you know anything about DirectX hooking? Or at least about D3D?

keciciler
February 21st, 2014, 09:59 PM
Sure but i dont want DirectX Menu , I want windows form style :/