|
Too lazy to read the RFC eh?
Nish
If I am awake and my eyes are closed, it does not necessarily mean that I am thinking of naked women.
|
|
|
|
|
I can't blame him, I looked up the HTTP RFC and it took forever to download on my High-Speed Broadband
Sorry I couldn't help but emphasize the high-speed part
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
Not really!
The protocol's pretty straightforward. Instead of sending a "GET" (to download a resource), I send "HEAD". When I read the response, it will contain the header information sent by the HTTP server. My problem is, I'm trying to figure out the Internet_mumble calls to make.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
Try with an ISAPI extension. You can send HTTP headers and read resoponses very easily. Search MSDN for CHttpServer and CHttpServerContext classes.
Best regards,
Alexandru Savescu
|
|
|
|
|
Actually, I want to do this on the client side.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Has anybody been able to pull this off?
I am able to get a tooltip to work over the edit box portion, but
when the dropdown is active, I can't capture mousemoves over the dropdown
or get tooltips to show up no matter what I do!
Please advise if you can
Thanks
-Julie
|
|
|
|
|
I need to create a MDIChildFrame with a caption bar , a minimize and a maximise button . I want to get rid of the Close icon for the Childframe on the rightmost corner . How do i create this ?
Thanks
|
|
|
|
|
While creating the active x component i unchecked the visible radio button. How do I make the component visible in my Dialog application during runtime. My active x class CActiveX derives from CWnd.
thanks
|
|
|
|
|
ShowWindow(SW_SHOW)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a function that taken a variable argument list. I wanted to just forward those arguments to another function that also takes a variable argument list.
Example:
void f2(const char* string, ...);
void f1(const char* string, ...)
{
... (prepend something to string, call it string2)
f2(string2, ?); //what goes in ?
}
What needs to be done to make this work?
Thanks
|
|
|
|
|
It can be done in a wildly non-portable fashion just like this (some details may need more careful handling for this to actually work): the variable argument list is stored in the stack and its beginning can be accessed with the macro va_start . So one can just copy a large enough portion of the stack and transfer it to f2 . The scheme is as follows:
struct stack_chunk
{
char memory[1024];
};
void f1(const char *string,...)
{
stack_chunk chunk;
va_list v;
va_start(v,string);
memcpy(&chunk,v,sizeof(chunk));
va_end(v);
...
f2(string2,chunk);
} Please tell us it this worked.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yep, this worked. Thanks!!!
|
|
|
|
|
You can have a look at the wvsprintf function.
Best regards,
Alexandru Savescu
|
|
|
|
|
Hello all, I was wondering if someone could help me with this little problem.
I have the class constructor where I initialize protected member m_categoria (LPCTSTR):
CAdministrador::CAdministrador()
{
char buffer[_MAX_PATH];
_getcwd( buffer, _MAX_PATH );
CString nom = "";
nom = nom + buffer + "\\General";
m_categoria = nom;
AfxMessageBox(m_categoria);
}
The value comes out Ok in the message box; but then I try to look at the value in another function and I get crap:
BOOL CAdministrador::AgregarCategoria(LPCTSTR nombre)
{
AfxMessageBox(categoria);
CString nom = "";
nom = nom + m_categoria + "\\" + nombre;
if (_mkdir(nom) == 0)
return TRUE;
else
return FALSE;
}
The call is simply this:
CAdministrador admin;
if (!admin.AgregarCategoria("blah"))
AfxMessageBox("didn't work...");
Please excuse me if this question is extremely dumb
marcela bovio
|
|
|
|
|
Hola Marcela!
When you write
m_categoria = nom; you're accessing the internal representation (as a LPCTSTR ) of the CString nom . m_categoria will be OK as long as these two conditions hold:nom is not modified.nom is not destroyed. The latter is precisely what's happening when the constructor exits, so m_categoria will basically point to some junk area in the heap from now on. Best way to handle this is declaring m_categoria as a CString itself, so that it keeps and manages its own memory.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Man, you're fast. So often I see a question, click on it to read it, and when I do, you've just answered it !!!
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
And I lose quite a bit of time doing the pretty HTML formatting
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you!
marcela bovio
|
|
|
|
|
I have a dialog window application, and i need to know how to add tool tip text to a button. Can someone please help me with this one. PLEASE!!!!! I do not want to have to use someone's pre built classes either.
|
|
|
|
|
Look at the buttons section here at CodePeoject. Davide Calabro's CButtonST v3.4 (MFC Flat buttons) seems a popular one, and includes a lot of additional goodies.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
You need to override the PreTranslateMessage member function of your CDialog class and call the CMyToolTipCtrl.RelayEvent
Best regards,
Alexandru Savescu
|
|
|
|
|
Argh....
I have code that looks like this:
in "ObjectCache.h":
template <class T>
class CObjectCache {
...
};
in "App.h":
#include "ObjectCache.h"
#include "DataObject.h"
class CApp {
CObjectCache<CDataObject> m_Cache;
...
};
Can anyone think of any reason why the compiler would be yacking on the m_Cache line? It's telling my that "m_Cache uses undefined class 'CObjectCache<class CDataObject>'
But as far as I can see, the class is defined - everything is defined in ObjectCache.h and it's included. And everything for the contained class CDataObject is defined in DataObject.h that's included.
I've transplanted this code into a plain application, and it works fine. In my MFC application, it's crapping out.
Any ideas at all?
J
|
|
|
|
|
Maybe it's the precompiled headers feature playing tricks again. Make sure your first #include in every .cpp is stdafx.h . If this doesn't work, try a "Rebuild all" as a last resort.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Make sure your first #include in every .cpp is stdafx.h.
Done.
Joaquín M López Muñoz wrote:
If this doesn't work, try a "Rebuild all" as a last resort.
Doesn't fix it.
I'm quite stumped. I've even dug through the preprocessor output (/E option) and my template is defined nicely (and so is the contained class).
ARrrrrgh.
J
|
|
|
|