Advanced Question Help on making a pop window like for RMS arm

thanks. Now I got another animation issue. From the start.
The arm will yaw right but no left. If you yaw right then you can yaw left but not from the start


Code:
if (SendDlgItemMessage(hWnd, IDC_SHOULDER_YAWRIGHT, BM_GETSTATE, 0, 0) & BST_PUSHED) {
				sts->CENTERARM1_proc = min(1.0, sts->CENTERARM1_proc + (t1 - t0)*ARM_OPERATING_SPEED);
				sts->SetAnimationArm(sts->anim_CENTERARM1, sts->CENTERARM1_proc);
			}
			else if (SendDlgItemMessage(hWnd, IDC_SHOULDER_YAWLEFT, BM_GETSTATE, 0, 0) & BST_PUSHED) {
				sts->CENTERARM1_proc = max(0.0, sts->CENTERARM1_proc - (t1 - t0)*ARM_OPERATING_SPEED);
				sts->SetAnimationArm(sts->anim_CENTERARM1, sts->CENTERARM1_proc);
			}


Code:
anim_CENTERARM1 = CreateAnimation(0.0);
	CENTERARM1_proc = 0;

In my code the arm to rotate if the Proc when to 1 it was 0 so you could keep rotating. Not sure how to do it with this

---------- Post added 09-07-14 at 08:08 AM ---------- Previous post was 09-06-14 at 07:48 PM ----------

OK. I guess I need to redo the mesh animation. So that proc.5 is the middle. I hate that I can do it outside the dialogue box but not in it.

Another issue. I started modified the design of the box. But can't get the icon not to show:

GROUPBOX "Claw",IDC_STATIC,4,2,102,30
PUSHBUTTON "Open",IDC_WRIST_YAWLEFT,7,13,40,14
PUSHBUTTON "Close",IDC_WRIST_YAWRIGHT,66,15,36,14
GROUPBOX "Wrist",IDC_STATIC,2,35,101,45
PUSHBUTTON "Button1",IDC_WRIST_ROLLRIGHT,23,52,16,14,BS_ICON

I have it set so no icon for that open and close.
https://dl.dropboxusercontent.com/u/71242599/flexcraft2issue.jpg
 
Last edited:
Code:
if (SendDlgItemMessage(hWnd, IDC_SHOULDER_YAWRIGHT, BM_GETSTATE, 0, 0) [B][COLOR="Red"]&[/COLOR][/B] BST_PUSHED)

What type is BST_PUSHED? Are you sure you need a bitwise AND operator here? It doesn't seem to make much sense...
Intuitively, from what code I see, I would assume that BST_PUSHED is of type BOOL, and that you should use && instead... But I can't really tell anything definite from the code presented.
 
I finally got it. Working on another one. But can't figure how to change the size of text?
 
Ran across this issue. I know animation state goes from (0-1). So if I want a wrap around animation I do something like if animation proc>1 then it is 0 and if animation proc<0 then it is 1.
So for a 360 degree animation it would continue to rotate.

BUT in the dialogue box code how to do add that statement?

Code:
		else if (SendDlgItemMessage(hWnd, IDC_JOINT2UP, BM_GETSTATE, 0, 0) & BST_PUSHED) {
				sts->JOINT2_proc = max(0.0, sts->JOINT2_proc - (t1 - t0)*ARM_OPERATING_SPEED);
				sts->SetAnimationArm(sts->anim_JOINT2, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2A, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2B, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2C, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2D, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2E, sts->JOINT2_proc);

			}
			else if (SendDlgItemMessage(hWnd, IDC_JOINT2DOWN, BM_GETSTATE, 0, 0) & BST_PUSHED) {
				sts->JOINT2_proc = min(1.0, sts->JOINT2_proc + (t1 - t0)*ARM_OPERATING_SPEED);
				
				sts->SetAnimationArm(sts->anim_JOINT2, sts->JOINT2_proc);
				sts->SetAnimationArm(sts->anim_JOINT2A, sts->JOINT2_proc);
 
Last edited:
Back
Top