|
Thanks and yes, that makes sence..
|
|
|
|
|
... so this is what I need : I want to know last write time for a file, let's say, for example, "http://www.website.com/Index.htm" ... I tried with CFileFind but I get no results ... so, if anyone can help me with some sample code ????
10x, Cretze
|
|
|
|
|
telnet www.website.com 80
Trying ##.##.##.##.##...
Connected to website.com.
Escape character is '^]'.
GET /index.htm HTTP/1.1
Host: BAB
HTTP/1.1 200 OK
Date: Thu, 18 Apr 2002 18:12:13 GMT
Server: Apache/1.3.23
Last-Modified: Fri, 14 Jul 2000 05:58:20 GMT
ETag: "2c6a3a-cc7-396eabfc"
Accept-Ranges: bytes
Content-Length: 3271
Content-Type: text/html
Note the Last-Modified date. That's the date of the file unless the file you are trying to access is a script in which case there isn't a Last-Modified header in the response.
Todd Smith
|
|
|
|
|
Does anybody know how to convert CString to COleDateTime?
Nope
|
|
|
|
|
If your CString contains a value in a valid date-time format you can do this...
CString strSomeString
COleDateTime dtSomeDate;
strSomeString = '[some valid date format]';
dtSomeDate.ParseDateTime(strSomeString);
|
|
|
|
|
Hi all,
I have a dll which I would like to load from myapp.exe. Currently I'm doing this through the use of LoadLibrary. However, this causes the dll to be loaded each time myapp.exe starts. Is there a way to leave the dll in memory after it has been loaded the first time...? Well, maybe I could ignore freing it with FreeLibrary when myapp.exe closes but how can I detect if the library is loaded so that I don't load it again next time myapp.exe is executed?
Can I load a dll when the computer starts up? So that it is always in memory? But how then can I get hold of the functions contained withing the dll from myapp.exe now that myapp.exe doesn't have a handle to the loaded module?
Lots of questions, dig in!
Thx,
/Tommy
|
|
|
|
|
In Win32 when you load a dll the read-only code section is shared through all processes that uses that particular dll, if you omit the FreeLibray call it should allready be loaded (ok, i am actually not 100% sure about that ).
Read/write sections however belongs to the individual processes and are not shared.
Tommy Svensson wrote:
how can I detect if the library is loaded so that I don't load it again next time myapp.exe is executed?
You can say that this is what LoadLibrary actually does for you.
Jan
"It could have been worse, it could have been ME!"
|
|
|
|
|
No, this can't be done unless you have a process that loads the library and does not exit.
As it should, WIN32 will unload a DLL used by a process when the process exits.
Why do you need your DLL to remain in memory?
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Hi,
I want to have margins like MSWord in my CView, i.e there
should be Grey area around the document , in which we cannot
type anything.
Can someone tell me how it can be done.
Thanks
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
How about
CBrush* pBrush = CDC::GetHalftoneBrush();
CBrush* pBrushOld = pDC->SelectObject(pBrush);
CRect rc;
GetClientRect(&rc);
pDC->PatBlt(rc.left, rc.top, rc.Width(), rc.Height(), PATCOPY);
pDC->SelectObject(pBrushOld); in your view's OnEraseBkGnd()?
|
|
|
|
|
Hi,
Thanks for the Reply,
Actually how it should be is ,
The user has to be restricted to part of CView, he cannot type
anything in the margin.
Example MSWord, or Print Preview
Thanks
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
The easisest way to make this work would be to overide your frame class and position the view X pixels to the left of the frame left. Then, in your frame class (OnPaint), paint the left area the color your want.
In its simplest form it would look something like:
BOOL CMyFrame::OnCreateClient(bla.bla.bla)
{
if (!CBaseFrameClass::OnCreateClient(bla.bla.bla))
return FALSE;
PostMessage(WM_SIZE);
}
BOOL CMyFrame::OnSize(bla.bla.bla)
{
if (m_pViewActive)
{
CRect ClientRect;
GetClientRect(ClientRect);
m_pViewActive->SetWindowPos(NULL,
[margin-width],
0, ClientRect.Widht()-[margin-width],
ClientRect.Height(),
0);
}
}
void CMyFrame::OnPaint()
{
CPaintDC dc(this);
CRect ClientRect;
GetClientRect(ClientRect);
dc.FillSolidRect(0,
0, [margin-width],
ClientRect.Height(),
[some-color]);
}
I did this code from memory so there are probably some errors, but basically should work.
|
|
|
|
|
Hi,
Thanks for the answer, I tried
the code, which runs fine , but
one problem remains is , How do
I find the Height of the View,
because if there are multiple
Toolbars, ( esp. which can be
dynamically aligned ), how do I calculate the height, also I have to consider the StatusBar.
Because when I do
GetClientRect(...),
then it gives me the top, left as 0 (Zero ).
Please can you help me here
Thanks,
Sanksy
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
So you have a toolbar and status bar on your view's frame? Or just on your main frame window?
If you are using traditional MDI you probably just have it on your main frame window and the GetClientRect call in your child's frame window will return
the correct values.
If you are using MTI, FDI or have toolbars on your child frame you will need to look at the RepositionBars function (CWnd? member I think?). I don't have access to my development PC at the moment, but I think this is right.
|
|
|
|
|
Thanks,
I will check and let you know.
Regards,
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
check RecalcLayout and use the range 0 to 0xFFFF for the control bars... and check the flags in MSDN to calculate the total client rect and not actually do the GUI
- Roman -
|
|
|
|
|
Thanks for the reply, but please
can you give more details .
Regards,
Sansky
God is Good, all the Time.
All the Time, God is Good.
|
|
|
|
|
i want to use WTL::CString ,but once i add #include <atlmisc.h> to the stdafx.h,the compiler will notify me with the following:
error C2664: '_LoadString' : cannot convert parameter 2 from 'class WTL::CString' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Error executing cl.exe.
who can help me?
i am coming quietly just as i am leaving quietly.
i am coming quietly just as i am leaving quietly.
|
|
|
|
|
Try explicitly casting the CString variable (Parameter 2 of the LoadString function that is failing) to a LPCTSTR. This should for the compiler to use the cast operator that is declared for the WTL::CString.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi,
I want to create a Balloon tooptip in my
status bar (i mean.. the application is in the
system tray)..
How can i do it.. and my application may run
on Win98 or Win2000 coz i read somewhere that
balloon tips work for only win2000 so how can
i check and set the tooltip accordingly..
Please help
Sameer
|
|
|
|
|
You might try handling the "need tooltip text" message and displaying the balloon tip described in this article. If you're successful, please consider posting your implementation at CP. Thanks!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
For Win2K and up, this article should give you all the info you need.
<self-promotion>
For Win9x, this article should do nicely.
</self-promotion>
--------
Well actually they are sort of interesting Nish, on Nudes
|
|
|
|
|
hi,everyone
I am design a tree control that make of some directoris and some files.How can I save these infomation into a file, I need your help, thanks a lot!
Maybe it is not a dream!
|
|
|
|
|
See this article.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
It is so good!
Maybe it is not a dream!
|
|
|
|