![]() I'm looking for any solution to this problem (not neccesseraly one involving a transparent topmost window).Īlso on a sidenote if someone could explain to me how to effectively use GetLastError(), and also why are game behaving differently than a common window. My guess is that application such as games have a more direct control over the display device. however its a pretty big file and I wasn't able to understand where the relevant part was. here was my code : SetWindowPos(handle, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE) Įrror = GetLastError() // i tried using GetLastError to understand what was happeningĬout << error << endl // but it only returns "5", I've read that you can look in WINNT.H for information about the meanings of error codes It uses overlay rendering technique which works both in full screen exclusive and. I've also tried using SetWindowPos to set the game to Not TOPMOST, it didnt work either. HudSight tool draws your custom crosshair directly in a game screen. If(myHandle = 0)//here SetWindowPos returns 0 (function failed) MyHandle = FindWindow(NULL,TEXT("Crosshair")) //retieving my own application window handle in this next part I tried using windows api to make my window appear on top of the game. tAttribute(Qt::WA_TranslucentBackground) //making the window see through tWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) // here making the window frameless and topMost via qt tGeometry(960-label->width()/2,540-label->height()/2,label->width(),label->height()) //here I'm making my window appear in the center of my screen This widget accomplishes that by making use of the XBOX Game Bar (part of Windows 10/11). Label->setText("O") //I'm using an "O" as a crosshair until I can figure out how to display image transparency. This widget is simply a companion to the Crosshair Designer desktop app that allows you to use your custom-made crosshairs while playing full-screen PC games. Here is my code : (everything is in the main since im only testing the core functionalitys of my app, I've commented it extensively to try and make my problem more accessible) QApplication app(argc, argv) I've succesfully made my window topmost for everything except the games :/ If you don't know which one to pick, try the 'Direct3D 10/11/12' option. How to Install (for any game) Install ReShade from Click 'Select game' and select your game executable Check the appropriate game rendering API. The aim is to have a crosshair in some FPS games that doesn't provide one. A heavily customizable, fullscreen-compatible crosshair overlay shader. ![]() I'm trying to make an application displaying a crosshair at the center of the screen and staying on top of everything else.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |