/************** This file holds the child window procedure. It will bild the child windows that will each display tree members. __________________ |A|B|C|So on... __________________ **************/ // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ // ++++++++++++++++++ BEGIN ChildWndProc PROCEDURE +++++++++++++++++++++++++++ #include "WinTree.h" // WinTree1.h is 'ifndef' so wont be multipled defind LRESULT CALLBACK ChildWndProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { HDC hdc ; HWND hwndParent ; PAINTSTRUCT ps ; RECT rect ; static TCHAR szBuffer[128] ; static int x = -1 ; int y ; if(x >= ciNodeCount ) x = -1 ; TCHAR *szAlph[ciNodeCount][2]={{L"A\0",L"N\0"},{L"B\0",L"N\0"},{L"C\0",L"N\0"},{L"D\0",L"N\0"},{L"E\0",L"N\0"},{L"F\0",L"N\0"}, {L"G\0",L"N\0"},{L"H\0",L"N\0"},{L"I\0",L"N\0"},{L"J\0",L"N\0"},{L"K\0",L"N\0"},{L"L\0",L"N\0"},{L"M\0",L"N\0"},{L"N\0",L"N\0"}, {L"O\0",L"N\0"},{L"P\0",L"N\0"},{L"Q\0",L"N\0"},{L"R\0",L"N\0"},{L"S\0",L"N\0"},{L"T\0",L"N\0"},{L"U\0",L"N\0"},{L"V\0",L"N\0"}, {L"W\0",L"N\0"},{L"X\0",L"N\0"},{L"Y\0",L"N\0"},{L"Z\0",L"N\0"},{L"a\0",L"N\0"},{L"b\0",L"N\0"},{L"c\0",L"N\0"},{L"d\0",L"N\0"}, {L"e\0",L"N\0"},{L"f\0",L"N\0"},{L"g\0",L"N\0"},{L"h\0",L"N\0"},{L"i\0",L"N\0"},{L"j\0",L"N\0"},{L"k\0",L"N\0"},{L"l\0",L"N\0"}, {L"m\0",L"N\0"},{L"n\0",L"N\0"},{L"o\0",L"N\0"},{L"p\0",L"N\0"},{L"q\0",L"N\0"},{L"r\0",L"N\0"},{L"s\0",L"N\0"},{L"t\0",L"N\0"}, {L"u\0",L"N\0"},{L"v\0",L"N\0"},{L"w\0",L"N\0"},{L"x\0",L"N\0"},{L"y\0",L"N\0"},{L"z\0",L"N\0"}}; // iUnique[ciNodeCount][icRows] is a globle in WinTree.h switch (message) { case WM_CREATE : SetWindowLong (hwnd, 0, 0) ; // on/off flag ++x; iUnique[x][0] = (unsigned long) hwnd ; // iUnique is a globle. See WinTree.h iUnique[x][1] = 1 ; return 0 ; case WM_LBUTTONDOWN : hwndParent = GetParent (hwnd) ; for(y=0; y