|
Hello all,
I have a derived CWnd control which I use as a container. I want the user to tab between child controls therefore I am setting the WS_EX_CONTROLPARENT. If I do that set, the application freezes as soon as the application loses focus... any idea why?
Thanks in advance!
Jerry
|
|
|
|
|
|
Hi,
Any API's in C++ or VC++ that will help me to fetch the configuration properties of the IIS. I'm looking for fetching the Root path and the Virtual directory path information.
Regards,
Mayur M
|
|
|
|
|
mayur8u wrote: the configuration properties of the IIS
"the IIS"? Really? There's only one installation of IIS in the entire universe? I'm pretty sure I have more than one right here in my own office, let me check... yes indeed I have two right here. Well given that reality I suppose we need some slightly more specific information from you in order to help. For the moment we will pretend that you not already realizing this, is a sign that you are attempting something beyond your current knowledge base. But hey, that never stops any of the hundreds of others we see copy/pasting their way around the internet.
|
|
|
|
|
Having a rough day, Mike?
and / or
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Hey a rose beer, I never had one yet! I'll have to get me one[^] now.
|
|
|
|
|
Hi Guys,
I need some helps,
I have a variable ver of Cstring Type
CString ver;
how would I print this ? and I want to compare it with a string with wchar_t*, its some think like
wchar_t* ver2;
can any body please suggest me how to do this. May be this is a silly question but I don't have much idea on CPP. .
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
Abhijit Jana wrote: I have a variable ver of Cstring Type
CString ver;
how would I print this ?
cout << ver; Abhijit Jana wrote: and I want to compare it with a string with wchar_t*, its some think like
wchar_t* ver2;
Have you tried:
if (ver == ver2)
...
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
David, Thanks for response. I found the problem. This C++ Exe is used to call my .net web service from client machine. So it was quite difficult to debug. But finally I have found the problem, it was with some return value. and solved .
Again thanks.
cheers,
Abhijit
CodeProject MVP
|
|
|
|
|
CString defined lots of constructors such as CString(LPCWSTR lpsz) & CString(LPCWSTR lpch, int nLength);
CString ver;
wchar_t* ver2;
...
CString ver3(ver2);
if(ver==ver3){
...
}else{
...
}
|
|
|
|
|
May i know how can i create a custom list control........
|
|
|
|
|
You should ask a bit more precisely...give some more details about what you want to do.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Are you referring to the LVS_OWNERDRAWFIXED style?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Yes [^].
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi all,
my requirement is there is a function which creates one thread and passes the data for further processing which looks like
void MyFunc(char *data)
{
CreateThread(NULL,0,build_data,(void *)data,0,NULL);
}
Now i want to modify the above code.
I want to introduce a queue class and want to create two threads so that 1st thread can invoke a function which writes the data to the queue and the 2nd thread reads the data from the queue. Please introduce mutex if required. Can you tell me how to implement the above in VC++.
Please help me on the above. Thanks
|
|
|
|
|
kr_ash wrote: ...1st thread can invoke a function which writes the data to the queue and the 2nd thread reads the data from the queue.
This sounds a bit like the producer/consumer problem.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi there.
I am writing a string into a .txt file, but I am getting an extra while space in between each char.
Please suggest me, why this is so.
For Eg. if I write Hello, it will be written as H e l l o.
Thanks
PanB
|
|
|
|
|
I'm going to put on my psychic hat...
You are not getting a space between letters, you are getting a NULL.
Your text in the compiler is a TCHAR, and that defaults to unicode these days.
You're looking at the text in notepad, and it's reading it as ascii...
Read:
http://www.codeproject.com/KB/string/cppstringguide1.aspx[^]
You will be a better person afterwards, and will no longer kick puppies for fun.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Well, welcome again in the CP's Memorable Quotes list [^].
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]
|
|
|
|
|
If your're passing string something like this, _T("Hai"), according to the unicode settings of project, the string will be treated as unicode characters which means two bytes per character. That's the reason for this issue.
CFile::Write will take any kind of inputs. If you've the string with you,
you can writes as file1.Write( "Hai", 3 ); or convert using WideCharToMultibyte API or W2A conversion macros and then write the file.
If you want to write and save the file as unicode text file, then you will have to add BOM characters before writing to file.
Check this article[^]
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
PankajB wrote: I am writing a string into a .txt file, but I am getting an extra while space in between each char.
Please suggest me, why this is so.
See here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hello,
ask to help me with 2 problems.
Access-database has password and open by
try
{
hr = m_pConnection->Open(_bstr_t (lpstrConnection), ...);
return hr == S_OK;
}
catch(_com_error &e)
{}
1) When database file has attribute "ReadOnly" catch takes place with NativeError=0xfffff88f and NumberError=80004005 ("Not a valid password").
But when ja reset attribute "ReadOnly", database is opened OK. Why error is detected for Readonly file?
2) How can I recognize that invalid password is in connection string? Which code will be in NativeError for any database type (not only Access)in this case?
Thanks
|
|
|
|
|
Grebeshkova wrote: 1) When database file has attribute "ReadOnly"...
Is it readonly at the OS level or at the application (i.e., Access) level?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi to everyone,
I am breaking my head to find a proper example how to use map of STL in mfc. But didnt get.
Could anyone please help me out with the same. Please give me the exact syntax to use them.
I want to create a map with 3 fields (like a table)
id, name, RegNo
thanks in advance
I am a beginner
|
|
|
|
|
I think a map is between one thing (key) and another thing (object). [*]
But you could package the name and regno in a structure together, then map between the id and otherstuffstruct...
Iain.
[*] someone will now say "but in boost..."
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|