Click here to Skip to main content
15,890,690 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hi help me to run my codeservice mode Pin
usha_dolly6-Dec-05 1:32
usha_dolly6-Dec-05 1:32 
GeneralRe: Hi help me to run my codeservice mode Pin
kakan6-Dec-05 2:09
professionalkakan6-Dec-05 2:09 
GeneralRe: Hi help me to run my codeservice mode Pin
ThatsAlok6-Dec-05 2:34
ThatsAlok6-Dec-05 2:34 
GeneralRe: Hi help me to run my codeservice mode Pin
kakan6-Dec-05 2:57
professionalkakan6-Dec-05 2:57 
Questionrvice modehi help me Pin
usha_dolly6-Dec-05 0:25
usha_dolly6-Dec-05 0:25 
AnswerRe: rvice modehi help me Pin
ThatsAlok6-Dec-05 0:43
ThatsAlok6-Dec-05 0:43 
AnswerRe: rvice modehi help me Pin
toxcct6-Dec-05 2:14
toxcct6-Dec-05 2:14 
QuestionProblems with destroying a dialog box Pin
caykahve6-Dec-05 0:24
caykahve6-Dec-05 0:24 
I create another dialog box from my main dialog box. I want to show it and remove it when i want, without the user's will. I call the show function and the remove function from different places, and 90% I am able to remove it. For the other 10% I tried calling DestroyWindow() to remove, or calling it in the class destructor. I also tried overriding PostNcDestroy() and calling CDialog::PostNcDestroy() inside, etc. OnDestroy(), PostNcDestroy() and OnNcDestroy() are called respectively, but I keep seeing the dialog box, it is not removed. Can someone please help me? How can I destroy it properly?

Thanks in advance

To show:
pOtherBox = new COtherBox();<br />
BOOL ret = pOtherBox->Create(IDD_OTHERBOX, this);<br />
<br />
pOtherBox->SetWindowPos(&this->wndTopMost,<br />
      left,top,width,height,<br />
      SWP_NOREPOSITION|SWP_NOSENDCHANGING|SWP_NOACTIVATE|SWP_SHOWWINDOW);


To remove:
if(pOtherBox!=NULL)<br />
{<br />
   delete pOtherBox;<br />
   //pOtherBox->DestroyWindow(); //also tried instead of delete<br />
   pOtherBox = NULL;<br />
}

AnswerRe: Problems with destroying a dialog box Pin
David Crow6-Dec-05 4:09
David Crow6-Dec-05 4:09 
Questionhow to get window handle pls Pin
shadrach_india5-Dec-05 23:54
shadrach_india5-Dec-05 23:54 
AnswerRe: how to get window handle pls Pin
ThatsAlok6-Dec-05 0:54
ThatsAlok6-Dec-05 0:54 
AnswerRe: how to get window handle pls Pin
Rajesh R Subramanian6-Dec-05 1:30
professionalRajesh R Subramanian6-Dec-05 1:30 
QuestionReading text file using ifstream Pin
grero5-Dec-05 23:43
grero5-Dec-05 23:43 
AnswerRe: Reading text file using ifstream Pin
toxcct5-Dec-05 23:56
toxcct5-Dec-05 23:56 
GeneralRe: Reading text file using ifstream Pin
grero6-Dec-05 0:12
grero6-Dec-05 0:12 
GeneralRe: Reading text file using ifstream Pin
toxcct6-Dec-05 1:10
toxcct6-Dec-05 1:10 
GeneralRe: Reading text file using ifstream Pin
grero6-Dec-05 1:29
grero6-Dec-05 1:29 
AnswerRe: Reading text file using ifstream Pin
kakan6-Dec-05 0:02
professionalkakan6-Dec-05 0:02 
AnswerRe: Reading text file using ifstream Pin
S. Senthil Kumar6-Dec-05 4:10
S. Senthil Kumar6-Dec-05 4:10 
GeneralRe: Reading text file using ifstream Pin
grero6-Dec-05 8:28
grero6-Dec-05 8:28 
Questionmmx vs. floating point Pin
9ine5-Dec-05 23:38
9ine5-Dec-05 23:38 
AnswerRe: mmx vs. floating point Pin
Chris Losinger6-Dec-05 2:11
professionalChris Losinger6-Dec-05 2:11 
GeneralRe: mmx vs. floating point Pin
9ine6-Dec-05 3:02
9ine6-Dec-05 3:02 
GeneralRe: mmx vs. floating point Pin
Chris Losinger6-Dec-05 4:03
professionalChris Losinger6-Dec-05 4:03 
GeneralRe: mmx vs. floating point Pin
9ine7-Dec-05 3:40
9ine7-Dec-05 3:40 

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.