|
hum, yes, but you can now define a macro like this :
#if defined(_UNICODE)
#define _MBCSCPY wcscpy
#else
#define _MBCSCPY strcpy
#endif
now, you can use it just like that :
#include <string.h>
TCHAR* psz = "Hello";
TCHAR tab[10];
_MBCSCPY(tab, psz);
_tcscpy(tab, psz);
it will use strcpy() if _UNICODE is not defined, wcscpy() otherwise.
TOXCCT >>> GEII power [toxcct][VisualCalc]
-- modified at 8:44 Tuesday 30th August, 2005
|
|
|
|
|
toxcct wrote:
hum, yes, but you can now define a macro like this :
#if defined(_UNICODE)
#define _MBCSCPY wcscpy
#else
#define _MBCSCPY strcpy
#endif
Or simply use _tcscpy , which is already defined with the same purpose
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
yes,
thanks for the info, i did not read the msdn page to the end...
i updated my post consequently.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi,
sFontDetails.FaceName is an array of character, you cannot simply do this
sFontDetails.FaceName = _T("Times New Roman");
So use _tcscpy() it will work fine for you
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
did you bother read the other posts on that thread ?
all you said were already answered...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thanks everyone, tried _tscpy and it worked like a charm:
_tcscpy(sFontDetails.FaceName, _T("Times New Roman")); //no problem
Learning C++ having done C# is clearly giving me some problems. Anyway thanks again to all who helped...
|
|
|
|
|
Respected all
Regards!
I am david and have a problem.
I have a number of images that store on disk i want that when i run my program all the images readed once and then store in memory temorarily and then displaying from memory rather reading one by one from desk.
plz guide me.
from
david
|
|
|
|
|
First you have to make some memory dcs. I think you can!
Then load the images to that dcs with LoadImage(...).
You can then use those dcs anytime you want to show the images.
OK?
|
|
|
|
|
Use the CImageList class or create your own array of CBitmaps.
This assumes you are using MFC.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
I want to specify a sound card for windows media player but keep the windows default sound card unchanged (i.e., windows use another sound card). By the use of DirectSound, I can enumerate all sound cards in my system.
So, after I obtained the GUID of the sound cards, how can I specify a GUID for the windows media player? Also, how can i specify another GUID for the system as its default sound card?
Thanks for your kindness help!!!
|
|
|
|
|
i want to know how to get SSL Certificate for my SSL Socket
thanx in advance
-- modified at 4:44 Tuesday 30th August, 2005
|
|
|
|
|
Hi
I will link an object of C module with a simple Win32 console application,
but became link errors. For example i have written a "void SomeFunc()" function in C module and declare it in testMain.cpp(Win32 API cpp module)as:
extern void SomeFunct(void);.
When i link this object, the result is:
1- SomeObject.obj : error LNK2005: _SomeFunc already defined in SomeObject.obj
2- testMain.obj : error LNK2001: unresolved external symbol "void __cdecl SomeFunc(void)" (?SomeFunc@@YAXXZ)
3- Debug/testMain.exe : fatal error LNK1120: 1 unresolved externals
Therefore, i try to declare it as:
extern "C" void SomeFunc(void);
When i link this object, the result is:
1- SomeObject.obj : error LNK2005: _SomeFunc already defined in SomeObject.obj
2- Debug/testMain.exe : fatal error LNK1169: one or more multiply defined symbols found
I don't know why? I will be thankful, when everybody can help me.
Best regards, Alireza
|
|
|
|
|
alireza_shokoie wrote:
1- SomeObject.obj : error LNK2005: _SomeFunc already defined in SomeObject.obj
You seem to be including SomeObject.obj twice, most likely from diferent locations.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hai
Please tell me the different reports available in vc++.
Except using Crystal Reports.If any sample code available ,send me please.
Jeeva
|
|
|
|
|
Does anyone know a free C++ .NET complete tutorial in English or Italian? Note that I already develop with the other .NET languages...
Thanks for sugestions.
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
|
sorry...
[ITA] Tozzi ha ragione: Gaia si sta liberando di noi.
[ENG] Tozzi is right: Gaia is obliterating us.
|
|
|
|
|
hey...
i have to read a text file which looks like this..
1 sdfdf
2 dasdsad
3 fgggg
4 dfdffd
5 yhgtr
. .
. .
. .
i require to position pointer at any certain place then read the file backwards using fscanf... positioning can be done by using the index but how to read the file backwards with fscanf()...(e.g from 3 to 1)...plzz help
|
|
|
|
|
Hi,
maybe you could read forward and then turn your buffer...
Regards
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
beginner..
plz explain by example how to turn the buffer
|
|
|
|
|
Hi,
the most easiest way to do this is:
#include <string>
#include <algorithm>
using namespace std;
string buffer = "hello world";
reverse(buffer.begin(), buffer.end());
Regards
We can do no great things, only small things with great love. - Mother Theresa
|
|
|
|
|
hi..
i'm writing a program that restrict user from accessing all function in microsoft word. in other word, user can only use a certain function based on their level access. Is there any way to hide the original toolbars in microsoft word and how to create new button to replace the original toolbar.
~ NiNi ~
|
|
|
|
|
Hello EveryOne,
i have design one activex control in MFC having different event.
i have problem to passing structure to event MFC.
i have created one event CallChange and i want to pass user define
structure on that event. but when i add event it only show common data
type as parameter not user define struture.
i want to use that control in VB.
plz help.
Thanx in advance.
Rajesh Kapure
|
|
|
|
|
|