| View previous topic :: View next topic |
| Author |
Message |
ElectroFusion Grandmaster Cheater
Reputation: 0
Joined: 17 Dec 2006 Posts: 786
|
Posted: Sat Jan 03, 2009 3:22 pm Post subject: [C++] Converting wchar_t to ulong_ptr and int |
|
|
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sat Jan 03, 2009 5:16 pm Post subject: |
|
|
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 |
|
 |
HomerSexual Grandmaster Cheater Supreme
Reputation: 5
Joined: 03 Feb 2007 Posts: 1657
|
Posted: Sat Jan 03, 2009 5:38 pm Post subject: |
|
|
nice little function exists for this (atoi) ascii to int
and itoa int to ascii
_________________
|
|
| Back to top |
|
 |
samuri25404 Grandmaster Cheater
Reputation: 7
Joined: 04 May 2007 Posts: 955 Location: Why do you care?
|
Posted: Sun Jan 04, 2009 12:31 am Post subject: |
|
|
| blankrider wrote: | nice little function exists for this (atoi) ascii to int
and itoa int to ascii |
_wtoi, _itow, I believe for Unicode.
_________________
|
|
| Back to top |
|
 |
|