|
Hello ,
I am new to Internet Programming in VC++.
Can anyone of you out there inform me about how i can generate a form post that a browser generates when send the form post to the webserver.
Thanks in advance.
Regards
|
|
|
|
|
Hi,
Using Windows Sockets you are connecting to the HTTP server and then you send/receive data in the HTTP protocol. You can find all information you need in RFC 1945 "Hypertext Transfer Protocol -- HTTP/1.0" at http://www.rfc-editor.org/rfc/rfc1945.txt.
I you are not experienced in RFC reading/implementing check our Ultimate TCP/IP 3.0 product at www.dundas.com. This product can help you a lot.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
Hi Alex,
to add to your answer.
I have noticed a common mistake most people fall in
they forget to target the correct url
for example if they have an in box called Lastname in an asp page called page1.asp
they would send their post Request as follow
using telnet connect to www.anyserver.com port 80
then they would send the following ascii lines
// SNIPP
POST /page1.as HTTP/1.1
Content-Length: 17
[empty_line]
lastname=Alfadhly
[empty_line]
// SNIPP
although these steps are correct since it includes the three most importent pieces of the post i.e
1) POST command and the target url plus the protocol version
2) The conent length header of the data in the request
3) the data it self e.g lastname=Alfadhly
[NOTE:] I have ommited other headers such as referer and Host, and Cookies ] if they are used in the aps page
Most programmers tend to forget to look at the source of the asp page and forget thaat the target should be the one identified by the ACTION parameter of the post
I hope this might help
|
|
|
|
|
Hi Alex,
to add to your answer.
I have noticed a common mistake most people fall in
they forget to target the correct url
for example if they have an in box called Lastname and a submit button named Send in an asp page called page1.asp
they would send their post Request as follow
using telnet connect to www.anyserver.com port 80
then they would send the following ascii lines
// SNIPP
POST /page1.as HTTP/1.1
Content-Length: 28
[empty_line]
lastname=Alfadhly&Send=Submit
[empty_line]
// SNIPP
although these steps are correct since it includes the three most importent pieces of the post i.e
1) POST command and the target url plus the protocol version
2) The conent length header of the data in the request
3) the data it self e.g lastname=Alfadhly
[NOTE:] I have ommited other headers such as referer and Host, and Cookies ] if they are used in the aps page
Most programmers tend to forget to look at the source of the asp page and forget thaat the target should be the one identified by the ACTION parameter of the post
I hope this might help
|
|
|
|
|
Hi Alex,
to add to your answer.
I have noticed a common mistake most people fall in
they forget to target the correct url
for example if they have an in box called Lastname and a submit button named Send in an asp page called page1.asp
they would send their post Request as follow
using telnet connect to www.anyserver.com port 80
then they would send the following ascii lines
// SNIPP
POST /page1.asp HTTP/1.1
Content-Length: 28
[empty_line]
lastname=Alfadhly&Send=Submit
[empty_line]
// SNIPP
although these steps are correct since it includes the three most importent pieces of the post i.e
1) POST command and the target url plus the protocol version
2) The conent length header of the data in the request
3) the data it self e.g lastname=Alfadhly
[NOTE:] I have ommited other headers such as referer and Host, and Cookies ] if they are used in the aps page
Most programmers tend to forget to look at the source of the asp page and forget thaat the target should be the one identified by the ACTION parameter of the post
I hope this might help
|
|
|
|
|
Can I simulate the process of moving a mouse to an edit control and click the mouse button,
type in some words or password, and click an OK button (or press enter)?
Thanks
|
|
|
|
|
Take a look at the SendInput Win32 API function. There also are commercial tools you can buy for automated testing that will do this too.
|
|
|
|
|
Hi,
in my dialog the users want to change focus not by using the tab-key, instead they want
to jump directly to the different controls using accelerators.
Therefor i want to check the key combination in the PreTranslateMessage method, to set the focus.
How can i check this, because i always get only one key in the pMsg->wParam variable
and not the combination.
Need some advise or another solution.
TIA, Chris
|
|
|
|
|
if (0 > GetKeyState(VK_MENU)) ALT Key down
if (0 > GetKeyState(VK_CONTROL)) CTRL Key down
and so on
Kurt
|
|
|
|
|
Chris, this is a built-in feature of dialogs and doesn't require any code on your part. Just create a static control and put it next to the edit box, e.g.:
P&rice: [edit box here]
The &r will show up on the screen as an underlined "r". Make sure the static is right before the edit box in the tab order, and then pressing Alt-R will move the focus to the edit box.
If you *really* have to support shortcut keys using Ctrl, not Alt, then you will have to do some code. But using Alt has been standard for years, so go with Alt.
|
|
|
|
|
How could one create a static bitmap control that is palette savvy? My controls look great at 16 and 24 bits but but in 8 bit mode they look disappointing.
Thanks
|
|
|
|
|
|
Sounds like fun to me. I've done plenty of bit blitting but I must profess an ignorance of DIB sections. How do they differ from Windows bitmaps?
|
|
|
|
|
DIBSections are similar to bitmaps in that you have a handle that you can work with (an HBITMAP in fact), but they are device independant. They offer the best of both worlds: device independance and ease of use. They are also extremely useful when working in CE, since CE doesn't support many of the DIB functions - but does support DIBSections.
|
|
|
|
|
Why whenever I create a modeless dialog, and show it using ShowWindow(SW_SHOW), do none of my dialog controls show up?
I have a very simple dialog with a static text label on it. I showwindow to show it. Sleep for a few seconds, and then showwindow to hide it. However, my static control never appears on the dialog.
Any ideas?
Thanks,
Frank
|
|
|
|
|
Hi,
Can someone give me a hint on how to Subclass the Back, Next and Finish buttons on a wizard propertysheet page ?, I want to add icons or bitmaps to these buttons to look better.
Thanks.
www.usro.net
|
|
|
|
|
You can use GetDlgItem on these buttons like any other control (IDOK, IDCANCEL, etc.). They can be subclassed in the WM_CREATE of the property sheet.
|
|
|
|
|
Thank you, I tried to subclass the buttons in the classical way, the application runs without problems, but the buttons does not get painted. I sublcassed with CButtonST found on this site.
www.usro.net
|
|
|
|
|
This may be a very easy one, but I am trying to return multiple files from a CFileDialog using the OFN_ALLOWMULTISELECT parameter. How do I return the filenames using GetStartPosition()and GetNextPathName()?
|
|
|
|
|
If pressing CTRL+ALT+DEL in Win9x a box appears, which displays all runing applications. You can select an application an click on 'Close Task'. Everybody knows that.
The Problem:
If I select, for example Windows Explorer, and click on 'close task' the Windows Explorer will be closed at once. If I select my application and click on 'close task' a dialog appears after 30 seconds or so, which tells me 'task is not responding, blah, blah 'end task' 'wait' '. (My application is not crashed!)
The Question:
Can anybody tell me what messages are send to an application from the 'close task'-box or which messages do I have to handle? Or is there another solution for this problem?
thanks for your help!
|
|
|
|
|
I would send WM_QUIT message to the main window of a running application if I wanted to close it. WM_CLOSE message might be a good choice as well. These are two messages that could be used to kill an application nicely. If application is still running then it is highly probable that some overkill solution like TerminateProcess() function is used.
Regards,
Andrei Zenkovitch
Dundas Software
|
|
|
|
|
Hi,
i have several modeless dialogs and i want know when the dialog gets the focus.
I haven't found any message which is send to the dialog before he gets the focus.
Any solution?
TIA, Chris
|
|
|
|
|
Chris,
Try to handle WM_ACTIVATE message. Dialog itself doesn't get focus. Instead when dialog window is deactivated it remembers the child window that had focus last and when it is activated the dialog will set focus to that child window.
Regards,
Andrei Zenkovitch
Dundas Software
|
|
|
|
|
hi,
I have three property pages on a property sheet.
I have set the 'tab stop' property for all the
editboxes,radiobuttons and other controls on the
property pages.
From the resource editor when i do a test run its
fine. but when i run my application and display
the dialog the tab does not work.
whenever i press tab it beeps.
any idea what i am doing wrong?
Gita
|
|
|
|
|
hello,
I have implemented a component from scratch. i mean including the classfactory. (no ATL)
I create an instance of the object and when i try to
register it with the running object table it queries
for two interfaces IMarshal and IProxyManager( i
determined this using the IID's). why are these
being invoked?
Also initially i had derived my interface from IUnknown
and the call to register failed(crashed).
when i derived it from IDispatch and implemented the IDispatch methods i found that the GetTypeInfoCount,GetTypeInfo and the GetIdsfromNames methods are being called.
Why are these being called? The parameter values for these methods are also some huge values like 55648930
Could someone explain this to me.
Thanks in advance
Gita
|
|
|
|