I need an example of DXUT used with dialog boxes or someone to correct my code.
The new DirectX 9 and DXUT don't have examples of dialog boxes with Direct3d, instead they are all showing the new built in gui they provide. I would like to use the old gui with my system, but can't find any examples.
The dialog box I made won't even display until I placed the switch for WM_PAINT in the function. Now it displays, but isn't accepting any mouse input to operate any of the buttons.
Here is the code:
LRESULT CALLBACK Picker(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
PAINTSTRUCT ps;
switch (message)
{
case WM_COMMAND:
switch( LOWORD(wParam) )
{
case IDC_OK:
break;
case IDC_CANCEL:
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
break;
}
break;
case WM_PAINT:
hdc = BeginPaint(hDlg, &ps);
// TODO: Add any drawing code here...
EndPaint(hDlg, &ps);
break;
}
return FALSE;
}
this is what is called inside of MsgProc, using the mouse wheel activates my call, the messagebox runs fine, but my dialogbox doesn't:
case WM_MOUSEWHEEL:
MessageBox(NULL,L"createdialog", L"HAHA2", MB_OK);
DialogBox(NULL, (LPCTSTR)IDD_PICKER, hWnd, (DLGPROC)Picker);
break;
Here are the two pics I have, the first is of what a dialog box should look like, and the second is what my dialog box looks like.
pic1
pic2
Any examples or help is appreciated.
- Valles