I'm going to need some proof

why the current system won't work with Jose's code when it seems to work just fine with everything else.

Further to this comment, I can not find min or max used anywhere in the latest AfxWin.inc.

max was used in AfxSetWindowClientSize but no longer is it utilized in the latest version of AfxWin.inc. In my adaption of AfxSetWindowClientSize for BCX, instead of using max, I at first used the following

FPRINT FP_WRITE, " long x = max((GetSystemMetrics(SM_CXSCREEN) - w) / 2, 0);"

FPRINT FP_WRITE, " long y = max((GetSystemMetrics(SM_CYSCREEN) - h) / 2, 0);"

but then found that the Embarcadero compilers did not have min/max, so, instead, I used this

FPRINT FP_WRITE, " long x = (GetSystemMetrics(SM_CXSCREEN) - w) / 2;"

FPRINT FP_WRITE, " if(x<0 )"

FPRINT FP_WRITE, " {"

FPRINT FP_WRITE, " x=0;"

FPRINT FP_WRITE, " }"

FPRINT FP_WRITE, " long y = (GetSystemMetrics(SM_CYSCREEN) - h) / 2;"

FPRINT FP_WRITE, " if(y<0 )"

FPRINT FP_WRITE, " {"

FPRINT FP_WRITE, " y=0;"

FPRINT FP_WRITE, " }"

I never did understand what the max was for but anyway Jose has thrown it out.

min max in C++ is a total P.I.A. because of the strict type checking.

I think it should be left up to the programmer to implement their own version of min/ max.

You wanna do it? Go ahead but keep your hands off my BCX. Don't you touch my MIN MAX !

Here's some hints for the C++ crowd.

inline

int min(int const x, int const y)

{

return y < x ? y : x;

}

inline

unsigned minu(unsigned const x, unsigned const y)

{

return y < x ? y : x;

}

inline

long minl(long const x, long const y)

{

return y < x ? y : x;

}

inline

unsigned long minul(unsigned long const x, unsigned long const y)

{

return y < x ? y : x;

}

inline

long long minll(long long const x, long long const y)

{

return y < x ? y : x;

}

inline

unsigned long long minull(unsigned long long const x, unsigned long long const y)

{

return y < x ? y : x;

}

inline

float minf(float const x, float const y)

{

return y < x ? y : x;

}

inline

double mind(double const x, double const y)

{

return y < x ? y : x;

}

inline

long double minld(long double const x, long double const y)

{

return y < x ? y : x;

}

#define MIN(X, Y) (_Generic((X) + (Y), \

int: min, \

unsigned: minu, \

long: minl, \

unsigned long: minul, \

long long: minll, \

unsigned long long: minull, \

float: minf, \

double: mind, \

long double: minld)((X), (Y)))