| 322 | } |
| 323 | |
| 324 | HRESULT CButton_UpdateLayout(CButton* This) |
| 325 | { |
| 326 | if (g_configData.oldBtnHeight) |
| 327 | { |
| 328 | POINT* pt = This->GetPoint(); |
| 329 | SIZE* size = This->GetSize(); |
| 330 | |
| 331 | auto iter = FindWindowFromButton(This); |
| 332 | if (iter == g_cbuttonList.end()) |
| 333 | return g_funCButton_UpdateLayout.call_org(This); |
| 334 | |
| 335 | auto& data = iter->second.buttonList[This].second; |
| 336 | |
| 337 | // 如果宽高为 -1 则表示使用默认尺寸(工具窗口按钮) 不进行修改 |
| 338 | if ((data.right == -1 && data.bottom == -1)) |
| 339 | { |
| 340 | return g_funCButton_UpdateLayout.call_org(This); |
| 341 | } |
| 342 | size->cx = data.right; |
| 343 | size->cy = data.bottom; |
| 344 | |
| 345 | auto ret = g_funCButton_UpdateLayout.call_org(This); |
| 346 | pt->x = data.left; |
| 347 | |
| 348 | return ret; |
| 349 | |
| 350 | } |
| 351 | return g_funCButton_UpdateLayout.call_org(This); |
| 352 | } |
| 353 | |
| 354 | HRESULT CButton_RedrawVisual(CButton* This) |
| 355 | { |
nothing calls this directly
no test coverage detected