I'm an oldie with VB, but a newbie at VC++. I have an app in VB, which I want to do the graphics in a faster language, such as VC++. I've written the function out and I get 1 warning when I compile it, and it says the thingy isn't initialised. Here's the function (RGBVal is just another function which I made so I could customise it):

Code:
DLLExport long XTitle( HDC DestDC, long Width)
{
	int X;
	HGDIOBJ OldColour;
	HBRUSH Colour;
	POINT *PrevPoints;

	Colour = CreateSolidBrush ( 0 );
	OldColour = SelectObject ( DestDC, Colour );

	for (X = 0; X < 21; X++)
	{
		Colour = CreateSolidBrush ( RGBVal(0, X / 20 * 128, X / 20 * 255) );
		DeleteObject ( SelectObject ( DestDC, Colour ) );
		MoveToEx ( DestDC, X, 0, PrevPoints );
		LineTo ( DestDC, X, Width );
	}
	for (X = 0; X < 6; X++)
	{
		Colour = CreateSolidBrush ( RGBVal(0, X / 5 * 128, X / 5 * 255) );
		DeleteObject ( SelectObject ( DestDC, Colour ) );
		MoveToEx ( DestDC, X, 0, PrevPoints );
		LineTo ( DestDC, X, Width );
	}
	DeleteObject ( SelectObject( DestDC, OldColour ) );

	return 1;
}
It says PrevPoints isn't initiallised. I ignored it and tried to use that function in VB, but it crashes VB and says that it can't "write" (quotes included) to 0xcccccccc.

If what I'm doing is completely wrong, don't laugh! I'm relatively new to VC and not sure how it works.