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 


[help] C++

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

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Thu Nov 13, 2008 7:50 pm    Post subject: [help] C++ Reply with quote

well i get this error

Code:
'SetDlgItemTextW' : cannot convert parameter 3 from 'const char [3]' to 'LPCWSTR'


when using:

Code:
SetDlgItemText


help plz?

_________________
Back to top
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Nov 13, 2008 7:56 pm    Post subject: Reply with quote

compile in multi-byte mode under settings
_________________
Back to top
View user's profile Send private message Send e-mail
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Thu Nov 13, 2008 7:59 pm    Post subject: Reply with quote

Well I'm assuming your using VC++. So do this:

1) In the solution explorer right click on your project name and choose "Properties."
2) Go to Configuration Properties.
3) Go to General
4) Under the Project Defaults section you should see an option called "Character-Set". It should be set to "Use Unicode Character Set" by default (as it is for all projects). Change it to "Use Multi-Byte Character Set"

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Thu Nov 13, 2008 8:01 pm    Post subject: Reply with quote

oib111 wrote:
Well I'm assuming your using VC++. So do this:

1) In the solution explorer right click on your project name and choose "Properties."
2) Go to Configuration Properties.
3) Go to General
4) Under the Project Defaults section you should see an option called "Character-Set". It should be set to "Use Unicode Character Set" by default (as it is for all projects). Change it to "Use Multi-Byte Character Set"


ya. This is what is needed to be done.

_________________
Back to top
View user's profile Send private message Send e-mail
iRiot
Master Cheater
Reputation: 0

Joined: 03 Jul 2007
Posts: 395
Location: Aka RIOT

PostPosted: Thu Nov 13, 2008 8:08 pm    Post subject: Reply with quote

thanks guys and btw kitterz iam learning off ur source right now lol..
_________________


Last edited by iRiot on Thu Nov 13, 2008 8:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Nov 13, 2008 8:09 pm    Post subject: Reply with quote

No. Don't do that, just use UNICODE.
Simply use the tchar routines.

Code:
#include <tchar.h>
...
SetDlgItemText(hWnd, DlgId, _T("This is my UNICODE string"));
or
SetDlgItemText(hWnd, DlgId, _TEXT("This is my UNICODE string"));
or (doesnt require tchar.h)
SetDlgItemText(hWnd, DlgId, TEXT("This is my UNICODE string"));


Above:
break; after WM_HOTKEY instructions.

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

Joined: 25 Jun 2007
Posts: 695

PostPosted: Thu Nov 13, 2008 8:57 pm    Post subject: Reply with quote

oib111 wrote:
Well I'm assuming your using VC++. So do this:

1) In the solution explorer right click on your project name and choose "Properties."
2) Go to Configuration Properties.
3) Go to General
4) Under the Project Defaults section you should see an option called "Character-Set". It should be set to "Use Unicode Character Set" by default (as it is for all projects). Change it to "Use Multi-Byte Character Set"


I remember when I used VS 2500 around 1-2 yeras ago and I came up with this problem and I was WTF and spend countless horus looking at my code to see what's wrong.

Haha, BAD times...
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Fri Nov 14, 2008 12:14 am    Post subject: Reply with quote

I agree lurc. Use unicode. Though it sometimes does become a pain in the ass all the time, it's better to use. So either just use tchar's or cast with LPCWSTR.
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
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