PDA

View Full Version : Rollups, spinners & edit boxes...


killah
02-14-2008, 08:24 PM
Hello everybody, I've made a 3DS Studio scene exporter using Max SDK and I'd like to add a GUI in order to let the users adjust some export settings... well, right now I have a simple dialog with only two buttons "Export" and "Cancel", here is the code:

...

INT_PTR CALLBACK DlgProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam);

bool CExporter::ShowOptions( HINSTANCE aHInstance, HWND aHwnd )
{
INT_PTR lResult = DialogBoxParam( aHInstance, MAKEINTRESOURCE(IDD_EXPORTERDLG), aHwnd, DlgProc, (LPARAM)this );

KRM_ASSERT( lResult >= 0 );

return true;
}

INT_PTR CALLBACK CExporter::DlgProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam)
{
static CExporter* lExporter; //class with Exporter implementation

switch(message)
{
case WM_INITDIALOG:
lExporter = (CExporter*)lParam;
return TRUE;
case WM_COMMAND:
switch(LOWORD(wParam))
{
case IDC_BUTTON_EXPORT: EndDialog(hWnd,0); break;
case IDC_BUTTON_CANCEL: EndDialog(hWnd,0); break;
}
break;
case WM_CLOSE:
EndDialog(hWnd,0);
return TRUE;
}

return FALSE;
}

...


I'd like to add a rollup with some spinners linked to their edit boxes in it (just to show numeric values), I've tried It but It doesn't seem to work I can't get the values... can anybody tell me how to do that or show me a simple example?


Thanks a lot!

ypuech
02-14-2008, 09:31 PM
I'd like to add a rollup with some spinners linked to their edit boxes in it (just to show numeric values), I've tried It but It doesn't seem to work I can't get the values... can anybody tell me how to do that or show me a simple example?

Take a look at asciiexp exporter sample of the SDK (maxsdk\samples\import_export\asciiexp); asciiexp.cpp is the source where the UI is setup. Also, "Custom User Interface Controls" page in the SDK help is helpful.

killah
02-19-2008, 05:16 PM
Ok!! thanks a lot, now is working fine!

CGTalk Moderation
02-19-2008, 05:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.