ItsMods

Full Version: Getting the caption of a window
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It is a handle(H) window(WND), basicly it calls for all the other commands to gain access to a window.
PLZ HALP PLZ *bump*
thanks :'(
Restart your computer




Troll
Fuu

damn you itsmods, after all i've done for you.....
You made a thread with a question, you looked through the source, found out how it worked, asked what is HWND, @aosma8 answered, thread over.

We don't know what you wan't anymore.
I'm still not able to retrieve the console contents....
Pretty obvious?
Just read through the source some more and find out how they do it?
Finally solved it:
CSHARP Code
  1. unsafe string MW3Console
  2. {
  3. get
  4. {
  5. IntPtr form = *(IntPtr*)0x5933A50;
  6. IntPtr txtbox = FindWindowEx(form, IntPtr.Zero, "Edit", null);
  7. IntPtr console = FindWindowEx(form, txtbox, "Edit", null);
  8. StringBuilder sb = new StringBuilder(9999999);
  9. int result = SendMessageTimeout(
  10. console,
  11. 0x0D /*WM_GETTEXT*/,
  12. 9999999,
  13. sb,
  14. 10 /*SMTO_ABORTIFHUNG | SMTO_NOTIMEOUTIFNOTHUNG*/,
  15. 500,
  16. IntPtr.Zero);
  17. return sb.ToString();
  18. }
  19. }