|
Hi,
Does anybode know how to force WInInet to send HTTP/1.0 request ? I tried to use HttpOpenRequest(m_connection,"POST",object,TEXT("HTTP/1.0"),NULL,....)
call to make HTTP/1.0 request. But when i look into request, IE 5.0 (i didn't tes another version) is sending HTTP/1.1. I also tried to use InternetSetOption / INTERNET_OPTION_HTTP_VERSION to set HTTP version to 1.0, but it has no effect.
The second (bug?) is that when i send HTTP/1.1 request to the server, while reading response with InternetReadFile(), This function sometimes hangs during receiving last packet of chunked response. Wininet callback functions is sending infinite number of events INTERNET_STATUS_RECEIVING_RESPONSE followed by INTERNET_STATUS_RESPONSE_RECEIVED with data length 0 bytes. InternetReadFile() does not stop even if i try to InternetClose() request, connnection and session handle from another thread. This bug is the reason why I need to send HTTP/1.0 request, to avoid this bug.
Can somebody who has experience with this help me, please ?
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Is there any way to get MFC print preview functionality in an SDK application ?. If not How to implement print preview functionality in SDK application
|
|
|
|
|
Ive seen that some programs can start when users click a hyperlink in the web browsers.
such as gametiger and teamspeak.
'Added URL recognition for websites for launching
'TeamSound (TS:\\10.4.5.100:Offense).
How could this be done in c++??
|
|
|
|
|
any ideas.
need help plz.
|
|
|
|
|
Hi,
I have a MFC based dynamically linked dll.In dllmain()'s DLL_PROCESS_ATTACH part i have written
if (!AfxWinInit(GetModuleHandle(NULL), NULL,
::GetCommandLine(), 0))
{
printf("Couldn't initialize MFC!\n");
return 0;
}
After this i have AfxMessageBox("my msg");
But messagebox() is never been displayed.
I had build the project i release mode.The OS i work on WINDOWS ME.
Regards
Neha
|
|
|
|
|
MFC DLLs provide their own entry point, so you're not supposed to write one yourself. If you plan to write a DLL with MFC support, I'd suggest you start with a fresh MFC DLL created by the app wizard and then move your code there.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have a dialog base application,I want to change the caption of my dialog somewhere in my program,How can I do it?
Thanks
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
With SetWindowText . You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fail.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
With SetWindowText. You should use this method only when the window has been created (i.e. if you do it right after creating the CDialog object, it will fai.)
Thats exactly my problem.I do it on OnInitDialog() and it failed.I wanna to write the username that login in computer in the caption place,So I think I have to do it in OnInitDialog() .
Now how can I do it?
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
OnInitDialog is a fine place to change the caption. Just make sure you're doing it after calling the base class method CDialog:OnInitDialog .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
OnInitDialog is a fine place to change the caption. Just make sure you're doing it after calling the base class method CDialog:OnInitDialog.
Hello Joaq,
That doesn't matter. You can call SetWindowText before calling CDialog:OnInitDialog. The title gets changed!
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi Nish!
Oh, didn't tested that. I supposed that could be the problem, since otherwise it should work without a problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Oh, didn't tested that. I supposed that could be the problem, since otherwise it should work without a problem
I just created a sample app and tested it out. It doesn't matter whether you call SetWindowText() before or after the call to the base class.
I guess his problem lies elsewhere
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks Joaquín.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Mazdak wrote:
I do it on OnInitDialog() and it failed
That's puzzling! It should work fine from OnInitDialog(). In what way is it failing? Are you getting an assert? Or did the old title still come up?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Thanks Nish.It works now.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
What was the error, Mazy?
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Nish - Native CPian wrote:
What was the error, Mazy?
I made mistake in use of SetWindowText() .I think I use it in a way something like this:
GetDlgCtrlItem(GetDlgID())->SetWindowText("");
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
We all make mistakes I guess
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
Hi,
For a group of menu item, use the
ON_UPDATE_COMMAND_UI_RANGE( id1, id2, memberFxn )
to update the menuitem status.
But how to declare the memberFxn, try the
void CMainFrame::OnUpdateMyMenuItem(UINT nID, CCmdUI* pCmdUI)
{
...
}
and
void CMainFrame::OnUpdateMyMenuItem(CCmdUI* pCmdUI, UINT nID)
{
...
}
Both cannot work. (They will Cause Access voilation Error).
Can someone help me? Thanks in advance.
Best Regards,
Wayne King
|
|
|
|
|
It should be
void CMainFrame::OnUpdateMyMenuItem(CCmdUI* pCmdUI); The extra nID is not needed, as this information can be retrieved from the CCmdUI object itself.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Could anyone tell me how to link a 16-Bits DLL in Visual C++ 6 using MFC? I need load a old DLL. I read about convert it to 32-Bits DLL, and seem very dificult, Is it absolutly necesary to do it?
Thanks in advance!
|
|
|
|
|
If you've got the source code, I'd strongly recommend you rebuild for 32-bit. Otherwise, your only choice is to construct a so called thunk DLL that does the translation between 16- and 32-bit worlds. Thunks are a complex subject, and you might need to get some assistance to do one.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to expand one tree's item (like IE) by sending message or by some other way, while I don't know which item it is but its full path(eg: c:\test)
How can I do this?
Thank you!
|
|
|
|