for some reason i cant open a dialog box when i have two slide bars (sliders) in them. if i take them out, the dialog opens just fine but when they are in the DialogBox command returns -1. the code in my rsrc.rc file is as follows
and in my resource.h i have numbers set up as followsCode:CONTROL "Slider1",IDD_SLIDER_MUSIC,"msctls_trackbar32", TBS_AUTOTICKS | TBS_VERT | TBS_BOTH,215,23,29,81 CONTROL "Slider2",IDD_SLIDER_CLUE,"msctls_trackbar32", TBS_AUTOTICKS | TBS_VERT | TBS_BOTH,245,23,29,81
other than that, i just use a normal DialogBox command to call the dialog and it will work if i take them out. as far as sliders go, i know that the limits have to be set and what not but where in a dialog would i set them, my dialog box function is as followsCode:#define IDD_SLIDER_CLUE 204 #define IDD_SLIDER_MUSIC 205
what do i do to fix this?Code:LRESULT CALLBACK ConfigDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_INITDIALOG: return TRUE; case WM_COMMAND: { if (LOWORD(wParam) == IDD_BUTTON_OK) { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break; } case WM_DESTROY: case WM_CLOSE: { EndDialog(hDlg, LOWORD(wParam)); return TRUE; } } return FALSE; }



LinkBack URL
About LinkBacks


