Notifications
Clear all
[Closed] Grab Viewport with Multipass Effect?
Page 2 / 2
Prev
Feb 04, 2013 4:48 am
the following code forces max to update but does not reset the viewport making the vp menu hidden after the mxs function call
ViewportButtonMgr.EnableButtons = false;
forceRedraw();
def_visible_primitive(forceRedraw, "forceRedraw");
// usage: <int> forceRedraw()
Value* forceRedraw_cf(Value **arg_list, int count)
{
check_arg_count(forceRedraw, 0, count);
HWND hWnd = GetCOREInterface()->GetMAXHWnd();
RECT rect;
GetWindowRect(hWnd, &rect );
LRESULT res = SendMessage( hWnd , WM_SIZE, 0, ((rect.bottom - rect.top)<<16) | (rect.right - rect.left));
return Integer::intern(rect.bottom - rect.top);
}
1 Reply
no,no,no… that’s the same mistake. you can’t just send WM_SIZE to the window. getting this message the window just knows that it’s a different size now, and starts behave as resized.
for example, getting this message the window doesn’t update its client area.
1 Reply
sorry. it seems like i missed your point. the message that has to do the trick is WM_NCCALCSIZE.
but i couldn’t find the moment and the place to send it.
Feb 07, 2013 12:42 am
it’s pretty academic really as the “max tool maximize” method is quicker and doesn’t mess with the window order either
Page 2 / 2
Prev