More Windows uiContainer work.
This commit is contained in:
parent
664d6d7dd0
commit
7b8964d87d
|
@ -5,20 +5,30 @@
|
||||||
|
|
||||||
HWND initialParent;
|
HWND initialParent;
|
||||||
|
|
||||||
struct container {
|
|
||||||
HWND hwnd;
|
|
||||||
intmax_t marginLeft;
|
|
||||||
intmax_t marginTop;
|
|
||||||
intmax_t marginRight;
|
|
||||||
intmax_t marginBottom;
|
|
||||||
};
|
|
||||||
|
|
||||||
static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
uiContainer *c;
|
||||||
|
CREATESTRUCTW *cs = (CREATESTRUCTW *) lParam;
|
||||||
|
|
||||||
|
c = uiContainer(GetWindowLongPtrW(hwnd, GWLP_USERDATA));
|
||||||
|
if (c == NULL)
|
||||||
|
if (uMsg == WM_NCCREATE)
|
||||||
|
SetWindowLongPtrW(hwnd, GWLP_USERDATA, (LONG_PTR) (cs->lpCreateParams));
|
||||||
|
// DO NOT RETURN DEFWINDOWPROC() HERE
|
||||||
|
// see the next block of comments as to why
|
||||||
|
// instead, we simply check if c == NULL again later
|
||||||
|
|
||||||
|
switch (uMsg) {
|
||||||
// these must always be run, even on the initial parent
|
// these must always be run, even on the initial parent
|
||||||
// why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx
|
// why? http://blogs.msdn.com/b/oldnewthing/archive/2010/03/16/9979112.aspx
|
||||||
//TODO switch (uMsg) {
|
// TODO
|
||||||
//TODO }
|
// these are only run if c is not NULL
|
||||||
|
case WM_WINDOWPOSCHANGED:
|
||||||
|
case msgUpdateChild:
|
||||||
|
if (c == NULL)
|
||||||
|
break;
|
||||||
|
; // TODO
|
||||||
|
}
|
||||||
|
|
||||||
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
return DefWindowProcW(hwnd, uMsg, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
@ -52,12 +62,7 @@ const char *initContainer(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO document
|
|
||||||
void uiWindowsMakeContainer(uiContainer *c, const WCHAR *class, BOOL isBin)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void uiMakeContainer(uiContainer *c)
|
void uiMakeContainer(uiContainer *c)
|
||||||
{
|
{
|
||||||
uiWindowsMakeContainer(c, containerClass, FALSE);
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue