Code:
SetMapMode(hdc, MM_TEXT);
GetClientRect (hWnd, &rect) ;
GetTextMetrics (hdc, &tm) ;
a=0;
y=0;
if(iPartyMemb==0){
MessageBox(hWnd, TEXT("Party is loaded but with no members"), TEXT("Party is loaded with no members"),MB_OK);
}
SelectObject(hdc, GetStockObject(SYSTEM_FONT));
SelectObject(hdc, GetStockObject(WHITE_BRUSH));
SelectObject(hdc, GetStockObject(BLACK_PEN));
a=cxArea/7;
b=tm.tmHeight;
SetRect( &MyLabels.name, rect.left, rect.top, a, rect.top + b);
SetRect( &MyLabels.height, rect.left + a, rect.top, rect.right + (2 * a), b);
SetRect( &MyLabels.weight, rect.left + (2 * a), rect.top, rect.right + (3 * a), b);
SetRect( &MyLabels.drug1, rect.left + (3 * a), rect.top, rect.right + (4 * a), b);
SetRect( &MyLabels.drug2, rect.left + (4 * a), rect.top, rect.right + (5 * a), b);
SetRect( &MyLabels.drug3, rect.left + (5 * a), rect.top, rect.right + (6 * a), b);
SetRect( &MyLabels.symptoms, rect.left + (6 * a), rect.top, rect.right + (7 * a), b);
FrameRect(hdc, &MyLabels.name,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.height,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.weight,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.drug1,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.drug2,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.drug3,(HBRUSH)GetStockObject(BLACK_BRUSH));
FrameRect(hdc, &MyLabels.symptoms,(HBRUSH)GetStockObject(BLACK_BRUSH));
The other thing I wanted to know is how could I make columns sorta similar to how they make them in like excel where I could adjust them and all durring running?