Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to write this program? Pin
palbano30-Jun-04 7:15
palbano30-Jun-04 7:15 
GeneralRe: how to write this program? Pin
Maximilien30-Jun-04 7:19
Maximilien30-Jun-04 7:19 
GeneralRe: how to write this program? Pin
palbano30-Jun-04 7:30
palbano30-Jun-04 7:30 
AnswerRe: how to write this program? Pin
Ravi Bhavnani30-Jun-04 7:47
professionalRavi Bhavnani30-Jun-04 7:47 
AnswerRe: how to write this program? Pin
Johan Rosengren30-Jun-04 8:59
Johan Rosengren30-Jun-04 8:59 
GeneralRe: how to write this program? Pin
Wes Aday30-Jun-04 9:07
professionalWes Aday30-Jun-04 9:07 
GeneralRe: how to write this program? Pin
palbano30-Jun-04 9:14
palbano30-Jun-04 9:14 
Generalremotely closing a modeless dialog Pin
kfaday30-Jun-04 6:49
kfaday30-Jun-04 6:49 
Hello,
i'm developing a chat program. There's a vector of pointers to Dialogs. When i open a chat window, a NEW is called to that dialog, then i call create and showwindow to show the dialog. The windows are deleted when i close the program.
I'm not having trouble with that.
When i close a window, i send a message to the remote client to close the window. The remote client receives this message in a function from the dialog, and there i want to close the dialog (not the remote one):

CVentanaPizarra::OnClose();
CDialog::EndDialog(0);


In the OnClose I have the following:

void CVentanaPizarra::OnClose() 
{
	//stuff i do
	CDialog::OnClose();
}


If i don't use EndDialog, the dialog doesn't close. If i use EndDialog, when i want to open the dialog again, the program crashes.
i don't want to delete the memory, just hide the dialog, or close it in some kind of way. i know it works locally, as when i close with the X, then i can open it again, but not when i receive the message.
I searched in msdn, and it says EndDialog is or modal dialogs. So i tried DestroyWindow. I also tried ShowWindow(SW_HIDE) but it doen't work as well.
I'd really appreciate any kind of help you could give me.
Thanks in advance!
GeneralRe: remotely closing a modeless dialog Pin
Johan Rosengren30-Jun-04 8:58
Johan Rosengren30-Jun-04 8:58 
GeneralRe: remotely closing a modeless dialog Pin
User 665830-Jun-04 9:26
User 665830-Jun-04 9:26 
QuestionInserting MUCH data using DataSet and DataAdapter? Pin
Anonymous30-Jun-04 6:33
Anonymous30-Jun-04 6:33 
AnswerRe: Inserting MUCH data using DataSet and DataAdapter? Pin
Anonymous30-Jun-04 6:34
Anonymous30-Jun-04 6:34 
GeneralOpen default application for associated file Pin
ness41630-Jun-04 6:19
ness41630-Jun-04 6:19 
GeneralRe: Open default application for associated file Pin
palbano30-Jun-04 6:37
palbano30-Jun-04 6:37 
GeneralRe: Open default application for associated file Pin
ness41630-Jun-04 7:11
ness41630-Jun-04 7:11 
GeneralRe: Open default application for associated file Pin
palbano30-Jun-04 7:14
palbano30-Jun-04 7:14 
GeneralRe: Open default application for associated file Pin
Blake Miller30-Jun-04 7:34
Blake Miller30-Jun-04 7:34 
GeneralTransparent icons on a toolbar buttons Pin
Daredevil30-Jun-04 6:08
Daredevil30-Jun-04 6:08 
GeneralRe: Transparent icons on a toolbar buttons Pin
GermanGeorge1-Jul-04 2:00
GermanGeorge1-Jul-04 2:00 
GeneralRe: Transparent icons on a toolbar buttons Pin
Elmue16-Oct-09 9:22
Elmue16-Oct-09 9:22 
QuestionRe: Transparent icons on a toolbar buttons Pin
lakshmanguru23-Feb-10 11:40
lakshmanguru23-Feb-10 11:40 
GeneralRe: Transparent icons on a toolbar buttons Pin
Mahadev HK5-Aug-11 2:33
Mahadev HK5-Aug-11 2:33 
QuestionHow to refresh the ActiveX Property Browser? Pin
Daed30-Jun-04 6:01
Daed30-Jun-04 6:01 
GeneralActiveX ListBox Pin
Roger Art30-Jun-04 5:55
sussRoger Art30-Jun-04 5:55 
GeneralRe: ActiveX ListBox Pin
Jaime Stuardo30-Jun-04 7:04
Jaime Stuardo30-Jun-04 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.