comctl32/tests: Change toolbar size test data to load dynamically.
This commit is contained in:
parent
5e97c03e50
commit
551d4077c5
|
@ -682,132 +682,278 @@ typedef struct
|
|||
RECT rcClient;
|
||||
SIZE szMin;
|
||||
INT nButtons;
|
||||
RECT rcButtons[100];
|
||||
RECT *prcButtons;
|
||||
} tbsize_result_t;
|
||||
|
||||
static tbsize_result_t tbsize_results[] =
|
||||
{
|
||||
{ {0, 0, 672, 26}, {100, 22}, 5, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {146, 22}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24}, {100, 2, 123, 24},
|
||||
{ 0, 24, 23, 46},
|
||||
}, },
|
||||
{ {0, 0, 672, 48}, {146, 22}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24}, {100, 2, 123, 24},
|
||||
{ 0, 24, 23, 46},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {146, 22}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24}, {100, 2, 123, 24},
|
||||
{123, 2, 146, 24},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {192, 22}, 9, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24}, {100, 2, 123, 24},
|
||||
{123, 2, 146, 24}, {146, 2, 169, 24}, {169, 2, 192, 24},
|
||||
}, },
|
||||
{ {0, 0, 672, 92}, {882, 22}, 39, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 0, 2, 8, 29},
|
||||
{ 0, 29, 23, 51}, { 23, 29, 46, 51}, { 46, 29, 69, 51},
|
||||
{ 69, 29, 92, 51}, { 92, 29, 115, 51}, {115, 29, 138, 51},
|
||||
{138, 29, 161, 51}, {161, 29, 184, 51}, {184, 29, 207, 51},
|
||||
{207, 29, 230, 51}, {230, 29, 253, 51}, {253, 29, 276, 51},
|
||||
{276, 29, 299, 51}, {299, 29, 322, 51}, {322, 29, 345, 51},
|
||||
{345, 29, 368, 51}, {368, 29, 391, 51}, {391, 29, 414, 51},
|
||||
{414, 29, 437, 51}, {437, 29, 460, 51}, {460, 29, 483, 51},
|
||||
{483, 29, 506, 51}, {506, 29, 529, 51}, {529, 29, 552, 51},
|
||||
{552, 29, 575, 51}, {575, 29, 598, 51}, {598, 29, 621, 51},
|
||||
{621, 29, 644, 51}, {644, 29, 667, 51}, { 0, 51, 23, 73},
|
||||
{ 23, 51, 46, 73}, { 46, 51, 69, 73}, { 69, 51, 92, 73},
|
||||
{ 92, 51, 115, 73}, {115, 51, 138, 73}, {138, 51, 161, 73},
|
||||
}, },
|
||||
{ {0, 0, 48, 226}, {23, 140}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 94, 24},
|
||||
{ 94, 2, 117, 24}, {117, 2, 140, 24}, {140, 2, 163, 24},
|
||||
{ 0, 24, 23, 46},
|
||||
}, },
|
||||
{ {0, 0, 92, 226}, {23, 140}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 0, 24, 92, 32},
|
||||
{ 0, 32, 23, 54}, { 23, 32, 46, 54}, { 46, 32, 69, 54},
|
||||
{ 69, 32, 92, 54},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {194, 30}, 7, {
|
||||
{ 0, 2, 31, 32}, { 31, 2, 62, 32}, { 62, 2, 70, 32},
|
||||
{ 70, 2, 101, 32}, {101, 2, 132, 32}, {132, 2, 163, 32},
|
||||
{ 0, 32, 31, 62},
|
||||
}, },
|
||||
{ {0, 0, 672, 64}, {194, 30}, 7, {
|
||||
{ 0, 2, 31, 32}, { 31, 2, 62, 32}, { 62, 2, 70, 32},
|
||||
{ 70, 2, 101, 32}, {101, 2, 132, 32}, {132, 2, 163, 32},
|
||||
{ 0, 32, 31, 62},
|
||||
}, },
|
||||
{ {0, 0, 672, 64}, {194, 30}, 7, {
|
||||
{ 0, 0, 31, 30}, { 31, 0, 62, 30}, { 62, 0, 70, 30},
|
||||
{ 70, 0, 101, 30}, {101, 0, 132, 30}, {132, 0, 163, 30},
|
||||
{ 0, 30, 31, 60},
|
||||
}, },
|
||||
{ {0, 0, 124, 226}, {31, 188}, 7, {
|
||||
{ 0, 0, 31, 30}, { 31, 0, 62, 30}, { 0, 30, 124, 38},
|
||||
{ 0, 38, 31, 68}, { 31, 38, 62, 68}, { 62, 38, 93, 68},
|
||||
{ 93, 38, 124, 68},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {146, 22}, 7, {
|
||||
{ 0, 2, 23, 24}, { 23, 2, 46, 24}, { 46, 2, 54, 24},
|
||||
{ 54, 2, 77, 24}, { 77, 2, 100, 24}, {100, 2, 123, 24},
|
||||
{123, 2, 146, 24},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {146, 100}, 7, {
|
||||
{ 0, 0, 23, 100}, { 23, 0, 46, 100}, { 46, 0, 54, 100},
|
||||
{ 54, 0, 77, 100}, { 77, 0, 100, 100}, {100, 0, 123, 100},
|
||||
{123, 0, 146, 100},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {215, 100}, 10, {
|
||||
{ 0, 0, 23, 100}, { 23, 0, 46, 100}, { 46, 0, 54, 100},
|
||||
{ 54, 0, 77, 100}, { 77, 0, 100, 100}, {100, 0, 123, 100},
|
||||
{123, 0, 146, 100}, {146, 0, 169, 100}, {169, 0, 192, 100},
|
||||
{192, 0, 215, 100},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {238, 39}, 11, {
|
||||
{ 0, 0, 23, 39}, { 23, 0, 46, 39}, { 46, 0, 54, 39},
|
||||
{ 54, 0, 77, 39}, { 77, 0, 100, 39}, {100, 0, 123, 39},
|
||||
{123, 0, 146, 39}, {146, 0, 169, 39}, {169, 0, 192, 39},
|
||||
{192, 0, 215, 39}, {215, 0, 238, 39},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {238, 22}, 11, {
|
||||
{ 0, 0, 23, 22}, { 23, 0, 46, 22}, { 46, 0, 54, 22},
|
||||
{ 54, 0, 77, 22}, { 77, 0, 100, 22}, {100, 0, 123, 22},
|
||||
{123, 0, 146, 22}, {146, 0, 169, 22}, {169, 0, 192, 22},
|
||||
{192, 0, 215, 22}, {215, 0, 238, 22},
|
||||
}, },
|
||||
{ {0, 0, 672, 26}, {489, 39}, 3, {
|
||||
{ 0, 2, 163, 41}, {163, 2, 330, 41}, {330, 2, 493, 41},
|
||||
}, },
|
||||
{ {0, 0, 672, 104}, {978, 24}, 6, {
|
||||
{ 0, 2, 163, 26}, {163, 2, 326, 26}, {326, 2, 489, 26},
|
||||
{489, 2, 652, 26}, {652, 2, 819, 26}, {819, 2, 850, 26},
|
||||
}, },
|
||||
{ {0, 0, 672, 28}, {978, 38}, 6, {
|
||||
{ 0, 0, 163, 38}, {163, 0, 326, 38}, {326, 0, 489, 38},
|
||||
{489, 0, 652, 38}, {652, 0, 819, 38}, {819, 0, 850, 38},
|
||||
}, },
|
||||
{ {0, 0, 672, 100}, {239, 102}, 3, {
|
||||
{ 0, 2, 100, 102}, {100, 2, 139, 102}, {139, 2, 239, 102},
|
||||
}, },
|
||||
{ {0, 0, 672, 42}, {185, 40}, 3, {
|
||||
{ 0, 2, 75, 40}, {75, 2, 118, 40}, {118, 2, 185, 40},
|
||||
}, },
|
||||
{ {0, 0, 672, 42}, {67, 40}, 1, {
|
||||
{ 0, 2, 67, 40},
|
||||
}, },
|
||||
{ {0, 0, 672, 42}, {67, 41}, 2, {
|
||||
{ 0, 2, 672, 41}, { 0, 41, 672, 80},
|
||||
}, },
|
||||
};
|
||||
tbsize_result_t init_tbsize_result(int nButtonsAlloc, int cleft, int ctop, int cright, int cbottom, int minx, int miny) {
|
||||
tbsize_result_t *temp;
|
||||
|
||||
temp = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(tbsize_result_t));
|
||||
SetRect(&temp->rcClient, cleft, ctop, cright, cbottom);
|
||||
temp->szMin.cx = minx;
|
||||
temp->szMin.cy = miny;
|
||||
temp->nButtons = 0;
|
||||
temp->prcButtons = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, nButtonsAlloc*sizeof(RECT));
|
||||
|
||||
return *temp;
|
||||
}
|
||||
|
||||
void tbsize_addbutton(tbsize_result_t *tbsr, int left, int top, int right, int bottom) {
|
||||
SetRect(&tbsr->prcButtons[tbsr->nButtons], left, top, right, bottom);
|
||||
tbsr->nButtons++;
|
||||
}
|
||||
|
||||
tbsize_result_t *tbsize_results = NULL;
|
||||
|
||||
#define tbsize_results_num 24
|
||||
|
||||
static void init_tbsize_results(void) {
|
||||
|
||||
tbsize_results = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, tbsize_results_num*sizeof(tbsize_result_t));
|
||||
|
||||
tbsize_results[0] = init_tbsize_result(5, 0, 0 ,672 ,26, 100 ,22);
|
||||
tbsize_addbutton(&tbsize_results[0], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[0], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[0], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[0], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[0], 77, 2, 100, 24);
|
||||
|
||||
tbsize_results[1] = init_tbsize_result(7, 0, 0, 672, 26, 146, 22);
|
||||
tbsize_addbutton(&tbsize_results[1], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 77, 2, 100, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 100, 2, 123, 24);
|
||||
tbsize_addbutton(&tbsize_results[1], 0, 24, 23, 46);
|
||||
|
||||
tbsize_results[2] = init_tbsize_result(7, 0, 0, 672, 26, 146, 22);
|
||||
tbsize_addbutton(&tbsize_results[2], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 77, 2, 100, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 100, 2, 123, 24);
|
||||
tbsize_addbutton(&tbsize_results[2], 0, 24, 23, 46);
|
||||
|
||||
tbsize_results[3] = init_tbsize_result(7, 0, 0, 672, 26, 146, 22);
|
||||
tbsize_addbutton(&tbsize_results[3], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 77, 2, 100, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 100, 2, 123, 24);
|
||||
tbsize_addbutton(&tbsize_results[3], 123, 2, 146, 24);
|
||||
|
||||
tbsize_results[4] = init_tbsize_result(9, 0, 0, 672, 26, 192, 22);
|
||||
tbsize_addbutton(&tbsize_results[4], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 77, 2, 100, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 100, 2, 123, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 123, 2, 146, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 146, 2, 169, 24);
|
||||
tbsize_addbutton(&tbsize_results[4], 169, 2, 192, 24);
|
||||
|
||||
tbsize_results[5] = init_tbsize_result(39, 0, 0, 672, 92, 882, 22);
|
||||
tbsize_addbutton(&tbsize_results[5], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[5], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[5], 0, 2, 8, 29);
|
||||
tbsize_addbutton(&tbsize_results[5], 0, 29, 23, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 23, 29, 46, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 46, 29, 69, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 69, 29, 92, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 92, 29, 115, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 115, 29, 138, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 138, 29, 161, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 161, 29, 184, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 184, 29, 207, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 207, 29, 230, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 230, 29, 253, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 253, 29, 276, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 276, 29, 299, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 299, 29, 322, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 322, 29, 345, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 345, 29, 368, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 368, 29, 391, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 391, 29, 414, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 414, 29, 437, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 437, 29, 460, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 460, 29, 483, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 483, 29, 506, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 506, 29, 529, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 529, 29, 552, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 552, 29, 575, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 575, 29, 598, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 598, 29, 621, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 621, 29, 644, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 644, 29, 667, 51);
|
||||
tbsize_addbutton(&tbsize_results[5], 0, 51, 23, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 23, 51, 46, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 46, 51, 69, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 69, 51, 92, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 92, 51, 115, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 115, 51, 138, 73);
|
||||
tbsize_addbutton(&tbsize_results[5], 138, 51, 161, 73);
|
||||
|
||||
tbsize_results[6] = init_tbsize_result(7, 0, 0, 48, 226, 23, 140);
|
||||
tbsize_addbutton(&tbsize_results[6], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 46, 2, 94, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 94, 2, 117, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 117, 2, 140, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 140, 2, 163, 24);
|
||||
tbsize_addbutton(&tbsize_results[6], 0, 24, 23, 46);
|
||||
|
||||
tbsize_results[7] = init_tbsize_result(7, 0, 0, 92, 226, 23, 140);
|
||||
tbsize_addbutton(&tbsize_results[7], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[7], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[7], 0, 24, 92, 32);
|
||||
tbsize_addbutton(&tbsize_results[7], 0, 32, 23, 54);
|
||||
tbsize_addbutton(&tbsize_results[7], 23, 32, 46, 54);
|
||||
tbsize_addbutton(&tbsize_results[7], 46, 32, 69, 54);
|
||||
tbsize_addbutton(&tbsize_results[7], 69, 32, 92, 54);
|
||||
|
||||
tbsize_results[8] = init_tbsize_result(7, 0, 0, 672, 26, 194, 30);
|
||||
tbsize_addbutton(&tbsize_results[8], 0, 2, 31, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 31, 2, 62, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 62, 2, 70, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 70, 2, 101, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 101, 2, 132, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 132, 2, 163, 32);
|
||||
tbsize_addbutton(&tbsize_results[8], 0, 32, 31, 62);
|
||||
|
||||
tbsize_results[9] = init_tbsize_result(7, 0, 0, 672, 64, 194, 30);
|
||||
tbsize_addbutton(&tbsize_results[9], 0, 2, 31, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 31, 2, 62, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 62, 2, 70, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 70, 2, 101, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 101, 2, 132, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 132, 2, 163, 32);
|
||||
tbsize_addbutton(&tbsize_results[9], 0, 32, 31, 62);
|
||||
|
||||
tbsize_results[10] = init_tbsize_result(7, 0, 0, 672, 64, 194, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 0, 0, 31, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 31, 0, 62, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 62, 0, 70, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 70, 0, 101, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 101, 0, 132, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 132, 0, 163, 30);
|
||||
tbsize_addbutton(&tbsize_results[10], 0, 30, 31, 60);
|
||||
|
||||
tbsize_results[11] = init_tbsize_result(7, 0, 0, 124, 226, 31, 188);
|
||||
tbsize_addbutton(&tbsize_results[11], 0, 0, 31, 30);
|
||||
tbsize_addbutton(&tbsize_results[11], 31, 0, 62, 30);
|
||||
tbsize_addbutton(&tbsize_results[11], 0, 30, 124, 38);
|
||||
tbsize_addbutton(&tbsize_results[11], 0, 38, 31, 68);
|
||||
tbsize_addbutton(&tbsize_results[11], 31, 38, 62, 68);
|
||||
tbsize_addbutton(&tbsize_results[11], 62, 38, 93, 68);
|
||||
tbsize_addbutton(&tbsize_results[11], 93, 38, 124, 68);
|
||||
|
||||
tbsize_results[12] = init_tbsize_result(7, 0, 0, 672, 26, 146, 22);
|
||||
tbsize_addbutton(&tbsize_results[12], 0, 2, 23, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 23, 2, 46, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 46, 2, 54, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 54, 2, 77, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 77, 2, 100, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 100, 2, 123, 24);
|
||||
tbsize_addbutton(&tbsize_results[12], 123, 2, 146, 24);
|
||||
|
||||
tbsize_results[13] = init_tbsize_result(7, 0, 0, 672, 26, 146, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 0, 0, 23, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 23, 0, 46, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 46, 0, 54, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 54, 0, 77, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 77, 0, 100, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 100, 0, 123, 100);
|
||||
tbsize_addbutton(&tbsize_results[13], 123, 0, 146, 100);
|
||||
|
||||
tbsize_results[14] = init_tbsize_result(10, 0, 0, 672, 26, 146, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 0, 0, 23, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 23, 0, 46, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 46, 0, 54, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 54, 0, 77, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 77, 0, 100, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 100, 0, 123, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 123, 0, 146, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 146, 0, 169, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 169, 0, 192, 100);
|
||||
tbsize_addbutton(&tbsize_results[14], 192, 0, 215, 100);
|
||||
|
||||
tbsize_results[15] = init_tbsize_result(11, 0, 0, 672, 26, 238, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 0, 0, 23, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 23, 0, 46, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 46, 0, 54, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 54, 0, 77, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 77, 0, 100, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 100, 0, 123, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 123, 0, 146, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 146, 0, 169, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 169, 0, 192, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 192, 0, 215, 39);
|
||||
tbsize_addbutton(&tbsize_results[15], 215, 0, 238, 39);
|
||||
|
||||
tbsize_results[16] = init_tbsize_result(11, 0, 0, 672, 26, 239, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 0, 0, 23, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 23, 0, 46, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 46, 0, 54, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 54, 0, 77, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 77, 0, 100, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 100, 0, 123, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 123, 0, 146, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 146, 0, 169, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 169, 0, 192, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 192, 0, 215, 22);
|
||||
tbsize_addbutton(&tbsize_results[16], 215, 0, 238, 22);
|
||||
|
||||
tbsize_results[17] = init_tbsize_result(3, 0, 0, 672, 26, 489, 39);
|
||||
tbsize_addbutton(&tbsize_results[17], 0, 2, 163, 41);
|
||||
tbsize_addbutton(&tbsize_results[17], 163, 2, 330, 41);
|
||||
tbsize_addbutton(&tbsize_results[17], 330, 2, 493, 41);
|
||||
|
||||
tbsize_results[18] = init_tbsize_result(6, 0, 0, 672, 104, 978, 24);
|
||||
tbsize_addbutton(&tbsize_results[18], 0, 2, 163, 26);
|
||||
tbsize_addbutton(&tbsize_results[18], 163, 2, 326, 26);
|
||||
tbsize_addbutton(&tbsize_results[18], 326, 2, 489, 26);
|
||||
tbsize_addbutton(&tbsize_results[18], 489, 2, 652, 26);
|
||||
tbsize_addbutton(&tbsize_results[18], 652, 2, 819, 26);
|
||||
tbsize_addbutton(&tbsize_results[18], 819, 2, 850, 26);
|
||||
|
||||
tbsize_results[19] = init_tbsize_result(6, 0, 0, 672, 28, 978, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 0, 0, 163, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 163, 0, 326, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 326, 0, 489, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 489, 0, 652, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 652, 0, 819, 38);
|
||||
tbsize_addbutton(&tbsize_results[19], 819, 0, 850, 38);
|
||||
|
||||
tbsize_results[20] = init_tbsize_result(3, 0, 0, 672, 100, 239, 102);
|
||||
tbsize_addbutton(&tbsize_results[20], 0, 2, 100, 102);
|
||||
tbsize_addbutton(&tbsize_results[20], 100, 2, 139, 102);
|
||||
tbsize_addbutton(&tbsize_results[20], 139, 2, 239, 102);
|
||||
|
||||
tbsize_results[21] = init_tbsize_result(3, 0, 0, 672, 42, 185, 40);
|
||||
tbsize_addbutton(&tbsize_results[21], 0, 2, 75, 40);
|
||||
tbsize_addbutton(&tbsize_results[21], 75, 2, 118, 40);
|
||||
tbsize_addbutton(&tbsize_results[21], 118, 2, 185, 40);
|
||||
|
||||
tbsize_results[22] = init_tbsize_result(1, 0, 0, 672, 42, 67, 40);
|
||||
tbsize_addbutton(&tbsize_results[22], 0, 2, 67, 40);
|
||||
|
||||
tbsize_results[23] = init_tbsize_result(2, 0, 0, 672, 42, 67, 41);
|
||||
tbsize_addbutton(&tbsize_results[23], 0, 2, 672, 41);
|
||||
tbsize_addbutton(&tbsize_results[23], 0, 41, 672, 80);
|
||||
}
|
||||
|
||||
static void free_tbsize_results(void) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < tbsize_results_num; i++)
|
||||
HeapFree(GetProcessHeap(), 0, tbsize_results[i].prcButtons);
|
||||
HeapFree(GetProcessHeap(), 0, tbsize_results);
|
||||
tbsize_results = NULL;
|
||||
}
|
||||
|
||||
static int tbsize_numtests = 0;
|
||||
|
||||
|
@ -831,7 +977,6 @@ static int tbsize_alt_numtests = 0;
|
|||
RECT rc; \
|
||||
int buttonCount, i, mask=(todomask); \
|
||||
tbsize_result_t *res = &tbsize_results[tbsize_numtests]; \
|
||||
assert(tbsize_numtests < sizeof(tbsize_results)/sizeof(tbsize_results[0])); \
|
||||
GetClientRect(hToolbar, &rc); \
|
||||
/*check_rect("client", rc, res->rcClient);*/ \
|
||||
buttonCount = SendMessage(hToolbar, TB_BUTTONCOUNT, 0, 0); \
|
||||
|
@ -843,9 +988,9 @@ static int tbsize_alt_numtests = 0;
|
|||
win_skip("Alternate rect found\n"); \
|
||||
tbsize_alt_numtests++; \
|
||||
} else if (!(mask&1)) { \
|
||||
check_rect("button = %d, tbsize_numtests = %d", rc, res->rcButtons[i], i, tbsize_numtests); \
|
||||
check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); \
|
||||
} else {\
|
||||
todo_wine { check_rect("button = %d, tbsize_numtests = %d", rc, res->rcButtons[i], i, tbsize_numtests); } \
|
||||
todo_wine { check_rect("button = %d, tbsize_numtests = %d", rc, res->prcButtons[i], i, tbsize_numtests); } \
|
||||
} \
|
||||
mask >>= 1; \
|
||||
} \
|
||||
|
@ -879,6 +1024,8 @@ static void test_sizes(void)
|
|||
int style;
|
||||
int i;
|
||||
|
||||
init_tbsize_results();
|
||||
|
||||
rebuild_toolbar_with_buttons(&hToolbar);
|
||||
style = GetWindowLong(hToolbar, GWL_STYLE);
|
||||
ok(style == (WS_CHILD|WS_VISIBLE|CCS_TOP), "Invalid style %x\n", style);
|
||||
|
@ -1105,6 +1252,7 @@ static void test_sizes(void)
|
|||
ok(SendMessageA(hToolbar, TB_SETBUTTONINFO, 33, (LPARAM)&tbinfo) != 0, "TB_SETBUTTONINFO failed\n");
|
||||
}
|
||||
|
||||
free_tbsize_results();
|
||||
DestroyWindow(hToolbar);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue