Click here to Skip to main content
15,902,032 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: tab controls in vc++ Pin
ani_ikram11-Jul-08 23:11
ani_ikram11-Jul-08 23:11 
GeneralRe: tab controls in vc++ Pin
sudhir_Kumar11-Jul-08 23:28
sudhir_Kumar11-Jul-08 23:28 
GeneralRe: tab controls in vc++ Pin
tkondal12-Jul-08 9:39
tkondal12-Jul-08 9:39 
Questionpls help newbi MFC VC++ reading from MDB Pin
GPat2411-Jul-08 22:21
GPat2411-Jul-08 22:21 
QuestionHow can fix size of SDI type application? Pin
Le@rner11-Jul-08 20:23
Le@rner11-Jul-08 20:23 
AnswerRe: How can fix size of SDI type application? Pin
sudhir_Kumar11-Jul-08 23:02
sudhir_Kumar11-Jul-08 23:02 
AnswerRe: How can fix size of SDI type application? Pin
krmed12-Jul-08 3:28
krmed12-Jul-08 3:28 
QuestionPrint Preview on SDI splitter application. Pin
Le@rner11-Jul-08 19:07
Le@rner11-Jul-08 19:07 
QuestionUnhandled exception at 0x5d0f0892 in Demo.exe: 0xC0000094: Integer division by zero. Pin
Le@rner11-Jul-08 18:22
Le@rner11-Jul-08 18:22 
AnswerRe: Unhandled exception at 0x5d0f0892 in Demo.exe: 0xC0000094: Integer division by zero. Pin
Cedric Moonen11-Jul-08 22:51
Cedric Moonen11-Jul-08 22:51 
Questionc code for image scaling Pin
md shafaeat hossain11-Jul-08 18:21
md shafaeat hossain11-Jul-08 18:21 
AnswerRe: c code for image scaling Pin
Sameerkumar Namdeo11-Jul-08 18:59
Sameerkumar Namdeo11-Jul-08 18:59 
AnswerRe: c code for image scaling Pin
Ștefan-Mihai MOGA11-Jul-08 21:22
professionalȘtefan-Mihai MOGA11-Jul-08 21:22 
AnswerRe: c code for image scaling Pin
CPallini11-Jul-08 22:01
mveCPallini11-Jul-08 22:01 
QuestionWhich IPC mechanism should be used? Pin
Sameerkumar Namdeo11-Jul-08 18:06
Sameerkumar Namdeo11-Jul-08 18:06 
AnswerRe: Which IPC mechanism should be used? Pin
sudhir_Kumar11-Jul-08 19:52
sudhir_Kumar11-Jul-08 19:52 
GeneralRe: Which IPC mechanism should be used? Pin
Sameerkumar Namdeo11-Jul-08 20:05
Sameerkumar Namdeo11-Jul-08 20:05 
GeneralRe: Which IPC mechanism should be used? Pin
sudhir_Kumar11-Jul-08 20:55
sudhir_Kumar11-Jul-08 20:55 
AnswerRe: Which IPC mechanism should be used? Pin
Bram van Kampen12-Jul-08 14:35
Bram van Kampen12-Jul-08 14:35 
QuestionURLDownloadToCacheFile problem - possible workarounds? Pin
x87Bliss11-Jul-08 11:11
x87Bliss11-Jul-08 11:11 
My program needs to download a file off the internet to get some information needed to continue. It does not need to save the information, just needs to read it once for the next step.

I have tried
CString TempFile;
URLDownloadToCacheFile(NULL, _T("http://validurl/script.cfm?key=value"), TempFile.GetBufferSetLength(MAX_PATH), MAX_PATH, validcallback);


Once those lines run, TempFile gets filled with a valid path to a temporary file, but the file doesn't actually exist - therefore I can't open it. The following code is what I'm using now, and it works. But I don't like it because it has a hard-coded temporary filename (therefore multiple instances may conflict).

CString TempFile;
TempFile.GetEnvironmentVariable(_(T"TEMP"));
TempFile.Appened(_T("\\MyProg.tmp"));
URLDownloadToFile(NULL, _T("sameurlasabove"), TempFile, validcallback);


After those lines run, the file is created and contains the needed information. But again, it uses a hardcoded temp file, therefore multiple instances cannot run.

So now for the questions:
First of all, is URLDownloadToCacheFile failing because it's a text file generated by a script, and not a binary data file (like a jpg), therefore it doesn't cache it?

Second, what is more practical in this situation. Would you implement code to generate a "random" temporary filename that's not in use? Or should I write code that can read the file right off the internet without saving it to disk first? I don't want to shoot a fly with a cannon, but I'm not sure which is the cannon.
QuestionSECURITY_ATTRIBUTES in threading Pin
emmmatty111-Jul-08 8:03
emmmatty111-Jul-08 8:03 
AnswerRe: SECURITY_ATTRIBUTES in threading Pin
Peter Weyzen11-Jul-08 13:56
Peter Weyzen11-Jul-08 13:56 
AnswerRe: SECURITY_ATTRIBUTES in threading Pin
zildjohn0111-Jul-08 14:14
zildjohn0111-Jul-08 14:14 
QuestionCCheckListBox in release mode, Windows XP in Windows classic theme Pin
tsvdevteam11-Jul-08 5:31
tsvdevteam11-Jul-08 5:31 
Joke[OT] Re: CCheckListBox in release mode, Windows XP in Windows classic theme Pin
David Crow11-Jul-08 6:08
David Crow11-Jul-08 6:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.