Click here to Skip to main content
15,908,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: drawing on child windows Pin
Johan Rosengren24-May-04 23:27
Johan Rosengren24-May-04 23:27 
GeneralGetTitleBarInfo Pin
TrungHuynh24-May-04 16:51
TrungHuynh24-May-04 16:51 
GeneralRe: GetTitleBarInfo Pin
Michael Dunn24-May-04 17:56
sitebuilderMichael Dunn24-May-04 17:56 
GeneralRe: GetTitleBarInfo Pin
*Dreamz24-May-04 18:46
*Dreamz24-May-04 18:46 
GeneralSTL string case conversion Pin
Indrawati24-May-04 15:52
Indrawati24-May-04 15:52 
GeneralRe: STL string case conversion Pin
Christian Graus24-May-04 17:25
protectorChristian Graus24-May-04 17:25 
GeneralRe: STL string case conversion Pin
Andrew Walker24-May-04 22:27
Andrew Walker24-May-04 22:27 
Generalthreads and modeless dialogs Pin
kfaday24-May-04 15:51
kfaday24-May-04 15:51 
Hello..
i've got a problem with threads and modeless dialogs.
With modal dialogs i had no problems. This is a mfc app(VC++6.0), in the main view, i created a button, and when i clicked on it i created a thread (which opened a dialog), then waited for the user to close the dialog, and delete the thread:

<br />
void CHilosView::OnButton1() <br />
{<br />
	<br />
	hilo = new CThread(); <br />
                delete hilo;<br />
}


when i did the new CThread, it would create the dialog, when the user clicked on the cancel button of the dialog, the dialog would close, then it would get to the delete hilo line and it would be ok.

But now with modeless dialogs my function has become:

<br />
void CHilosView::OnButton1() <br />
{<br />
	<br />
	hilo = new CAccionarHilo();<br />
	hilo->dlg->CThread(130);   (dlg is a dialog, 130 it's id)<br />
	hilo->dlg->ShowWindow(1);<br />
	//delete hilo;<br />
}<br />


and i can't delete the thread there, because i would never be able to see the dialog!!.
So i'd love to be able to call the delete from the new dialog (that is created everytime i press button1 in the main window) 'cancel' button.
i can close the dialog, but i never get to delete the hilo (or thread (it's spanish))

I can't call the delete method as :'hilo' : undeclared identifier, and i can't include the hilosView header in the dialog class, because i include the Cthread file in the hilosView class, and it includes the dialog class.

hope you can help me!!
thanks!!
GeneralRe: threads and modeless dialogs Pin
David Crow25-May-04 2:20
David Crow25-May-04 2:20 
GeneralSerial Communication Problem Pin
mhar24-May-04 15:36
professionalmhar24-May-04 15:36 
GeneralRe: Serial Communication Problem Pin
Kamyar Souri24-May-04 20:02
Kamyar Souri24-May-04 20:02 
Generalsize of a compiled exe Pin
locoone24-May-04 15:33
locoone24-May-04 15:33 
GeneralRe: size of a compiled exe Pin
kfaday24-May-04 15:39
kfaday24-May-04 15:39 
GeneralRe: size of a compiled exe Pin
temp1@vasr.net24-May-04 16:12
susstemp1@vasr.net24-May-04 16:12 
GeneralRe: size of a compiled exe Pin
Maxwell Chen24-May-04 17:58
Maxwell Chen24-May-04 17:58 
GeneralRe: size of a compiled exe Pin
Michael Dunn24-May-04 18:01
sitebuilderMichael Dunn24-May-04 18:01 
GeneralRe: size of a compiled exe Pin
Michael Dunn24-May-04 18:00
sitebuilderMichael Dunn24-May-04 18:00 
GeneralRe: size of a compiled exe Pin
locoone25-May-04 6:42
locoone25-May-04 6:42 
GeneralRe: size of a compiled exe Pin
David Crow25-May-04 2:24
David Crow25-May-04 2:24 
GeneralHooks and Message Blocking Pin
User 1278224-May-04 15:09
User 1278224-May-04 15:09 
GeneralRe: Hooks and Message Blocking Pin
Ryan Binns24-May-04 18:22
Ryan Binns24-May-04 18:22 
GeneralRe: Hooks and Message Blocking Pin
User 1278224-May-04 18:47
User 1278224-May-04 18:47 
GeneralRe: Hooks and Message Blocking Pin
Blake Miller25-May-04 14:53
Blake Miller25-May-04 14:53 
GeneralRe: Hooks and Message Blocking Pin
User 1278225-May-04 15:24
User 1278225-May-04 15:24 
GeneralRe: Hooks and Message Blocking Pin
Blake Miller25-May-04 15:31
Blake Miller25-May-04 15:31 

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.