Skip to main content
GameDev.net gamedev.net
🔒 Locked

Window Clipper Problems....

Started by CoiN Feb 24, 2003 at 1:38 PM 0 replies 200+ views
Original Post
CoiN
CoiN
Lo All, This piece of code for clipping a window is crashing my program, has anyone got any ideas whats wrong with it?
  
// Set Window Clipping

LPDIRECTDRAWCLIPPER DDraw_Clip_Window(LPDIRECTDRAW7 lpdd, LPDIRECTDRAWSURFACE7 lpddsprimary, HWND main_window_handle)

{
	LPDIRECTDRAWCLIPPER lpddclipperwin;

	// Create the window clipper

	if (FAILED(lpdd->CreateClipper(0,&lpddclipperwin,NULL)))
		return NULL;
	// Set the dimensions of the window to clipperwin

	if (FAILED(lpddclipperwin->SetHWnd(0, main_window_handle)))
		return NULL;
	// Set the Clipper

	if (FAILED(lpddsprimary->SetClipper(lpddclipperwin)))
		return NULL;

	return lpddclipperwin;
}
  
Thanks in Advance... CoiN [edited by - CoiN on February 24, 2003 3:21:32 PM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.