Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Converting wchar_t to ulong_ptr and int

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ElectroFusion
Grandmaster Cheater
Reputation: 0

Joined: 17 Dec 2006
Posts: 786

PostPosted: Sat Jan 03, 2009 3:22 pm    Post subject: [C++] Converting wchar_t to ulong_ptr and int Reply with quote

Since GetDlgItemText's buffer is a wchar_t and I need to readpointer the result (Which means it needs to be a ulong_ptr and an int (offset)) I need to convert it. Is there an easy way to do this?
_________________
qwerty147 wrote:

ghostonline wrote:

what world are you in?

bera

but i live in NZ
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sat Jan 03, 2009 5:16 pm    Post subject: Reply with quote

uh what.


Code:
UINT GetDlgItemText(     
    HWND hDlg,
    int nIDDlgItem,
    LPTSTR lpString,
    int nMaxCount
);


LPTSTR is either char* or wchar_t* depending on your settings.


LUCKILY FOR YOU...


http://msdn.microsoft.com/en-us/library/ms645485(VS.85).aspx

Code:
UINT GetDlgItemInt(     
    HWND hDlg,
    int nIDDlgItem,
    BOOL *lpTranslated,
    BOOL bSigned
);


GetDlgItemInt exists
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Sat Jan 03, 2009 5:38 pm    Post subject: Reply with quote

nice little function exists for this (atoi) ascii to int
and itoa int to ascii

_________________
Back to top
View user's profile Send private message
samuri25404
Grandmaster Cheater
Reputation: 7

Joined: 04 May 2007
Posts: 955
Location: Why do you care?

PostPosted: Sun Jan 04, 2009 12:31 am    Post subject: Reply with quote

blankrider wrote:
nice little function exists for this (atoi) ascii to int
and itoa int to ascii


_wtoi, _itow, I believe for Unicode.

_________________
Wiccaan wrote:

Oh jeez, watchout I'm a bias person! Locked.


Auto Assembly Tuts:
In Depth Tutorial on AA
Extended
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites