/************** 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 ; TCHAR szBuffer[2] ; static int x = -1 ; int y ; if(x >= ciNodeCount ) x = -1 ; TCHAR *szAlph[ciNodeCount][2]={{"A\0","N\0"},{"B\0","N\0"},{"C\0","N\0"},{"D\0","N\0"},{"E\0","N\0"},{"F\0","N\0"}, {"G\0","N\0"},{"H\0","N\0"},{"I\0","N\0"},{"J\0","N\0"},{"K\0","N\0"},{"L\0","N\0"},{"M\0","N\0"},{"N\0","N\0"}, {"O\0","N\0"},{"P\0","N\0"},{"Q\0","N\0"},{"R\0","N\0"},{"S\0","N\0"},{"T\0","N\0"},{"U\0","N\0"},{"V\0","N\0"}, {"W\0","N\0"},{"X\0","N\0"},{"Y\0","N\0"},{"Z\0","N\0"},{"a\0","N\0"},{"b\0","N\0"},{"c\0","N\0"},{"d\0","N\0"}, {"e\0","N\0"},{"f\0","N\0"},{"g\0","N\0"},{"h\0","N\0"},{"i\0","N\0"},{"j\0","N\0"},{"k\0","N\0"},{"l\0","N\0"}, {"m\0","N\0"},{"n\0","N\0"},{"o\0","N\0"},{"p\0","N\0"},{"q\0","N\0"},{"r\0","N\0"},{"s\0","N\0"},{"t\0","N\0"}, {"u\0","N\0"},{"v\0","N\0"},{"w\0","N\0"},{"x\0","N\0"},{"y\0","N\0"},{"z\0","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