Consolidated GetAncestor() calls again.
This commit is contained in:
parent
095e08bc79
commit
45edacf8ca
|
@ -31,7 +31,7 @@ static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lResult)
|
|||
if (code != BN_CLICKED)
|
||||
return FALSE;
|
||||
|
||||
parent = GetAncestor(b->hwnd, GA_ROOT); // TODO didn't we have a function for this
|
||||
parent = parentToplevel(b->hwnd);
|
||||
rgba.r = b->r;
|
||||
rgba.g = b->g;
|
||||
rgba.b = b->b;
|
||||
|
|
|
@ -20,8 +20,7 @@ static BOOL onWM_COMMAND(uiControl *cc, HWND hwnd, WORD code, LRESULT *lResult)
|
|||
if (code == CBN_SELCHANGE) {
|
||||
// like on OS X, this is sent before the edit has been updated :(
|
||||
// TODO error check
|
||||
// TODO proper function for GetAncestor()
|
||||
PostMessage(GetAncestor(hwnd, GA_PARENT),
|
||||
PostMessage(parentOf(hwnd),
|
||||
WM_COMMAND,
|
||||
MAKEWPARAM(GetWindowLongPtrW(hwnd, GWLP_ID), CBN_EDITCHANGE),
|
||||
(LPARAM) hwnd);
|
||||
|
|
|
@ -41,7 +41,7 @@ static BOOL onWM_COMMAND(uiControl *c, HWND hwnd, WORD code, LRESULT *lResult)
|
|||
if (code != BN_CLICKED)
|
||||
return FALSE;
|
||||
|
||||
parent = GetAncestor(b->hwnd, GA_ROOT); // TODO didn't we have a function for this
|
||||
parent = parentToplevel(b->hwnd);
|
||||
if (showFontDialog(parent, &(b->params))) {
|
||||
updateFontButtonLabel(b);
|
||||
(*(b->onChanged))(b, b->onChangedData);
|
||||
|
|
Loading…
Reference in New Issue