Two Notepad Apps - Simultaneous Editing

I made a post the other day about not knowing where to start on a bigger project and I thought this made a good example of something I'd like to do as a learning experience.

I'd like to create an application where two Notepad-esque programs are running (on the same computer, to start with at least and yet they are sharing the same... file. Editing one updates the other. I can create a notepad application just fine, but I just wouldn't even know where to start communicating between the two?

So... Firstly, where would I start? And secondly, If I didn't have the wonderful people here, how would I start looking for how to start on my own? :)

-CT
You can make the two apps talk to each other, that's probably the nicer way of doing it. As you know, notepad just provides an Edit Control. Each time a change is made, you can broadcast a message that has:
1 - instance identifier
2 - change type (insert/delete)
3 - position of change
4 - character (for insert)

The app can also listen for these messages. When it receives such a message it:
1 - checks the instance id so it doesn't act on it's own notification
2 - applies the change to its Edit Control

You could also create a different app that sends the broadcast across the network to another computer somewhere and your thing would work across a network (such as the Internet).

It's a White Board app.
This sounds like a textbook client-server model (many clients, single server).
Agreed, why not look into sockets. winsock if windows, posix if not. Beej's guide is great. And once you understand that a collaborative editor won't be hard.
Just a "thanks for all the ideas" posts :) I'll get looking into them all :)
Topic archived. No new replies allowed.