|
for multiple users to login please create socket array. keep an index with each and every user name. use this index to refer the corresponding socket
regards
Arun
|
|
|
|
|
Sorry,
i am not clear...Pls, can you give me some more explanation
|
|
|
|
|
You r listening on a socket. When a connection request arrives you are allocating another socket object for further communication. So in case of multiple users you can create an array of socket objects. as you know array elements required an index for referring it. So when a client need to connect to your server it will send a login name , which may be predefined, i think.
you can verify the login name and then you have to allocate a new socket object corresponding to that request. Now you have to keep an index number corresponding to the login name which should be assigned dynamically. Using this index you can refer the socket which is assigned to the user.
I think this is the simple method. for some technical reason i can't provide the code
try to resolve the problem
regards
arun
|
|
|
|
|
Thanks for your explanation...
|
|
|
|
|
hai
i just want to know the brief idea of how an input charecter is being controlled in windows.
please give me the reference
Help Ever Hurt Never
|
|
|
|
|
Hi,
Could you please explain what is character input control.
|
|
|
|
|
how the charecter which is input through the keyboard is controlled in windows. i just want the reference of the function simillar to the windows character input function.
will u please provide the reference material.
Help Ever Hurt Never
|
|
|
|
|
Im using a map to store data.So i want to return the map.
map<int ,usercontrolinfo="">* RSUserControlContainer::GetAnswers()
{
//UserControlInfo is a structure
map<int, answertype=""> mapAnswers = new map<int, answertype="">;
---------------
--------------------------//Other code
-----------------------------------
return mapAnswers ;
}
But It give some errors.So how can i return a map from a function.
bhw
|
|
|
|
|
some syntax i typed here is not visible when i post it.map means map C++ map.
bhw
|
|
|
|
|
use <pre>, <, > symbols from formatting option when you compose the post
|
|
|
|
|
map<int ,UserControlInfo>* RSUserControlContainer::GetAnswers()
{
map<int, AnswerType> mapAnswers = new map<int, AnswerType>;
return mapAnswers ;
} The compiler is probably complaining about returning an AnswerType map when the function's return type specifies a UserControlInfo map.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
map mapAnswers, is not the pointer, Do you forgot it.
|
|
|
|
|
TobetheWinner wrote: But It give some errors.
What errors?
|
|
|
|
|
But you didnt say any thing about errors.
|
|
|
|
|
Hi All
I have a dialog based application, want to add feature that application should go to System Tray when cross(x) button of dialog is clicked,
For This;
I have used NOTIFYICONDATA and Shell_NotifyIcon( ) API, also in the OnCancel() handler used void ShowWindow(SW_HIDE); to fide the dilaog,
now what is my problem that this SA_HIDE hides the application immediately, but I want to make this happening as
dialog is going to system tray as per in GTalk and some other applications....
Please suggest me the answer for this ....
Waiting for your replies...
THANKS
|
|
|
|
|
|
Hi,
I'm dynamically creating a tab control as a child of a dialog. When it is displayed initially the client edge is not visible (but the tabs are shifted according to the place the frame needs). When the dialog is covered and afterwards visible again, the client edge is displayed correct.
To force an update directly after creating an adusting the tab control I sent a nc update messsage like
MyCTabCtrl.PostMessage(WM_NC_PAINT);
But this did not help, either.
Any ideas?
I'm still using VC6, MFC4.2.
Regards
Leo
|
|
|
|
|
Try this:
MyCTabCtrl.SetWindowPos(NULL, 0, 0, 0, 0, SWP_NOZORDER|SWP_NOMOVE|SWP_NOSIZE|SWP_FRAMECHANGED);
I think this should work, assuming I understood your question properly.
Steve
|
|
|
|
|
Herewith I decorate you with the invisble medal for the fastest competent answer with a working solution .
Thx
Leo
|
|
|
|
|
hi i am calling a dialog function from another function as CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall; but it is getting crashed in debug state? why this occurs pls help me;
my code is:
f(pCustInst->GetCheck())
{
CDialog::OnOK();
CMyConnCustomInstall *CustomDlg = new CMyConnCustomInstall;
CustomDlg->DoModal();
}
|
|
|
|
|
Hi,
I tested the same code without crash.
After 'if', are there anymore statements?
Thammadi
|
|
|
|
|
no i have to close the present dialog(from where i have to call the next dialog) and open the next dialog.
|
|
|
|
|
What happens if you run
CustomDlg->Create();
CustomDlg->ShowWindow(1);
|
|
|
|
|
Is the line where you call CDialog::OnOK() inside a member function of the CDialog?
Regards
Leo
|
|
|
|
|
Let's accallerate this, so that I do not need to wait for your reply.
Also I'm not sure, if my question was clear.
I suppose you are doing something like
DialogA::OnUpdateUI()
{
CDialog::OnOK();
pDialogB = new Dialog B;
...
}
Since OnOK() of the base clase does the same like hitting the OK button I guess that DialogA is destroyed. If this is true than at the next line you try to execute code in a non existent object.
Maybe
DialogA::OnUpdateUI()
{
DialogA.ShowWindow(FALSE);
pDialogB = new Dialog B;
...
CDialog::OnOK();
}
works?
Regards
Leo
|
|
|
|