Mercurial > dwindows
comparison win/dw.c @ 1723:d55227360864
Center toolbar-based bitmap buttons on Windows during layout since they
don't automatically center in the packed area.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 14 May 2012 20:32:28 +0000 |
parents | d9849833e535 |
children | 48983a2f839f |
comparison
equal
deleted
inserted
replaced
1722:d9849833e535 | 1723:d55227360864 |
---|---|
1497 { | 1497 { |
1498 /* Handle special case Combobox */ | 1498 /* Handle special case Combobox */ |
1499 MoveWindow(handle, currentx + pad, currenty + pad, | 1499 MoveWindow(handle, currentx + pad, currenty + pad, |
1500 width, height + 400, FALSE); | 1500 width, height + 400, FALSE); |
1501 } | 1501 } |
1502 #ifdef TOOLBAR | |
1503 /* Bitmap Buttons */ | |
1504 else if(_tcsnicmp(tmpbuf, TOOLBARCLASSNAME, _tcslen(TOOLBARCLASSNAME)+1) == 0) | |
1505 { | |
1506 HIMAGELIST imlist = (HIMAGELIST)SendMessage(handle, TB_GETIMAGELIST, 0, 0); | |
1507 int thiswidth = 16, thisheight = 16; | |
1508 | |
1509 if(imlist) | |
1510 ImageList_GetIconSize(imlist, &thiswidth, &thisheight); | |
1511 | |
1512 MoveWindow(handle, thiswidth < width ? currentx + pad + ((width-thiswidth)/2) : currentx + pad, | |
1513 thisheight < height ? currenty + pad + ((height-thisheight)/2) : currenty + pad, | |
1514 thiswidth < width ? thiswidth : width, thisheight < height ? thisheight : height, FALSE); | |
1515 } | |
1516 #endif | |
1502 else if(_tcsnicmp(tmpbuf, UPDOWN_CLASS, _tcslen(UPDOWN_CLASS)+1)==0) | 1517 else if(_tcsnicmp(tmpbuf, UPDOWN_CLASS, _tcslen(UPDOWN_CLASS)+1)==0) |
1503 { | 1518 { |
1504 /* Handle special case Spinbutton */ | 1519 /* Handle special case Spinbutton */ |
1505 ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(handle, GWLP_USERDATA); | 1520 ColorInfo *cinfo = (ColorInfo *)GetWindowLongPtr(handle, GWLP_USERDATA); |
1506 | 1521 |