|
In an MFC project, want to set the length of the printed page 10cm.
bijumon mathew
kattappana
|
|
|
|
|
|
Hi,
All how can I use URLDownloadToCacheFile() or URLDownloadToFile() to perform a resumable download of files from http?
For example I am downloading a 500mb zip file then at 200mb i got disconnected, Can i reconnect and start at 200mb? Can I use this without MFC?
Thanks,
Jayjay
|
|
|
|
|
It dependes to that site that does it support resume or no?
|
|
|
|
|
Hi Hamid,
It is just an http site, I will not use an FTP site
Thanks
|
|
|
|
|
FTP supports the RETRIEVE and REST commands. I do not know of an HTTP equivalent.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
Where does that article talk about resuming a download?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Request you to please help me get the following date and time format...
2007.11.21 16:36:46.094+00:00
Also how do I get the milliseconds.
Please give a syntax for this.
THANKS
|
|
|
|
|
As you can see the format is (2007.11.21 16:36:46.094+00:00)
year 4 digit . month 2 digit . day 2 digit [space one] hour:minute:second.milisecond +/-GTM time (based on London)
if this is a string than you have to get substring of milisecond place
|
|
|
|
|
How do I do that. Can you post the syntax please?
THANKS
|
|
|
|
|
what is your variable type?
like char*, CString, LPTSTR or anyting else?
|
|
|
|
|
|
pl_kode wrote: Request you to please help me get the following date and time format...
2007.11.21 16:36:46.094+00:00
Have you looked at strftime() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have a simple application (SDI) where I am drawing almost 200000 points on the view (inserted code to draw point in OnDraw function of view class). It is taking several seconds to draw to points on client area. In mean time if I double clicked on the client area the points are getting drawn again. And if I keep doing the same (double clicking on the client area) points are getting drawn again and again.
Please any one can explain this..?
Thanks in advanced
Sandip
|
|
|
|
|
Hi Sandip,
The think problem is that when you double click on the client area the client is drawing. So when a draw is needed the system calls the onDraw function. that is why the points are getting drawn when you double click on the client area. Have you written any code for handling the dbl click???. try using a thread to plot the points you will get a faster drawing.
thanks
Nitheesh
|
|
|
|
|
Hi Niteesh,
Thanks for your reply.
I have not written any code dbl click handler.
Thanks
Sandipan
Sandip
|
|
|
|
|
Hi Sandip,
try OnEraseBkGnd on the CView.
thanks
Nitheesh
|
|
|
|
|
Mouse clicks on a window shouldn't cause a repaint unless you've got code somewhere
causing the window to be invalidated.
How do you know the points are being drawn again? Does the background get "erased"?
You shouldn't be tying up your UI thread for "several seconds".
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
<br />
void CMyView::OnInitialUpdate()<br />
{<br />
CFormView::OnInitialUpdate();<br />
GetParentFrame()->RecalcLayout();<br />
ResizeParentToFit();<br />
<br />
RECT rect;<br />
GetWindowRect(&rect);
}<br />
<br />
<br />
void CMyView::OnBnClickedBtnTest()<br />
{<br />
<br />
RECT rect;<br />
GetWindowRect(&rect);
}<br />
After OnInitialUpdate() until I clicked test button(run OnBnClickedBtnTest() ), nothing to do.
|
|
|
|
|
I am not sure but maybe when you get the rectangle in button code, it gives the button's rectange.
so plz check if your button's top is 30. if it is 30 then you need to find a way to get the view's rectangle
|
|
|
|
|
Hi,
The MSDN says that
"The GetWindowRect function retrieves the dimensions of the bounding rectangle of the specified window. The dimensions are given in screen coordinates that are relative to the upper-left corner of the screen."
So may be(am not sure) the window is created (0,0) as top left. Then it is moved to new Co Ordinates When it is displayed. that is why you are getting different co ordinates. My suggestion is that no need to bother about this co ordinates u just use rect. top, rect.left etc. so that your drawing or anything will positioned based on the parent window.
thanks
Nitheesh
|
|
|
|
|
i need to show one triangle in the display area and it is moving forward. so I use loop to draw the same trianle in the new location. but i need to delete the previous triangle while i m drawing the new one in new location.
plese help me to solve this.
|
|
|
|
|
XOR the old triangle bits. it will clear the area.
first XOR the same triangle with the one you want to delete
after that draw a new one
|
|
|
|
|
Are you sure XOR will retain the background if i didn't first draw the triangle in XOR (I draw the triangle in say RED ?)
|
|
|
|