|
A method defined in the web service that will return a structure including an array memebers.
|
|
|
|
|
yu-jian wrote: A method defined in the web service that will return a structure including an array memebers.
What exactly does that tell us?
|
|
|
|
|
If the methods are in your code, you should know why they are returning 4 and 12.
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
|
Hi Developers,
I want to show the text "Add Photo" in a picture control, initially ( if no photo has attached to it ).
Can anyone told me about it.
Thanks in Advance.
Amrit Agrawal
|
|
|
|
|
The simplest thing that comes to my mind is: make a picture that shows your text and place that into your picture control (loaded from resource e.g.). Wouldn't that work for you?
> 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.<
|
|
|
|
|
The first thing to explain is what you mean by a picture control. Is this something you created yourself, a third party class or an MFC class?
|
|
|
|
|
Yes this is a control created by myself.
|
|
|
|
|
Amrit Agr wrote: Yes this is a control created by myself.
So how do you expect us to debug it for you without any idea of how it works?
|
|
|
|
|
DrawText[^]?
> 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.<
|
|
|
|
|
1. Respond to WM_SETTEXT in your control's WindowProcedure, create copy of string
2. When called upon to redraw, the control should check to see if an image has been assigned
3. If so, display image
- If not, use DrawText or TextOut to display the text received via the WM_SETTEXT message.
|
|
|
|
|
I have a strange problem : I succesfully download a file from a server with follow code :
BOOL CUpdateThread::DownloadFile(CString sAddress, CStringArray& saResult)
{
CString sTemp;
BOOL bRet = FALSE;
CInternetSession ISession;
CInternetFile* pIFile = NULL;
try
{
pIFile = (CInternetFile*)ISession.OpenURL(sAddress);
while(pIFile->ReadString(sTemp))saResult.Add(sTemp);
bRet = TRUE;
}
catch(CInternetException* pInternetException)
{
pInternetException->GetErrorMessage(m_pMessage->GetBuffer(255),255);
m_pMessage->ReleaseBuffer();
pInternetException->Delete();
}
catch(CException* pException)
{
pException->GetErrorMessage(m_pMessage->GetBuffer(255),255);
m_pMessage->ReleaseBuffer();
pException->Delete();
}
if(pIFile)
{
pIFile->Close();
delete pIFile;
}
ISession.Close();
return bRet;
}
let say that with this code, I download from an server a text file, test.txt ( a list of words, nothing special ). I change the content of the text file to server, I download again the same text file, test.txt, but content is the same( doesn't have changes ). I stop the application, start again, and if I download again the text file, test.txt, the contain is now changed ... why ?
|
|
|
|
|
20 seconds with Google finds information about using and/or disabling caching of data locally and in the server/gateways.
dwFlags
The flags describing how to handle this connection. See Remarks for more information about the valid flags. The valid flags are:
INTERNET_FLAG_TRANSFER_ASCII The default. Transfer the file as ASCII text.
INTERNET_FLAG_TRANSFER_BINARY Transfer the file as a binary file.
INTERNET_FLAG_RELOAD Get the data from the wire even if it is locally cached.
INTERNET_FLAG_DONT_CACHE Do not cache the data, either locally or in any gateways.
INTERNET_FLAG_SECURE This flag is applicable to HTTP requests only. It requests secure transactions on the wire with Secure Sockets Layer or PCT.
INTERNET_OPEN_FLAG_USE_EXISTING_CONNECT If possible, reuse the existing connections to the server for new requests generated by OpenUrl instead of creating a new session for each connection request.
INTERNET_FLAG_PASSIVE Used for an FTP site. Uses passive FTP semantics. Used with CInternetConnection of OpenURL
|
|
|
|
|
Thank you for your response, I will try that.
Chuck O'Toole wrote: 20 seconds with Google finds information about ... yes, I agree if you know what you search ...
Thanks again. Best wishes !
|
|
|
|
|
it has to be something silly. Given the code snippet below, it is part of some code that determines if m_sLogFilename is valid. So, in my testing, I deliberately pass in a crazy name say "M:/no/way/my.log. This device and directory do not exist, so I expect traceFile.Open to throw an exception.
It does not. In fact, the code passes on to the write operation when it completely craters with an access violation.
Why is the .open succeeding?
CStdioFile traceFile;
try
{
traceFile.Open(m_sLogFilename, CFile::modeCreate |
CFile::modeNoTruncate | CFile::modeWrite | CFile::shareDenyNone |
CFile::typeText);
}
catch (CFileException* pEx)
{
int m_cause = pEx->m_cause;
int m_IOsError = pEx->m_lOsError;
FileExceptionToText(m_cause);
pEx->Delete();
return false;
}
try
{
traceFile.Write("Dummy text", 10);
}
catch (CFileException* pEx)
{
int m_cause = pEx->m_cause;
int m_IOsError = pEx->m_lOsError;
FileExceptionToText(m_cause);
pEx->Delete();
return false;
}
traceFile.Close();
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
According to MSDN[^]: "While the CFile constructor will throw an exception in an error condition, Open will return FALSE for error conditions."
(CStdioFile inherits Open from CFile.)
|
|
|
|
|
Amazing. I have examples from MSDN that are useless in this case.
Thanks for pointing it out.
I just updated the code with the "other" way of doing things, and it
catches the unknown file.
Charlie Gilley
<italic>You're going to tell me what I want to know, or I'm going to beat you to death in your own house.
"Where liberty dwells, there is my country." B. Franklin, 1783
“They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
|
|
|
|
|
Hi!
What are the skills needed for a C++ application programmer to work in Embedded Systems Domain? What are the things to learn to get thorugh an Embedded Sytems interview?
|
|
|
|
|
This is not really a C++ question, try the "Work & Training Issues" forum.
|
|
|
|
|
pix_programmer wrote: What are the skills needed for a C++ application programmer to work in Embedded Systems Domain?
Forgetting C++ , learning C .
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]
|
|
|
|
|
Sir!
Give me some inputs seriously. It would be very helpful. You really told me
to switch to C Programming?
|
|
|
|
|
pix_programmer wrote: You really told me
to switch to C Programming?
Probably you'll have to.
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]
|
|
|
|
|
Ok. Thanks for the reply. Apart from "C", if I've to learn
fundamental concepts of Embedded Systems(like how memory is allocated and
handled),Can you provide some online reference?
|
|
|
|
|
It really depends on the particular embedded system you're dealing with.
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]
|
|
|
|
|
Hi
We have an accounting software (almost 50,000 lines) with MFC7 and our database is MSAccess (using CRecordset).
Now we must use it in network and supprting multi user is important.
We wanna know how we can test MySQL speed with ODBC driver.
Because we have used CRecordset we can move to MySQL with ODBC very easy and it takes a little time.
But we created a test project for using MySQL and it's ODBC driver. Just one time it worked fast (30ms) to read a record from a table and about 20 all other times it took too mush time(500ms).
Can anyone give us an advice or trick or some link to improve or test the MySQL ODBC driver?
Best Regrads
www.logicsims.ir
|
|
|
|