[Herecast-commit] herecast/src/Subscribe subscribe.cpp,1.2,1.3
Status: Beta
Brought to you by:
mdpaciga
|
From: Mark P. <mdp...@us...> - 2005-07-21 19:56:46
|
Update of /cvsroot/herecast/herecast/src/Subscribe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17441/src/Subscribe Modified Files: subscribe.cpp Log Message: the today item now creates a hidden top-level window with class name "Herecast", just like the XP version. This also supports the new API, and will own the update timer (also like the XP version) Index: subscribe.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/Subscribe/subscribe.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** subscribe.cpp 24 Nov 2004 21:27:57 -0000 1.2 --- subscribe.cpp 21 Jul 2005 19:52:42 -0000 1.3 *************** *** 78,130 **** - HWND FindChildWindow(HWND hWnd, LPTSTR lpTargetClass) - { - TCHAR thisClass[64]; - HWND hChild = GetWindow(hWnd, GW_CHILD | GW_HWNDFIRST); - - // first check the immediate children - - while (hChild) { - GetClassName(hChild, thisClass, 64); - if (!wcscmp(thisClass, lpTargetClass)) { - return hChild; - } - hChild = GetWindow(hChild, GW_HWNDNEXT); - } - - - // if it's not one of the immediate children, recursively check each child - - HWND hChildResult; - hChild = GetWindow(hWnd, GW_CHILD | GW_HWNDFIRST); - while (hChild) { - hChildResult = FindChildWindow(hChild, lpTargetClass); - if (hChildResult) { - return hChildResult; - } - hChild = GetWindow(hChild, GW_HWNDNEXT); - } - - return NULL; - } - - void NotifyTodayItem() { ! // first, find the today screen ! ! HWND hWnd = FindWindow(TEXT("DesktopExplorerWindow"), NULL); ! if (!hWnd) { ! MessageBox(0, L"Internal error: Can't find the desktop.", L"Subscription Error", 0); ! return; ! } ! ! ! // try to find the today item window (a child of the today screen) ! hWnd = FindChildWindow(hWnd, TEXT("dlgHerecastTodayItemClass")); ! // if the today item was found, send it a message if (hWnd) { --- 78,89 ---- void NotifyTodayItem() { ! // find the Herecast window ! HWND hWnd = FindWindow(TEXT("Herecast"), NULL); ! // if it was found, send it a message if (hWnd) { |