|
There's little to add to your example, but in case you're interested check Eckel's Thinking in C++, ch 12, "Constructor conversion"[^]. It also says explains how to use explicit to avoid this kind of conversions.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks, Joaquín buddie!
George
|
|
|
|
|
Hello @all,
the following problem i 've been faced:
Assume the following tables:
tblA
ID : index
Name : String
Protected : boolean
Simpson Homer, Simpson Marge and Simpson Bart were stored.
I use a query somthing like this:
SELECT ID FROM tblA WHERE tblA.Name LIKE 'S*' AND tblA.Protected=0
This produce the expected result on win2k and win98SE, but if I use the following statement:
SELECT ID FROM tblA WHERE tblA.Name LIKE 'Sim*' AND tblA.Protected=0
the result is null on win98SE. On win2k the result has all simpson id's.
Now I 've updated the system. I insatalled MDAC 2.6, the Jet SP3 and JetSP6, but the problem persist.
Does anyone known, how I can solve.
Thank you.
|
|
|
|
|
Can this be due to capitals ? is
SELECT ID FROM tblA WHERE tblA.Name LIKE 'SIM*' AND tblA.Protected=0
working as expected ?
~RaGE();
|
|
|
|
|
Problem: I need to load a whole HTML page(including images and sounds) from memory to MSHTML. Samples, that I have found in MSDN Library (and on this site), only describes how to load HTML text.
Sorry for my english...
|
|
|
|
|
Thanks to all
I solved the problem.
Sorry for my english...
|
|
|
|
|
Hi,all
I have to apply stress test to my aplication.
For this I have to write a programme to Block the RAM.
is it Possible.
my intension is...
suppose i have a 256MB RAM in my system.while my application(test) is in running i have to consume predefined amount of MB using another application.
please guide me...
thanks in advance.
regards
anju
anju
|
|
|
|
|
|
Hi,
can anyone give me a simple piece of code in vc++ that presents a string in local language?
|
|
|
|
|
Localized strings should be contained in a project's .RC file. That said, you would simply use CString::LoadString() to extract the string resource.
|
|
|
|
|
Thank you david for help.
|
|
|
|
|
This complete newbie has been tasked with writing a C/C++ service that performs standard SQL functions on MS SQL 2000 and sends and retrieves data from Active Server Pages. I also needs to parse a great number of text files for specific data and populate a SQL table with the results. Problem is that I don't know where to start. I have limited programming experience in SQL and C but am willing to learn anything to get this job done. I am going to use ADO for the SQL connection as that looks to be a great fit. Need help getting started with a C/C++ service that does the following:
1) Searches a vast number of text files for an string, populates a SQL table with a list of matching files, copies a selected file to a local temp directory and inserts that file into a MS SQL table for editing purposes and storage.
2) Takes the search criteria from an ASP page and formats the text into something to search for.
3) Takes the search results and displays them on the Active Server Page.
If anybody has links to sample code or articles that would help, I would be greatly appreciative!
I have searched CodeProject, MSDN and Google an found bits and pieces of what I need.
Since I am learning most of this for the first time, ANY help is a big help...
Thanks in advance!!!
|
|
|
|
|
You can information about downloading and parsing HTML (.asp pages) in this article.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I haven't been able to find anything on this? Is there some reason it's not maybe implemented? Does the output file size increase when using 24 bit RLE???
I've found one for RLE8, but not RLE 24 and i'm wondering why...?
Thanks
"Two wrongs don't make a right, but three lefts do!" - Alex Barylski
|
|
|
|
|
Because the odds of getting runs of pixels exactly the same color are relatively small.
|
|
|
|
|
|
I'm very agrivated right now. I've created a worker thread that reads a file.. thats working perfectly. It parses and places all the data into an struct CArray. After that it checks for incomplete data. This is where things get screwy. It downloads a file perfectly (the function) in the thread with out crashing.
BUT
when I try to send the string that contains the missing data's URL it crashes. (See code)
CString CBookmarks::GetAllKeywords(LPVOID pParam)
{
//Declare Varables
//Date: 4 8 03
CBookmarks* pMain = static_cast<cbookmarks*>(pParam);
CCriticalSection m_cSection;
CString m_strAllKeywords;
int nSize=pMain->m_structBookmarks.GetUpperBound();
//
//DisplayItems
for (int i=0; i<=nSize;i++)
{
m_cSection.Lock();
m_strAllKeywords+=DownloadFile(pMain->m_structBookmarks[i].m_strURL);
m_cSection.Unlock();
m_strAllKeywords+=", "+pMain->m_structBookmarks.GetAt(i).m_strKeyword;
}
return m_strAllKeywords;
}
This crashes even when the debugger is running.
It reads the keywords from the first entry and then craps out when it repeats. The data in the next string is fine.
Even a TRY, CATCH_ALL doesn't catch it.
HELP!
-Steven
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
Your locking looks odd. You have a lock declared as a local variable. This means that you aren't really locking anything since that routine has its own private lock. Also, if m_structBookmakrs is what you are trying to lock, then the GetUpperBound call isn't protected and could cause problems. That access should be locked too.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
I did that and it still gives me a "runtime error" when I do that. Also when I try and debug it it doesn't give any information. When I don't use the loop varible i as the array number in the DownloadFiles function it returns the information perfecty, no matter how many times it runs in the loop.
-Steven
CPACodeProjectAddict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
Move m_cSection.Lock() and m_cSection.Unlock() outside the loop.
Kuphryn
|
|
|
|
|
That didn't help. It still returned a Runtime Error.
-Steven
CPACodeProjectAddict
By reading this message you are held fully responsible for any of the mispelln's or grammer, issues, found on, codeproject.com.
For those who were wondering, actual (Linux) Penguins were harmed in creating this message.
|
|
|
|
|
Hi everyone,
I feel stupid, can anyone tell me the code for putting the check mark on a menu?
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
CWnd::CheckMenu or ::CheckMenu sound like they could be useful...
There are 10 kinds of people - those that get binary and those that don't.
|
|
|
|
|
Hmmm...
Well, I just found the UpdateUI function, but it doesn't seem to do what it claims. I said pCmdUI->SetCheck(), but with no success. Didn't remove a check, or make one.
I tried something using the info that you gave me, but also with no success: GetDlgItem(IDM_SEND)->CheckMenu()... The compiler also didn't like this. Apparently, CheckMenu isn't a member of CWnd, which sounds ridiculus (due to the info you gave me).
Any other ideas?
If you have a problem with my spelling, just remember that's not my fault. I (as well as everyone else who learned to spell after 1976) blame it on Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
Selevercin wrote:
CheckMenu isn't a member of CWnd
CMenu::CheckMenu is probably what I meant to say...
Are you sure your UpdateUI handler is actually being called? If you have a splitter window or something similar, it won't get called if the window is not focused.
You might also need to do something like this:
CMenu *pMenu = GetMenu();<br />
CMenu *pSubMenu = pMenu->GetSubMenu( ... );<br />
pSubMenu->CheckMenuItem( ... );
Look at the help for GetMenu, GetSubMenu and CheckMenuItem
There are 10 kinds of people - those that get binary and those that don't.
|
|
|
|