I'm trying to do what I thought would be as straightforward a task as there can be.
All I want to do is set up a bunch of RECT objects to use in a DrawText call.
But for some reason my program crashes, and this crash seems to have to do with assigning values to the RECT structures.
I'm not a C person so I don't use structures too often. And I've only been programming C++ for a few months. So here's the code:
Code:
RECT *rctHeading;
RECT *rctBody;
RECT *rctFooter;
rctHeading->left=0;
rctHeading->top=0;
rctHeading->right=639;
rctHeading->bottom=60;
rctBody->left=40;
rctBody->top=80;
rctBody->right=599;
rctBody->bottom=449;
rctFooter->left=0;
rctFooter->top=460;
rctFooter->right=639;
rctFooter->bottom=479;
When I comment out the assignments the program works fine. What am I doing wrong?