Register for your free account! | Forgot your password?

You last visited: Today at 01:10

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

Advertisement



Client size

Discussion on Client size within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
Client size

Hi,

i started to write a little d3d9 tool, which will display target HP and MP.

i want to Center the Text in the middle of the Window.
So my problem is, how do i get the width of the window?

this would be perfect, but how do it get the hWnd of the Process?
BOOL WINAPI GetClientRect(
__in HWND hWnd,
__out LPRECT lpRect
);
RunzelEier is offline  
Old 10/21/2011, 17:31   #2
 
ToxicData's Avatar
 
elite*gold: 32
Join Date: Dec 2009
Posts: 937
Received Thanks: 1,307
Hallo da dein Name auf Deutsch ist denke ich kann ich es dir auf Deutsch erklären.

Code:
BOOL WINAPI GetClientRect(
__in HWND hWnd,
__out LPRECT lpRect
);
Wenn du den derzeitigen Prozess meinst bekommst du das Handle per CREATION_PARAMETERS oder NULL, als Zweiter/s Parameter/Argument wird LPRECT benötigt ( ein Pointer zu einer RECT Instance ).

Hier mal ein Code aus meinem D3DExploit:
Code:
D3DDEVICE_CREATION_PARAMETERS cparams;
RECT rect;

mDevice->GetCreationParameters(&cparams);
GetWindowRect(cparams.hFocusWindow, &rect);
mfg ToxicData
ToxicData is offline  
Thanks
1 User
Old 10/21/2011, 17:59   #3
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
ja, das ist genau das, was ich brauche.

gehe ich recht in der annahme, das ich um
mDevice zu erhalten vorher
IDirect3D9::CreateDevice
hooken muss oder woher bekomm ich das?

Edit: hat sich erledigt.
Ich hook jetzt BeginPaint, das wird nach jedem resize aufgerufen und darüber bekomm ich ja auch die hwnd
RunzelEier is offline  
Old 10/21/2011, 23:57   #4
 
ToxicData's Avatar
 
elite*gold: 32
Join Date: Dec 2009
Posts: 937
Received Thanks: 1,307
Ok, ich kann dir empfehlen EndScene und Present zu hooken, ich weiß nicht ob BeginPaint für soetwas eine gute wahl ist.

Bzw wenn du soetwas machen willst hole dir den Pointer zur IDirect3DDevice9 Instance (LPDIRECT3DDEVICE9 == IDirect3DDevice9*).
Du bekommst bei fast jeder Function den Pointer zur Device mitgeliefert.

Und es freut mich das ich dir so helfen konnte ^^

mfg ToxicData
ToxicData is offline  
Thanks
1 User
Old 10/22/2011, 11:49   #5
 
elite*gold: 0
Join Date: Apr 2006
Posts: 6,597
Received Thanks: 1,830
D3DPRESENT_PARAMETERS

Medix is offline  
Thanks
1 User
Old 10/22/2011, 20:16   #6
 
RunzelEier's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 1,196
Received Thanks: 682
Natürlich hook ich EndScene um ins bild zu malen.

Aber BeginPaint hooke ich, da es bei jedem resize und nur beim resize vom Fenster aufgerufen wird.
Also wird auch GetClientRect nur aufgerufen, wenn sich die größe vom Fenster ändert.

Ahh.... hab während ich den Post hier geschrieben habe nochmal einwenig in der msdn geblätter und jetzt wirds mir klar...

Naja, ich bleib trotzdem bei meiner Lösung, da ansonsten bei jedem Frame die Fenstergröße überprüft wird und das ist ja unnötig.

Trotzdem vielen Dank
RunzelEier is offline  
Reply


Similar Threads Similar Threads
[SIZE="6"][/SIZE]Wichtig an alle die gepowerlvlt werden möchten !![/SIZE]
08/21/2011 - WarRock - 2 Replies
habe einige Powerlvl service auf e-pvp getestet und auch einiges an geld gezahlt. Doch passt auf sie ziehen euch bloß das geld ab und verschwinden dan :(. Ich dachte wenigstens auf e-pvp wird macn nicht abgezogen aber kann man ja nix machen. mfg damdam9
[B][SIZE="5"]Neonblue client 4.0[/SIZE][/B]
10/13/2010 - Metin2 Private Server - 7 Replies
hallo:) leude ich suche ein neonblue client 4.0! weil der 4.5 seine eigene macken hat, mann kann nicht mit dem andere spieler einlogen:( im klar text, zb. ich habe mein kumpel mein client 4.5 gegeben damit er auch einlogen kann! geht aber nicht nach der ´´Anmeldevorgang läuft´´ schließt er automatisch Metin2 fenster zu! aber ich weiß nicht aus welche gründen das bei mir geht ich kann mich ruhig einlogen und spielen, bei anderen geht das nicht! deswegen suche ich...
[Question] How do´i change the size of mobs client side?
02/18/2010 - Conquer Online 2 - 8 Replies
I guess ill need a .dat decrypter please post only if you got something usefull to say not like: Yes you need a decrypter....
[Request]Conquer Client Size
11/28/2009 - CO2 Programming - 3 Replies
This is maybe in the wrong section.... Is there a way to change the size of the conquer client? I play with my taskbar bigger then usaual and like playing conquer like this: http://img24.imageshack.us/img24/1042/47201580.jp g As you can see from the picture the bottom of conquer is cut off because of the taskbar, and I don't want to use smaller conquer window, or make my taskbar smaller. If someone could try edit the size of it, it would be nice :)
How to change body size client side
04/18/2007 - Conquer Online 2 - 0 Replies
I was just thinking coz im assed of my big body on co and id like to have it small and i cba to pay for it so what files to edit?



All times are GMT +1. The time now is 01:10.


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.