|
You got it. Remember WCHAR is a 16 bit character set, many of which map 1:1 with the ASCII set padded with a zero byte, which is why it looks like an ASCII character followed by a zero.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
i've some code written as a dll in C++ in Visual Studio 2008. I've to be able to debug it. But i can't load dll in test exe. There isn't any problem on my test exe because when i try to load another dll there isn't any problem. Dll that given to me builded in debug unicode. Is it may be the cause of the problem? And how can i convert it to just debug mode? i really need your help., Thanks in advance.
|
|
|
|
|
The debug and debug unicode project settings load different versions of the Microsoft MFC libraries and DLLs.
All of your MFC based projects, need to be compiled and built with the same project settings.
|
|
|
|
|
So, as the other poster said, rebuld your test exe with unicode debug set. (Hope you used the _T before all strings to enable the project to be built both ways.)
==============================
Nothing to say.
|
|
|
|
|
It makes no difference how the DLL is built as to whether you can use it or not, you just have to use the correct calling sequences. It would be better if you explained exactly what you are doing or trying to do, show some code if it will help, and what results you see.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hello Friends
I am creating a Function template Whose declaration is like this
template <class T>
void Test(string name,T value,bool exist)
Defination
template<class T> void sample::Test(string name,T value,bool Exist)
Now,i am passing Color class object to fn Test,like this
Color c;
Test<Color>("name",c,true);
And Its Giving Linking error that
error LNK2019: unresolved external symbol "public: void __thiscall sample::Test<class color="">
Any Ideas?
Regards
Yogesh
|
|
|
|
|
Where did you put such statements?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I put these statements in my program.
I provide the overview of what i am Doing.
Regards
Yogesh
|
|
|
|
|
'my program' is a bit vague. Do you know, for instance, that template method implementations should go into header files (not into source files)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
(unless you are only going to use that template inside that one source file)
|
|
|
|
|
Good point.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I was putting separate in header and cpp files.
Now,i put its definition in header itself.No Errors.
Will u please Explain Why it is so ?
Thanks & Regards
Yogesh
|
|
|
|
|
|
Hi, good resource!
Cheers, AT
Cogito ergo sum
|
|
|
|
|
good morning
i'm using VC++ in visual studio 2010
in my code i made a dialog with edit controls and an associated ON_EN_CHANGE function
i noticed this function (the OnChangeXXX associated with ON_EN_CHANGE handler) is called before dialog is visualized and the following error "Debug Assertion Failed!" appares
i can avoid it using only using a flag cleared at initialization and setted at the end of OnInitDialog, checked at the begin of my OnChangeXXX funcions, like this
if (!m_xIsUsable) return;
to ignore the function if dialog is not yet displayed
is this the only way to avoid the problem?
thanks in advance and regards
|
|
|
|
|
Does any of your edit fields have a spin button with UDS_AUTOBUDDY/UDS_SETBUDDYINT style attached to it? I ran into a similar problem a few days ago and -at least i think- the edit change is triggered by the spin control when it attaches itself to the edit and sets its content and since this happens at creation time you get the message before your DoDataExchange has ran. I avoided this by simply checking the m_hWnd member of the CEdit to see if it has been attached to the dialog's control or not. Could this be your problem also?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
hi Code-o-mat
you are right. i use a spin button associated
so i understand why not all my edit controls suffer about this problem. it could be nice to understand why there is not a latch in message dispatcher to block these kind of messages before window displaying is not complete
thank you very much for your suggestion 
|
|
|
|
|
I supose they either didn't think of this case OR since it is relatively easy to overcome, they didn't bother... anyways, yourwelcome.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> If it doesn't matter, it's antimatter.<
|
|
|
|
|
Hi
I have an application Exe that call a COM dll.
I have to Load an other Win32 dll(named "Win32_dll" from this COM dll.
LoadLibrary(Win32_dll) fail always.
HINSTANCE hLib = ::LoadLibrary(_T(_DLL_NAME_));
always hLib = NULL;
- I put this dll in the same directory of COM dll BUT always fail.
- I put it in the directory of EXE and it success.
So problem is how to Load the Win32 dll from the COM dll attached to an other Exe application ?
|
|
|
|
|
If the library is not in one of the standard places that Windows checks, then your LoadLibrary() call needs to provide the full path.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
What does the GetLastError tell you? My guess would be something in the line of: file not found.
Easy test would be to place the win32_dll.dll in your debug dir. That way it should be able to find it.
Even a better way is to provide the full path to the dll and if you want to avoid any possible isse with that; make sure the path does not contain spaces.
Cheers, AT
Cogito ergo sum
|
|
|
|
|
hi all,
i am having a std:: map iterator like this
std::map<CString, std::map<DWORD, CString> > m_mpIter;
here i want to find a CString value can anybody help me to do this.
thanks.
|
|
|
|
|
The iterator must be defines as - std::map<CString, std::map<DWORD, CString> >::iterator m_mpIter;
You can then access the key using m_mpIter->first .
To access the value you do m_mpIter->Second .
Since the value is another map, you will need to iterate through that map too.
Here is a nested loop that can iterate through the entire collection -
for (auto i = map1.begin(); i != map1.end(); ++i)
{
i->first;
for (auto j = i->second.begin(); j != i->second.end(); ++j)
{
j->first;
j->second;
}
} I have assumed the map to be named as map1 .
Also, since I'm using the auto keyword, this will compile only in VS2010 or later versions.
If you're using older versions of Visual Studio you will need to replace the auto keyword with the following -
std::map<CString, std::map<DWORD, CString> >::iterator i;
std::map<DWORD, CString>::iterator j;
|
|
|
|
|
i am already use the for loop to chek all value of iteration.
is there no any method to find dirctly the value in iterator without using for loop to chk all value,
thanks.
|
|
|
|
|
Sure.
You can do something like (i + 2)->first; or (i + 2)->second; .
|
|
|
|