Click here to Skip to main content
15,896,207 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using dsplayer Playing audio and video using DirectShow[^] in which they created dialog box using
C#
g_hDialogWindow = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DLGDSPLAYER), NULL, (DLGPROC)DlgDSPlayerProc);


now i want to create another child dialog box for taking input from user

so i have added another dialog box into resource

and in winmain i added
C++
g_hDialogWindow2 = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_DLGDSPLAYER2), NULL, (DLGPROC)DlgDSPlayerProc2);


but i am able to see only two button ok and cancel , even dialog background is also not visible.
Posted
Comments
nv3 23-Mar-12 5:50am    
I would check two things: (1) Is the syntax of your second dialog resource correct? If you only see two buttons, chances are your dialog resource is wrong. (2) What happens in DlgDSplayerProc2? Did you code that yourself? If yes, I would assume you didn't handle some messages correctly in there.
pranav_30 23-Mar-12 5:57am    
what is wrong in second dialog rsource?
wel i have just added one dialog resource in resource editor which have by default two button ok & cancel

& my DlgDSplayerProc2 is as follows

BOOL CALLBACK DlgDSPlayerProc2(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
bool handled = false;

switch (message)
{
case WM_INITDIALOG:
return TRUE;
}
}

1 solution

Looks like you forgot to return FALSE for all messages that your dialog procedure does not process. So either insert a

return FALSE;


at the end, or insert a

switch (message)
{
  ...
default:
    return FALSE;
}


default case in the switch statement.
 
Share this answer
 
Comments
pranav_30 23-Mar-12 8:46am    
thanksssss :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900