|
A couple suggestions :
- Are you sure the server still supports HTTP 1.0 ?
- Is the content-length header filled with the right buffer size ?
- Do you end the post data with a double EOL ?
- test with the Proxy-connection: keep-alive
Last but not least,
- Use wininet to manage all this for you
|
|
|
|
|
Thank you both for your replies, but i am sure neither of this is the problem. For the first reply: I tried both POST and GET, neither worked. For the second reply: I posted a message on the forum using my browser (internet explorer) and i captured the packets sent over my network. Then i sent the EXACT same data again using my application, so you see, it had nothing to do with Content-length, Proxy or whatever.
Thanks again for the replies but i'm affraid it will remain unsolved for now.
Kuniva
--------------------------------------------
|
|
|
|
|
I'm told in mbcs systems the file names are allowed to upto 32000 chars long, whereas I've been writing code that assumes they can't be more than MAX_PATH chars long. In order to create files we have to use the unicode version of CreateFile with "\\?\" prepended to a file name in case of local disks and "\\?\UNC\" prefix with paths having the Universal Naming Convention (UNC) format.
My question is is it enough for me to make sure I always use unicode versions of File I/O api's and check a file name if it starts with C:\ etc then I prepend "\\?\" to the file name without regard to the file length and if the filename starts with "\\" I prepend it with "\\?\UNC\" prefix? Do you see any gotchas here?
Mangu
|
|
|
|
|
Yes - this won't work on non-Unicode enabled systems (such as 9X.)
I have been dealing wiith multibyte and Unicode stuff for a while now, and have never come across a filename like "\\?\..." (even though I have seen references to it in documentation.)
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
hi everybody.
I need to know if somebody is calling to modem on my pc,
for this i do following:
<br />
DWORD l_iResult = ::lineInitialize(&m_hTAPI ,NULL, lineCallbackFunc ,<br />
_T("MyApp"), &m_iNumberOfLineDevices);<br />
DWORD l_iResult = ::lineOpen( m_hTAPI , l_iDevLineID , &m_hLine , m_iTAPIVersion , 0 , 100 , LINECALLPRIVILEGE_OWNER ,LINEMEDIAMODE_DATAMODEM , NULL );<br />
DWORD dwLineStates = LINEDEVSTATE_CLOSE |LINEDEVSTATE_CONNECTED | LINEDEVSTATE_DISCONNECTED | LINEDEVSTATE_RINGING;<br />
DWORD lRes = lineSetStatusMessages(m_hLine, dwLineStates, 0);<br />
So , how can you see , I'll receive the event if somebody is calling to me , but i want to know who is it? that mean i want to know remote phone number.How can i do that?
Thanks to everybody who will react.
|
|
|
|
|
If your modem TSPI supports it, then you should recieve a LINE_CALLINFO message with the LINECALLINFOSTATE_CALLERID state.
You can use the lineGetCallInfo function to return the caller id.
A lot depends on the modem, and whether the telephone service provider is issuing the CLI. (Or if the CLI is blocked)
Michael
Wonder Woman, Wonder Woman.
All the world's waiting for you,
and the power you possess.
In your satin tights,
Fighting for your rights
And the old Red, White and Blue.
|
|
|
|
|
Arg.. getting a headache over this.. I create a static splitter window, and each pane loads another frame, and each frame loads another view.. I need to do this because both panes need independant toolbars. Anyways everything works fine untill you try and close the app.. then it blows up.. It fails when at CFrameWnd::OnDestroy(); and I can't figure out why.. If I replace one of the splitter panes with a standard CView then it works fine.. but if both panes are frames it blows up.. I just can't figure this out..
Any Ideas?
|
|
|
|
|
I had write a skinnable program which use bitmap to paint No-Client area, and i create
a RGN object from these bitmap, the problem is, when i sizing the window by mouse, it flicker,
how to solve this problem? Which message i need call SetWindowRgn to update the rgn of my window?
|
|
|
|
|
I have a CListCtrl in a tab within my dialog. I have hooked this list to the LVN_ITEMCHANGED message - ON_NOTIFY(LVN_ITEMCHANGED, IDC_LIST_SUBSCRIPTIONS, OnItemchangedListSubscriptions). However, my callback is not being called. I have other 'widgets' and they are working(ie buttons->ON_BN_CLICKED). I have my list displaying in report mode w/ columns,etc. I am running on Win2K/Visual Studio 6.0. Any help is appreciated
Thanks
|
|
|
|
|
LVN_ITEMCHANGED goes to the parent of the list - chances are, they are sent to the tab, rather than the dialog.
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Could you please tell me a work around? Should I try and catch it with OnNotify. Example please -
Thanks!
|
|
|
|
|
First, please confirm that you create the list control indeed as child of the tab.
The "standard" solution would be to provide your own Tab Ctrl that handlöes the LVN_ITEMCHANGED message.
A "more advanced" solution would be creating a frameless child dialog (like a property page) as child of the tab, and the list ctrl as child ofthe "page" dialog. (If you're using MFC, this is encapsulated relitively well in CPropertySheet and CPropertyPage). This is recommended if you use multiple non-trivial tab pages.
A "dirty trick" would be to specify the dialog (instead of the tab) as parent of the list. You get in trouble quickly, but sometimes it works...
If you go to war, you will destroy a great country a stoned greek chick to the richest man of the world
sighist | Agile Programming | doxygen
|
|
|
|
|
Thank you for your suggestion. What I have is a dialog with a tabctrl. For the tab 'pages', I have attached 2 "borderless" dialogs.
I have extended the CTabCtrl class for my purposes. How do I handle the LVN_ITEMCHANGED event if CTabCtrl does not handle it(class wizard does not show this event). I tried hand jamming the afx function, but it still does not work.
Thanks for your help!
|
|
|
|
|
what's the ralationship of ondraw and onpaint?
|
|
|
|
|
OnDraw() is called by OnPaint(). OnDraw() is also called by OnPrint(), that is how MFC allows you to use the same drawing code for the screen and printer.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Can anyone help me to some links/tutorials concerning skinning application using layered windows. Can't seem to find that much around on the net. Thanks.
|
|
|
|
|
MSDN is a good resource!
==============================================
SkinMagic SDK Library for C/C++
The better solution for write skinnable application
http://www.appspeed.com
==============================================
|
|
|
|
|
Which version of MSDN do I need? I currently have 6.0 along with MS Visual C++ 6.0. Do I need to upgrade both MSDN and visual C for all the goodies. I couldn't exactly find anything in the index for layered windows in my version.
|
|
|
|
|
|
Hi,
I have created a small MFC dialog app with the mfc app wizard and add some control and much function. Now what I would like to do is to add a popup window that I can plot some graphics in. So I added a new class GRAPHIC_WINDOW based on gerenic Cwnd, and then in the class wizard I added the Create msg to the new class GRAPHIC_WINDOW . Now I have added a new button to the CDlg_windDlg class and called the:
BOOL graph_window::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
What happened was a child window in the main dialog window popup, not really what I wanted. So after much searching I figured I need CreateEX()
So I changed to code in graph_window::Create to CreateEX() after much trial and error I almost have a popup window. I say almost bacuase a window is create but it is invisable and fills the desktop along with a half creat item on the task win98 bar... I spent much time now trying to figure out what wrong anyone any idea please..
Brgds Ian Knigh.... Find code below
BOOL graph_window::Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
// TODO: Add your specialized code here and/or call the base class
//return CWnd::CreateEx( WS_EX_CLIENTEDGE , _T("STATIC"), "MDICLIENT" , WS_BORDER | WS_MAXIMIZE | WS_CLIPCHILDREN | WS_CHILD, rect, 0, 0, 0 );
//AfxHookWindowCreate(this);
return CWnd::CreateEx( WS_EX_CLIENTEDGE ,AfxRegisterWndClass( 0),"Hello World", WS_THICKFRAME |WS_BORDER |WS_POPUP|WS_VISIBLE|WS_BORDER | WS_MAXIMIZE ,rect,NULL,0);
EnableWindow( TRUE );
// Set this as active...
SetActiveWindow();
// ...foreground...
SetForegroundWindow();
// ... and focus window
SetFocus();
// Run the modal loop
// nResult = RunModalLoop();
// Destroy window on exit
// DestroyWindow();
// return CWnd::Create(lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);
}
|
|
|
|
|
Hi,
I need to calculate color, when I use two layers..
bottom layer have color: r1,g1,b1,a1
and top layer have color: r2,g2,b2,a2
but I don't know how to calculate resulting color.
Alpha component is:
a=a1+a2*(255-a1)/255;
but I don't know other color components.
(Only when a1==255 => bottom layer is opaque).
Thanks for help!
i'm only pointer to myself
|
|
|
|
|
alpha generally ignores the bottom layer. alpha usually only applies to the top image, it controls overlay transparency and the bottom alpha is unchanged by the overlay image.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
Surely you must consider the alpha values of all images in the stack if there's a background layer?
--
It's not unusual to be picked up by a klingon woman
It's not unusual to have fun with a klingon
When I see you kicking me around
It's not unusual to see me cry, I wanna die
|
|
|
|
|
just merge each layer onto the background, one at a time, in Z order.
-c
When history comes, it always takes you by surprise.
|
|
|
|
|
For eons, I have been creating my start menu links and desktop icons using IShellLink. I have found a serious limitation (for me) though - it does not work very well if trying to create links on a different machine (e.g., a UNC path.)
Is there any way to create a shortcut without using IShellLink? Is the .LNK file format documented anywhere?
OR perhaps there is another way arond this - since my problems are limited to creating shell links on network machines, is it possilbe to create a "dummy" shortcut locally, then copy the .LNK to the remote machine? I can't assume the target file I want to link to will be on the local machine though, it may only be on the remote machine.
Thanks!
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|