Click here to Skip to main content
13,201,763 members (68,946 online)
Rate this:
Please Sign up or sign in to vote.

My question is simple, it just to make a simple chat program, via web instead of using server/clients. However, it could be using the following URL:

I mean by this above, this site has button, named submit and the small text for entering the message then for submit the text as chat program exactly :

In c++, I got the following codes:
#include "afxinet.h" 
BOOL DoSubmitURLText(const char *url, CString &errorMessage) { 
TCHAR szCause[255]; errorMessage = "OK"; 
TRY { 
CInternetSession session; 
return FALSE; 
return TRUE; 

In OpenURL, has the function for open this URL, without open it in the browser.

I mean, by I would like to make this action, by sending also the message via that website(shoutbox above ) also to submit it.

Is there any codes in c++ for control this ? adding or modified something ?

Thank in advance!
Posted 3-Aug-12 12:25pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Instead of trawling the web for random code, start from the top. A simple chat program, via the web, is probably going to be in a browser. Therefore, you'd write it using a back end like ASP.NET, and with lots of javascript/AJAX to handle the chatting.
skonliner 3-Aug-12 18:59pm
Yes, it could be. But I mean by using it in c++ program application, and it controls that web site. by using it as sub party. means what, using the codes are actually within c++ application. but non using by any server/clients applications. SO, the messages are reaching at short times easily instated of stupid messages for accepting and receiving messages for communication and perhaps, fails connections between the server and clients.
Christian Graus 3-Aug-12 19:02pm
Basically you'd need to write code to send and receive pages the way a browser does, and then parse them in order to send and receive the data that the browser collects in the UI. This is obviously more complex than writing a web page, where half of it is done for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171020.1 | Last Updated 3 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100