| View previous topic :: View next topic |
| Author |
Message |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Thu Nov 13, 2008 7:50 pm Post subject: [help] C++ |
|
|
well i get this error
| Code: | | 'SetDlgItemTextW' : cannot convert parameter 3 from 'const char [3]' to 'LPCWSTR' |
when using:
help plz?
_________________
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Nov 13, 2008 7:56 pm Post subject: |
|
|
compile in multi-byte mode under settings
_________________
|
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Thu Nov 13, 2008 7:59 pm Post subject: |
|
|
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 |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Thu Nov 13, 2008 8:01 pm Post subject: |
|
|
| 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 |
|
 |
iRiot Master Cheater
Reputation: 0
Joined: 03 Jul 2007 Posts: 395 Location: Aka RIOT
|
Posted: Thu Nov 13, 2008 8:08 pm Post subject: |
|
|
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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Nov 13, 2008 8:09 pm Post subject: |
|
|
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 |
|
 |
nwongfeiying Grandmaster Cheater
Reputation: 2
Joined: 25 Jun 2007 Posts: 695
|
Posted: Thu Nov 13, 2008 8:57 pm Post subject: |
|
|
| 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 |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Fri Nov 14, 2008 12:14 am Post subject: |
|
|
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 |
|
 |
|