Click here to Skip to main content
15,891,253 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 11:28
jonsey298473-Mar-08 11:28 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 11:38
Mark Salsbery3-Mar-08 11:38 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 11:56
jonsey298473-Mar-08 11:56 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 12:05
Mark Salsbery3-Mar-08 12:05 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 13:32
jonsey298473-Mar-08 13:32 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 14:02
Mark Salsbery3-Mar-08 14:02 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
jonsey298473-Mar-08 15:00
jonsey298473-Mar-08 15:00 
GeneralRe: Using multiple Dialogs withing a Dialog application Pin
Mark Salsbery3-Mar-08 20:53
Mark Salsbery3-Mar-08 20:53 
jonsey29847 wrote:
I couldn't use AfxGetInstanceHandle() as I am not using MFC


i figured you weren't using MFC - I just wanted to post the code verbatim.

jonsey29847 wrote:
So it seems to me that removing the static declaration and using the DestroyWindow function made it happen. Can you explain why?


Beats me!  A function outside a class is already static so I knew that keyword wasn't necessary,
and DestroyWindow() is the correct function to destroy a modeless dialog (EndDialog() is for modal dialogs).
I also removed the DLGPROC cast - it shouldn't be needed, and if it was needed, that would indicate
something wrong with the function prototype.

I'm not sure why the dialog didn't draw correctly before though Smile | :)

Cheers,
Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralAdding items to the 'right-click'(title-bar) context menu of any application Pin
neil47813-Mar-08 8:50
neil47813-Mar-08 8:50 
GeneralRe: Adding items to the 'right-click'(title-bar) context menu of any application Pin
Mark Salsbery3-Mar-08 10:06
Mark Salsbery3-Mar-08 10:06 
QuestionAbout how many weeks are needed for a Simplified Version of Skype? Pin
eroy4u3-Mar-08 7:18
eroy4u3-Mar-08 7:18 
AnswerRe: About how many weeks are needed for a Simplified Version of Skype? Pin
led mike3-Mar-08 7:53
led mike3-Mar-08 7:53 
GeneralRe: About how many weeks are needed for a Simplified Version of Skype? Pin
Mark Salsbery3-Mar-08 9:29
Mark Salsbery3-Mar-08 9:29 
AnswerRe: About how many weeks are needed for a Simplified Version of Skype? Pin
David Crow3-Mar-08 10:23
David Crow3-Mar-08 10:23 
GeneralCall CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 4:39
ptr_Electron3-Mar-08 4:39 
GeneralRe: Call CMainFrame methold from dialog Pin
Randor 3-Mar-08 4:46
professional Randor 3-Mar-08 4:46 
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 22:12
ptr_Electron3-Mar-08 22:12 
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 22:52
ptr_Electron3-Mar-08 22:52 
GeneralRe: Call CMainFrame methold from dialog Pin
Randor 4-Mar-08 3:59
professional Randor 4-Mar-08 3:59 
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron4-Mar-08 5:16
ptr_Electron4-Mar-08 5:16 
GeneralCursor Pointers Pin
duta3-Mar-08 4:24
duta3-Mar-08 4:24 
GeneralRe: Cursor Pointers Pin
Mark Salsbery3-Mar-08 6:11
Mark Salsbery3-Mar-08 6:11 
GeneralCreating a graphic control within a DLL Pin
ilgale3-Mar-08 3:07
ilgale3-Mar-08 3:07 
GeneralRe: Creating a graphic control within a DLL Pin
CPallini3-Mar-08 3:23
mveCPallini3-Mar-08 3:23 
GeneralDebugBreak continue issue Pin
George_George3-Mar-08 2:58
George_George3-Mar-08 2:58 

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.