MCPcopy Create free account
hub / github.com/Maplespe/DWMBlurGlass / CButton_UpdateLayout

Function CButton_UpdateLayout

DWMBlurGlassExt/Section/CustomButton.cpp:324–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

FindWindowFromButtonFunction · 0.85
GetPointMethod · 0.80
GetSizeMethod · 0.80
endMethod · 0.45
call_orgMethod · 0.45

Tested by

no test coverage detected