|
1) I want to programatically download a file from http server. Is there any API available or any other method/article you know ????
2) I want to resume the download if not completed successfully in previous attempt! Any idea about this ???
|
|
|
|
|
|
I have a CFormView. The border for the entire program is ugly. How can I get rid of the thick, default border for a CFormView and just make it a thin
border? I can make the individual items of the CFormView thin border, but that doesn't effect the overall border of the program. Please any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
In the dialog resources for the "Border" box, select None (WS_BORDER off). You can also add/remove other window styles by calling CWnd::ModifyStyle() in the overridden CMyFormView::InitialUpdate(). Also, CWnd::ModifyStyleEx() can give you access to extra styles not found in the other one...
"If at any time I announce that a nation or kingdom is to be uprooted, torn down and destroyed, and if that nation I warned repents of its evil, then I will relent and not inflict on it the disaster I had planned. And if at another time I announce that a nation or kingdom is to be built up and planted, and if it does evil in my sight and does not obey me, then I will reconsider the good I had intended to do for it." -- Jeremiah 18:7-10 (God, commenting on the value of the United Nations)
|
|
|
|
|
I will usually put this function call in the CFormView derived class's OnInitialUpdate:
ModifyStyleEx( WS_EX_CLIENTEDGE, 0, SWP_DRAWFRAME );
This removes the border. You also may want to override the WM_SIZE (OnSize) handler, and comment out the call to the CFormView::OnSize because otherwise, if you size it too small, you will get scrollbars.
Chris Richardson
|
|
|
|
|
Hello world...
I can't executed 2 identicals applications (construct with VC++ 6.0) using a sharable MFC DLL (construct with VC++ 6.0 too)...
Only the file's name of those applications is different.
What I've missed???
The second executable simply couldn't opened. But the first well and works...
Thanks in advance
Hello World!!!
from Raphaël
|
|
|
|
|
I can think of a few possibilities (none of which will be right of course!)
Maybe one of the executables was debug compiled, and is looking for MFC42D.dll which may not exist on the system you are running on.
You may have MFC42.dll in the directory of one exe rather than in the path, so only one can find it.
You may have other dependencies than mfc42.dll and this is where the difference lies. You can use
the DEPENDS tool on yout executable to find all the files they are looking for and find and differences.
I hope these help.
Iain.
|
|
|
|
|
Hi,
As you known every 8-bit byte of data in a CD frame is converted to a 14-bit word using EFM before it is written. This ensures that the data spiral has no pits smaller than 3 bits or larger than 11 bits in length. But if you have an EFM word that ends in a "1", and the very next EFM word begins with a "1"? This breaks the "always more than two consecutive zeros" rule, and results in a pit smaller than 3 bits. This is why 3 merge bits are always inserted between EFM encoded words on the CD.
These 3 merge bits can be anything, but how to select them? Is there a optimal or near-optimal algorithm for doing this?
This can be seen an optimization problem with two constrains:
(1) The data spiral has no pits smaller than 3 bits or larger than 11 bits in length after 3 bits '0' or '1' have been added.
(2) The numbers of '0' and '1' should be about 50% in general.
Did you have any idear about this? or some related materials?
Thanks in advance!
chen
|
|
|
|
|
1. This have nothing to do with Visual C++.
2. This info is AFAIK of no use unless you develop firmware for CD-ROM drives, in case you should already know this.
3. Have you tried to do your own Googling? Try the following link (which I conincidentally got from googling). I think it should explain it.
http://www.ee.washington.edu/conselec/CE/kuhn/cdaudio2/95x7.htm
|
|
|
|
|
Does anybody know why Visual C++ isn´t recognizing correctly the altered files, so it can compile only these files? I didn´t change anything in the projects settings. And if I build the project and try to execute it, a dialog appears with a list of files (that I didn´t altered), asking to compile it.
That´s really annoying...
|
|
|
|
|
Check your time and date to make sure that its after the last save time for the files in question.
If the generated .obj file has a date before the current .cpp source file, it gets rebuilt.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
I am trying to rebuild a project after removing all explicit paths in the resources. At one point I have the following in a .rc file:
IDI_LD_OPENICON ICON DISCARDABLE "res\\ico00001.ico"
IDI_LD_OPENMULTI ICON DISCARDABLE "res\\ico00002.ico"
IDI_LD_POLYFIT ICON DISCARDABLE "res\\ico00003.ico"
IDI_LD_TRAY ICON DISCARDABLE "res\\ico00004.ico"
IDI_LD_OTHER ICON DISCARDABLE "res\\ico00005.ico"
Now all the icon files exist, are in the same directory, but the compiler cannot find ico00004.ico and ico00005.ico and always complains. It can find the other files! I have checked the filenames, the files exist. I have tried renaming them and changing what file is included. It made 1 work, but these last 2 refuse to be found by the resource compiler!
Its driving me nuts!
Anyone had a similar problem and know a fix for it?
BTW, if I put in the absolute path to the file, it finds it, but thats what I am trying to avoid
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Never mind, it turned out to be looking in a different directory which had icon files 1 - 3, so I found 1 after renaming one and the others were still being missed. I had to use a very qualified path without a drive to find the correct files.
Roger Allen
Sonork 100.10016
I think I need a new quote, I am on the prowl, so look out for a soft cute furry looking animal, which is really a Hippo in disguise. Its probably me.
|
|
|
|
|
Hi,
Does anyone know how GetDIBits() and SetDIBits() are implemented ?
Windows CE does not support these procedures.
|
|
|
|
|
Is there any limit on the number of devices we can open using mciSendCommand ?
Problem:
Our application demands to open multiple devices to play Avi files. Before playing, we are opening multiple devices using mciSendCommand and MCI_OPEN as command parameters. Basically, we have a problem when we open more than 25 devices,its giving error message "There is no driver installed on your system".
But if we open less than 25 devices and try playing them, there is no problem.
We want to know:
Is there any limitation on the number of mci devices we can open with in an application.
|
|
|
|
|
Hello,
I want to ask how to generate a random number which is lie between 0 and n, and they are evenly distributed (i.e. all number have the same probability).
Calvin
thx!!!
|
|
|
|
|
Why dont u use :
srand ( time ( NULL ) ) ;
int RandomNumber = rand () % (n + 1) ;
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
oops, misread the question.
Michel
It is a lovely language, but it takes a very long time to say anything in it, because we do not say anything in it, unless it is worth taking a very long time to say, and to listen to.
- TreeBeard
|
|
|
|
|
For a reasonably good random number generator you might want to have a look at the source for dev/random from the Linux sources (rand() from e.g the MS CRT will get you nowhere near randomness).
|
|
|
|
|
Hi,
In the below code I've copied the value of a string variable into "store" (which is Char(50).
When I print the value of store, it crashes!!!
please can someone tell me how to store from string to char and print the value of char!!
thanks,
John
Code:
======================================================================
strcpy(store,ret.c_str());
printf("%s",store);
======================================================================
|
|
|
|
|
what u did is correct, but printf crashes if store == null, check for this
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
In that case, the strcpy would fail too, surely?
Steve S
[This signature space available for rent]
|
|
|
|
|
oups yes, that's what i meant
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Does anybody know, where can I find any sample of http download resume?
Thank You
Jirka
|
|
|
|
|
HTTP doesn't really do this. The only possible mechanism for it's implementation is using HTTP/1.1 range header... http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.35
You are probably thinking of FTP resume though.
Signature space for rent. Apply by email to....
|
|
|
|