|
I realy need help,
I Using a MFC app and I need to see if something is downloading from internet. I now you need to use urldownloadtofile but I don't now how! Is there anyone that have some code that I can use or something like it?...
\Please help me....
|
|
|
|
|
Visiting the following sites may give u an idea.
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/reference/functions/urldownloadtofile.asp
http://codeproject.com/internet/urlfile.asp
http://codeproject.com/internet/urldownload.asp
I hope this helps u
Dipeka.A.J
|
|
|
|
|
The following code exists in identical form in two projects. (A dialog box & its logic were created in a test framework, then moved over to the final project.) In one project, this works fine, in the second I get "Unhandled exception at 0x763b1fda in AtasMod.exe: 0xC00000FD: Stack overflow."
void
CSpecialEventDlg::OnBnClickedSpecialEventBrowse()
{
CFileDialog oDlg(true, ".wav", 0,
OFN_HIDEREADONLY,
"Sound Files (*.wav)|*.wav||");
// taking the next line out changes nothing
oDlg.m_pOFN->lpstrTitle = "Find Sound File";
if (oDlg.DoModal() == IDOK)
{
// do stuff
}
}
I've traced the code into MFC, and the crash is occurring in dlgfile.cpp:
OPENFILENAME& CFileDialog::GetOFN()
{
return *m_pOFN; // this line crashes
}
Am I doing something wrong? Is there some way to avoid the problem?
Thanks, all,
--chesky
|
|
|
|
|
Use
oDlg.m_ofn.lpstrTitle = "Find Sound File";
I don't know what the pOFN Pointer you are using does exactly...
|
|
|
|
|
> Use
> oDlg.m_ofn.lpstrTitle = "Find Sound File";
> I don't know what the pOFN Pointer you are using does exactly...
I'll try that, but as I wrote earlier, taking the entire line out had no effect - it worked the same in one project, and crashed the same in the other.
|
|
|
|
|
>> Use
>> oDlg.m_ofn.lpstrTitle = "Find Sound File";
>> I don't know what the pOFN Pointer you are using
>> does exactly...
>>
> I'll try that, but as I wrote earlier, taking the
> entire line out had no effect - it worked the same
> in one project, and crashed the same in the other.
>
Tried it, changed nothing - does anyone have any ideas?
--chesky
|
|
|
|
|
Is there a way to get the AfxMessageBox to display a title other then the title of the exe? The MessageBox can do it of curse but I was wondering about the mfc one.
Thanks,
sb
|
|
|
|
|
Have you stepped into the AfxMessageBox() code to see how the caption text is obtained? That's the key to your question.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thanks. I havent explored that. I will.
sb
|
|
|
|
|
Add/modify the string resource (id = AFX_IDS_APP_TITLE ) in your string table. AfxMessageBox() will use the value of that string when it displays a message box.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I am trying to create an application which serves as a general form to accept input. The form contains a button, that when pushed, outputs data as well as generates a popup window displaying a graph of the input data. I have created the input form but need help implementing the popup window with the graph.
|
|
|
|
|
look around here at CP, there are a couple of cool graph controls ...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Is there a way to delete a file to the recycle bin? DeleteFile simply deletes the file. Do I have to perform a MoveFile?? In that case, what is the macro name for the recycle bin?? For instance, move to system directory I think would be MoveFile("C:\\myfile.txt", //SYSTEM)???
|
|
|
|
|
You'll want to use SHFileOperation() here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Shoot. I had hoped to avoid using that one. Thanks.
|
|
|
|
|
Could someone send me a sample program that loads font from a file (not already installed in Windows) and write text using that font? Also, to dump the displayed text in the loaded font to an image file (gif,jpg, bmp)...
Thanks
jpxavier@yahoo.com
|
|
|
|
|
the core functions you'll need are CreateScalableFontResource and AddFontResource.
Software | Cleek
|
|
|
|
|
I have string "0xFF070FF07" and I need to extract the int64 from it. I did try breaking up the string into high and lo parts and then bitshifting but I dont get the right value.
<pre>
unsigned __int64 alg_mask;
char *pHi,*pLo;
pLo = pHi + strlen(pHi) - 8;
unsigned int lo = strtoul(pLo, 0, 16);
*pLo = 0;
alg_mask = strtoul(pHi, 0 , 16);
alg_mask << 32;
alg_mask += lo;</pre>
How do I get my value out?
Thanks,
sb
|
|
|
|
|
What about StrToInt64Ex() ? Rolling your own is also very easy.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
This is more of an implementation question . I figured that the Gurus here can help me out .
I m working on an App thats like a diagnostic tool in VC++(SDI app) . There are different screens(windows shown) that have a variety of information that could be packaged as a summary or report or like a log .
My idea of implementing this was like :
All the screens (Windows) derive from a CDataLog class that has a method called :
AddToLog(string data)
All this func does is dump data to temporary text file .
When the user wants to see the Log this file is read back and displayed in the view . Is this a good methodology ? I plan to delete the file automatically once I ve drawn it on the View . How can Programmatically do this ? Plus for the File I/o does using MFC classes have an advantage over my intended raw C implementation (using FILE * , fopen , fprintf etc )
|
|
|
|
|
Well,
We know that services are not like a process, yuo can't just kill them.
So, how can we shut down a service programmatically ?
Thanks,
Shay
|
|
|
|
|
"net stop <servicename>" should would. You can use ShellExecute for this purpose.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Use the ControlService function.
|
|
|
|
|
Great answer, but....
Why it is not compiling ?
I tried the simple exmaple from MSDN and it will show SC_HANDLE as error.
Do I need to compile differently ?
Shay
|
|
|
|