52 MaxInterface (maxinterface),
55 ParentWnd (parent_wnd)
81 ParentWnd, Real_Message_Proc, (LPARAM)
this);
92AnimationCompressionSettingsDialogClass::Real_Message_Proc
106 if (message == WM_INITDIALOG) {
108 dialog_obj->Wnd = wnd;
109 ::SetProp (wnd,
"DIALOG_OBJ", (HANDLE)dialog_obj);
118 if (dialog_obj !=
NULL) {
119 retval = dialog_obj->Message_Proc (message, wparam, lparam);
125 if (message == WM_DESTROY) {
126 ::RemoveProp (wnd,
"DIALOG_OBJ");
139AnimationCompressionSettingsDialogClass::Message_Proc
155 RECT parent_rect = { 0 };
157 ::GetWindowRect (ParentWnd, &parent_rect);
158 ::GetWindowRect (Wnd, &rect);
159 int width = parent_rect.right - parent_rect.left;
160 int height = parent_rect.bottom - parent_rect.top;
161 ::SetWindowPos ( Wnd,
NULL,
162 parent_rect.left + (width / 2) - ((rect.right - rect.left) / 2),
163 parent_rect.top + (height / 2) - ((rect.bottom - rect.top) / 2),
164 0, 0, SWP_NOZORDER | SWP_NOSIZE);
169 Initialize_Controls ();
175 switch (LOWORD (wparam))
178 EndDialog (Wnd, IDCANCEL);
183 EndDialog (Wnd, IDOK);
200AnimationCompressionSettingsDialogClass::Initialize_Controls (
void)
203 char string[128] = { 0 };
209 for (
int index = 1; index < 100; index ++) {
210 sprintf (
string,
"%d", index);
211 ComboBox_AddString (percent_combo,
string);
218 ComboBox_AddString (flavor_combo,
"TimeCoded");
219 ComboBox_AddString (flavor_combo,
"Adaptive Delta");
224 if ((Options->ReduceAnimationPercent < 1) || (Options->ReduceAnimationPercent > 99)) {
225 Options->ReduceAnimationPercent = 50;
229 if ((Options->CompressAnimationFlavor < 0) || (Options->CompressAnimationFlavor >=
ANIM_FLAVOR_VALID)) {
230 Options->CompressAnimationFlavor = 0;
236 ComboBox_SetCurSel (percent_combo, Options->ReduceAnimationPercent - 1);
237 ComboBox_SetCurSel (flavor_combo, Options->CompressAnimationFlavor);
242 ::sprintf (
string,
"%f", Options->CompressAnimationTranslationError);
245 ::sprintf (
string,
"%f", Options->CompressAnimationRotationError);
257AnimationCompressionSettingsDialogClass::Save_Settings (
void)
263 Options->CompressAnimationFlavor = flavor;
274 Options->ReduceAnimationPercent = reduce_percent;
281 float trans_error = ::atof (
string);
282 Options->CompressAnimationTranslationError = trans_error;
288 float rot_error = ::atof (
string);
289 Options->CompressAnimationRotationError = rot_error;
AnimationCompressionSettingsDialogClass(Interface *maxinterface, HWND parent_wnd=NULL)
~AnimationCompressionSettingsDialogClass(void)