Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Newbie Question...

This topic is 6667 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, Well whenever I call CreateClipper I get an DERR_INVALIDOBJECT error. Could someone tell me whats wrong, here is the code for the create clipper:

LPDIRECTDRAWCLIPPER   lpddclipper; // Clipper LPRGNDATA             clipper; // Pointer to region data that contains header and clip list.       

ddrval = lpDD->CreateClipper(0, &lpddclipper, NULL); 	
//That is where I get the DERR_INVALIDOBJECT

clipper = (LPRGNDATA)malloc(sizeof(RGNDATAHEADER)+1*sizeof(RECT));	
clipper->rdh.dwSize = sizeof(RGNDATAHEADER);	
clipper->rdh.iType = RDH_RECTANGLES;	
clipper->rdh.nCount = 1;	
clipper->rdh.nCount = 1 * sizeof(RECT);	
clipper->rdh.rcBound.top = 0;MessageBox(hwnd, "no dude 1", "", MB_OK);	clipper->rdh.rcBound.left = 0;	
clipper->rdh.rcBound.right = 640;	
clipper->rdh.rcBound.bottom = 480;	
if(FAILED(lpddclipper->SetClipList(clipper, 0))) {		MessageBox(hwnd, "no dude 2", "", MB_OK);	}
if(FAILED(lpDDSBack->SetClipper(lpddclipper))) {		MessageBox(hwnd, "no dude 3", "", MB_OK);	}	free(clipper);        

Well if someone could help me I would like that, Thanks. James, Later

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!