Results 1 to 7 of 7
  1. #1
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed

    Finding the Window

    I have two windows that open when I run AssaultCube. The problem is that they are both named the same thing. One window is a cmd window which loads the actual game and the other window is the actual game.

    How can I specify which window I want using FindWindow() or another function?
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon:


  2. #2
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Use a function in the windows you want the calls it in front of the other?

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  3. #3
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed
    Can you rephrase that. I dont understand
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon:


  4. #4
    CAFlames's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Location
    Where ever my imagination takes me
    Posts
    3,006
    Reputation
    202
    Thanks
    2,944
    My Mood
    Twisted
    Why dont u create a function that calls the windows you want ( no the cmd ) over the cmd....

    Current Works:
    ---Horror Game





    [IMG]https://i645.photobucke*****m/albums/uu180/drgnforce9/Siggys/signature3.jpg[/IMG]
    Special thanks to drgnforce9 for my sig picture

    Quote Originally Posted by m_t_h View Post

    CAflames is one epic coder.

    Rep and thanks him.. or you're perma banned.

  5. #5
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed
    How would exactly do that? I searched the Windows API but havent found anything on it
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon:


  6. #6
    mmbob's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    ja
    Posts
    653
    Reputation
    70
    Thanks
    1,157
    My Mood
    Bitchy
    You could either specify the window class with the name (use Spy++ or something similar to get the class name), or work with the process name.

    To find a window with a specific process name (I assume the "actual" game is AssaultCube.exe),
    use EnumWindows,

    pass the HWND to GetWindowThreadProcessId,

    open the process with OpenProcess,

    get the file name with GetModuleFileNameEx,

    and compare it to AssaultCube.exe.

  7. The Following User Says Thank You to mmbob For This Useful Post:

    aanthonyz (03-04-2011)

  8. #7
    aanthonyz's Avatar
    Join Date
    Aug 2010
    Gender
    male
    Location
    Hitler's Minivan
    Posts
    483
    Reputation
    27
    Thanks
    83
    My Mood
    Relaxed
    Im going to start off using Spy++ after a while I will switch to the other method. Thanks
    "The best way to predict your future is to create it."

    Contributions I made:

    DirectX E-Books
    Hacking Tools
    Hacking into a PC

    Need Help?
    Send me a PM, or send me a email at : aanthonyz10@gmail.com

    Click My Dragon: