HTML-Based Chat Server/Client

Environment: VC6, Win 98

This article is about a CSocket-based chat server/client, which is something that's been very well discussed. Here the display is in HTML format so the user can change the look of the messages he sends. It also has features such as alerting on message arrival and putting the program icon in the system tray when hidden, which is very useful.

For putting it in the system tray, we have to use the Shell_NotifyIcon() function.

NOTIFYICONDATA not;
not.cbSize =sizeof(NOTIFYICONDATA);
not.hIcon=AfxGetApp()->LoadIcon(IDR_MAINFRAME);
not.hWnd =this->m_hWnd ;
  strcpy(not.szTip ,"iChat Standard");
not.uCallbackMessage=ID_TRAY;
not.uFlags =NIF_ICON|NIF_MESSAGE|NIF_TIP;
not.uID =1;
  Shell_NotifyIcon(NIM_ADD ,&not);

We will receive tray icon messages on id ID_TRAY. It makes sure that only one instance of the chat server runs at any time. Finally, this chat program is integrated with Microsoft NetMeeting for ease of use.

Downloads

Download demo project - 204 Kb
Download source - 359 Kb


Comments

  • shell_notifu()

    Posted by NITHIn on 07/20/2013 11:38am

    Hi,i know this is a dumb question but can you pleasectell me what is shell_notifyicon() function and where to write all that

    Reply
  • I need to learn c++

    Posted by Legacy on 02/25/2004 12:00am

    Originally posted by: Kevin

    Hi , can u please teach me c++. im so interested in it. if u could please email me at xclamt_21@yahoo.com

    Reply
  • I want to be a master in VC, Help me plzzz

    Posted by Legacy on 02/04/2003 12:00am

    Originally posted by: Thushar

    I want to Study VC++,and i have a very little time as i've to do my project in it.Can any body send me what i should do or how i should proceed....Some Books to Ref...

    Reply
  • http://www.ucancode.net

    Posted by Legacy on 12/05/2002 12:00am

    Originally posted by: peirr

    http://www.ucancode.net

    Reply
  • connection lost

    Posted by Legacy on 12/05/2002 12:00am

    Originally posted by: Paresh

    hi,
    I tried to use it but it says connection lost. I am looking for such an application which allows you to see the user list and once you see the user you can send messges to the user. does this application overlaps firewall ?
    since its a socket based calls it will be fast...

    good application.

    Paresh Gheewala

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • The impact of a data loss event can be significant. Real-time data is essential to remaining competitive. Many companies can no longer afford to rely on a truck arriving each day to take backup tapes offsite. For most companies, a cloud backup and recovery solution will eliminate, or significantly reduce, IT resources related to the mundane task of backup and allow your resources to be redeployed to more strategic projects. The cloud - can now be comfortable for you – with 100% recovery from anywhere all …

  • Live Event Date: May 6, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT While you likely have very good reasons for remaining on WinXP after end of support -- an estimated 20-30% of worldwide devices still are -- the bottom line is your security risk is now significant. In the absence of security patches, attackers will certainly turn their attention to this new opportunity. Join Lumension Vice President Paul Zimski in this one-hour webcast to discuss risk and, more importantly, 5 pragmatic risk mitigation techniques …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds