what is winsock2? is it for MFC? is there any advantage on normal socket functions like listen/bind/createsocket etc (which I have worked on little bit).
lol. winsock is called - normal sockets. MFC just wraps around. You will get better understanding if you go for winsock API. I don't force you to leave MFC, but that's not my choice when it comes to sockets. Nishant Shivakumar has a neatly written TCP client server application. I'd recommend you to start with that. wait let me check it.
He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus
could you please tell me if my design is correct.
->Maintains a list of Ip_Address-user. Always in listen mode, so that if someone ask for the list it sends it.
-> If the admin adds a new user, he will re-send the list to all (but I am not sure, how to do it,when if the clients are busy sending message. should i restart all or do something)
-> on boot/application start, it request server and get the list(His IP-username should be present in the list). And sends a message that he is online to all.
->if he goes offline- he will notify everyone and the go offline.
so basically only those people who are listed in the server by admin can only chat
Of course: cmdpath contains garbage because you didn't write anything into it. So, if you try to append something to it, the garbage will be kept. Replace the first strcat by a strcpy, this way you first copy something useful in the string, then you can append things after it.
I am a beginner learner in MFC.
I am confused about the topic Document View.
Why do we need document View in an application? Is it to separate the data and the view ? If so we can always have a database and a view(ie my front end application)? What can we do with document?
Could anyone please put some light on it.(May be not the whole details), so that I can have an idea and go about it.
If so we can always have a database and a view(ie my front end application)?
Not all applications are database oriented . Take for instance a simple text editor application: it makes perfect sense to have a document class (which keeps the state of only the information about the document) and a view class (which is only responsible to draw the information on the screen). That's just an example, but this can be applied to a lot of programs which are used to open file and manipulate the content (drawing applications, text applications, excell, ...)
It's something. It might take some time to understand completely. But to get an abstract view, The Doc/view's intended objective is to separate the "data" from the "viewing" code. It clearly define a boundary there. You may have any data (or the document). You can attach views to reflect(Draw/Display) the contents of data to users. You can have multiple views for the same data. It's like you are peeping through one window and another peep through another window but the document would remain same. SingleDoc-Sigle views, singleDoc-multiple views, MultipleDoc-Multiple views & also multiple types of docs & multiple views.
I added three dialogs in to property sheet.
Now i want context sensitive help for each dialog.
SO i palnned to set context help for each dialog..and i can see '?' icon near 'x'icon in the dialog.
But while running i can't see the icon because its a property page.
So how can i get that icon in property sheet.
(Now i madde context help by having button in each dialog to invoke context help)..
But i want this as icon in title bar...Pls help me..
--- Warning! What I talking about here is pure Borland C++ and I don't want to use any MFC!!! ---
I've found an article about how to make a custom control as a dll. I have made custom controls before, but not as dlls. So when I tryed to do this I came across the following problem:
If one want to load a dll in different apps, it will probably mess up the data it have. This is becouse It implemented as a class that have it's own data and functions.
So how to make a control nicely? Should I make a lib from the class, a dll and have only one instance or just write the functions in C style in to the dll - but in this case, how I manage the data?
What I thinking of as an example is a simple 2-state button control which have its own bool to indicate the state. This can have as many instances as want and also in different apps at the same time. In Windows it's in a dll...
My problem was while trying to implement this the message handle. A control is a window havin' it's own message handle procedure what - as far as I know it - can't be in a class but only in global. So when I load the dll in defferent apps, and make different instances of the class in it, which ones functions will it call???
Okay, these are the basic problems I have and only want to know how to implement that kind of button as in the example. So opinions and solutions are welcome.
Last Visit: 31-Dec-99 19:00 Last Update: 10-Dec-23 20:12