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

C / C++ / MFC

 
QuestionDialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
User 741604622-Dec-10 6:50
User 741604622-Dec-10 6:50 
AnswerRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
Chris Meech22-Dec-10 7:35
Chris Meech22-Dec-10 7:35 
AnswerRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
Richard MacCutchan22-Dec-10 8:58
mveRichard MacCutchan22-Dec-10 8:58 
GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
User 741604622-Dec-10 9:17
User 741604622-Dec-10 9:17 
GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
User 741604622-Dec-10 9:24
User 741604622-Dec-10 9:24 
GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
Richard MacCutchan22-Dec-10 9:44
mveRichard MacCutchan22-Dec-10 9:44 
GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
User 741604622-Dec-10 11:53
User 741604622-Dec-10 11:53 
GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
Roger Broomfield22-Dec-10 14:57
Roger Broomfield22-Dec-10 14:57 
Presuming this part of your code is in the WindowProc for hWndPanelTwo
case WM_DESTROY:
	// Delete the loaded ICON
	if (NULL != hIcon1)
	{
		DestroyIcon(hIcon1);
	}
	hIcon1 = NULL;
	return TRUE;

add this
case WM_APP:
	DestroyWindow(hWnd);
	break;

and modify this as follows
// Update the status text
SetDlgItemText(hWnd, IDC_STATUS, "Update completed.");
// Refresh the window
UpdateWindow(GetDlgItem(hWnd, IDC_STATUS));
// Close current window
PostMessage(hWndPanelTwo,WM_APP,0,0);

GeneralRe: Dialog will update using UpdateWindow(), but won't destroy using DestroyWindow() Pin
Richard MacCutchan22-Dec-10 22:04
mveRichard MacCutchan22-Dec-10 22:04 
QuestionHow to avoid namespace collision. Pin
pandit8422-Dec-10 2:34
pandit8422-Dec-10 2:34 
AnswerRe: How to avoid namespace collision. Pin
Maximilien22-Dec-10 2:53
Maximilien22-Dec-10 2:53 
AnswerRe: How to avoid namespace collision. Pin
Richard MacCutchan22-Dec-10 4:28
mveRichard MacCutchan22-Dec-10 4:28 
AnswerRe: How to avoid namespace collision. Pin
Code-o-mat22-Dec-10 5:31
Code-o-mat22-Dec-10 5:31 
GeneralRe: How to avoid namespace collision. Pin
pandit8423-Dec-10 2:20
pandit8423-Dec-10 2:20 
QuestionWhat are the diffrent ways by which we can access a dll and lib in an .exe Pin
pandit8422-Dec-10 2:24
pandit8422-Dec-10 2:24 
AnswerRe: What are the diffrent ways by which we can access a dll and lib in an .exe Pin
Maximilien22-Dec-10 2:53
Maximilien22-Dec-10 2:53 
GeneralRe: What are the diffrent ways by which we can access a dll and lib in an .exe Pin
pandit8422-Dec-10 2:58
pandit8422-Dec-10 2:58 
GeneralRe: What are the diffrent ways by which we can access a dll and lib in an .exe Pin
Richard MacCutchan22-Dec-10 4:30
mveRichard MacCutchan22-Dec-10 4:30 
GeneralRe: What are the diffrent ways by which we can access a dll and lib in an .exe Pin
pandit8423-Dec-10 2:20
pandit8423-Dec-10 2:20 
QuestionAPI to get special path Pin
David Crow21-Dec-10 4:25
David Crow21-Dec-10 4:25 
AnswerRe: API to get special path Pin
Rajesh R Subramanian21-Dec-10 4:56
professionalRajesh R Subramanian21-Dec-10 4:56 
GeneralRe: API to get special path Pin
David Crow21-Dec-10 5:02
David Crow21-Dec-10 5:02 
GeneralRe: API to get special path Pin
Michael Schubert21-Dec-10 7:22
Michael Schubert21-Dec-10 7:22 
GeneralRe: API to get special path + OT Pin
Rajesh R Subramanian21-Dec-10 17:14
professionalRajesh R Subramanian21-Dec-10 17:14 
GeneralRe: API to get special path + OT Pin
Michael Schubert21-Dec-10 21:18
Michael Schubert21-Dec-10 21:18 

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.