Click here to Skip to main content
13,046,562 members (69,834 online)
Click here to Skip to main content


105 bookmarked
Posted 22 Dec 2004

Fast Binary Tree Operations

, 22 Jan 2005
Describes main binary tree operations.
// Anchor.cpp : implementation file

#include "stdafx.h"

#define A_LEFT		1
#define A_TOP		2
#define A_BOTTOM	4
#define A_RIGHT		8

void Anchor(CWnd *pWndParent, UINT ID, DWORD dwAnchor, CSize sizeOld, CSize sizeNew)
	CWnd *pWnd = pWndParent->GetDlgItem(ID);
	CRect rect;
	int nCx =;
	int nCy =;
	if((dwAnchor&A_LEFT) == 0)
		rect.left += nCx;
	if((dwAnchor&A_RIGHT) != 0)
		rect.right += nCx;
	if((dwAnchor&A_TOP) == 0) += nCy;
	if((dwAnchor&A_BOTTOM) != 0)
		rect.bottom += nCy;

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 23 Jan 2005
Article Copyright 2004 by Hatem Mostafa
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid