Sign in to follow this  
SiliconMunky

DialogBox not redrawing

Recommended Posts

I'm trying to get a modal dialog box so I can prompt the user for some options before my program starts. The problem I'm having is that the dialog box is not drawing/refreshing. Here is my dialogproc and call to DialogBox
INT_PTR CALLBACK DialogProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
	switch(Msg)
        {
        case WM_INITDIALOG:
                return TRUE;

        case WM_COMMAND:
                switch(wParam)
                {
                case IDOK:
                        EndDialog(hWndDlg, 0);
                        return TRUE;
                }
                break;
        }
		
	return FALSE;
}

DialogBox(hInst, MAKEINTRESOURCE( IDD_DIALOG1 ), hWnd, DialogProc);
Any tips or ideas on what i'm doing wrong? Thanks for the help to come.

Share this post


Link to post
Share on other sites
Problem is that no error code is returning. The dialog box will appear, or will appear with only its components, but the background won't draw, or if I move it the dialog doesn't get repainted. I can also get parts of the dialog to draw if I move another window over it,

Here's some pictures of what I'm talking about.





Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this