1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[Q]SetDlgItemText

Discussion in 'Programming' started by Razz, Aug 14, 2010.

  1. Razz

    Razz Dedicated Supporter Dedicated Donor

    I was implanting my bypass into my aran trainer and i tough that it would be nice to show at my gui if the bypass is active or not. So i made a static text with a base value of 'Off' but now i have the problem that the function is not written in Main.cpp so it gives me the error that hWnd isn't defined. Can anyone help me out.

    I already tried this:
    Code (Text):
    1.  
    2. int bypasson = 1;
    3.  
    And then compare it in Main.cpp and fromthere do SetDlgItemText but i failed.
     
  2. Razz

    Razz Dedicated Supporter Dedicated Donor

    Asnwer pl0x i need itz ;d
     
  3. Serenoxis

    Serenoxis Active Member

    I normally pass the HWND through my function call so I can manipulate the gui, the trainer sources in this forum have good examples. Anyways SetDlgItemText(hWnd, IDC_BYPASS, "On" ); pass your bypass function the window handle as an argument and change IDC_BYPASS to the ID of your static text item, you can change "On" to whattever you want displaying.
     
  4. Razz

    Razz Dedicated Supporter Dedicated Donor

    It's in Bypass.cpp but my whole gui is defined in main.cpp so it doesnt work ;S
     
  5. Serenoxis

    Serenoxis Active Member

    Then Call you bypass like this : bypass_function(HWND hWnd); adjust hWnd to what you used for your window handle when making the gui then in Bypass.cpp your function would be defined similar to void bypass_function(HWND hWnd) {...} and just place the SetDlgItemText(hWnd, IDC_BYPASS, "On" ); in the bypass function.
     
  6. Razz

    Razz Dedicated Supporter Dedicated Donor

    I'll just place the bypass in Main.cpp
     

Share This Page