[Herecast-commit] herecast/src/TodayItem whereami.cpp,1.7,1.8
Status: Beta
Brought to you by:
mdpaciga
|
From: Mark P. <mdp...@us...> - 2005-07-24 18:22:02
|
Update of /cvsroot/herecast/herecast/src/TodayItem In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14378/src/TodayItem Modified Files: whereami.cpp Log Message: adjusting InitializeCustomItem so it conforms to the requirements listed on MSDN Index: whereami.cpp =================================================================== RCS file: /cvsroot/herecast/herecast/src/TodayItem/whereami.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** whereami.cpp 21 Jul 2005 19:52:43 -0000 1.7 --- whereami.cpp 24 Jul 2005 18:21:54 -0000 1.8 *************** *** 421,424 **** --- 421,429 ---- HWND InitializeCustomItem(TODAYLISTITEM *ptli, HWND hwndParent) { + // docs say to do this (we didn't for the longest time) + if (!ptli->fEnabled) { + return NULL; + } + LPCTSTR className = TEXT("dlgHerecastTodayItemClass"); //LPCTSTR className=(LPCTSTR)LoadString(g_hInst2,IDS_TODAY_WINDOWCLASS,0,0); *************** *** 442,445 **** --- 447,456 ---- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, g_hInst2, NULL); + if (!g_hWndDummy) { + DestroyWindow(g_hWnd); + g_hWnd = NULL; + return NULL; + } + ShowWindow(g_hWndDummy, SW_HIDE); //this window is never actually shown UpdateWindow(g_hWndDummy); |