|
The dialog should go into the .rc file. You can copy/paste w/in the resource editor, or open the files as text and edit them that way.
Are you sure you need to be writing a console application?
I'm never gonna work another day in my life. The gods told me to relax, They said I'm gonna get fixed up right. Monster Magnet, Powertrip
|
|
|
|
|
yeah...you see it is code written on Borland C which I was running with VisualC++ Studio and I want to include a dialog box with a buton to execute the program.
I'm still not too sure
|
|
|
|
|
clara wrote:
I'm still not too sure
Sounds to me like the whole thing is a mess. If you're creating dialog boxes, the odds of you needing a console program are close to zero.
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
|
|
|
|
|
CP has a couple of nice examples of how to download a file via HTTP. Can someone point me to a code snippet that demonstrates how to send a "HEAD" request for a resource (eg: http:/foo.com/mumble.html) and read the returned result? Thanks,
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
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
|
|
|
|