Changeset 360 for trunk/hlpmgr/helpinstance.c
- Timestamp:
- Jun 18, 2009, 8:55:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hlpmgr/helpinstance.c
r26 r360 17 17 if ( ! pHelpInstance -> FViewerStarted ) 18 18 { 19 // get focus frame 19 // get focus frame 20 20 FocusFrame = GetTopLevelWindow( WinQueryFocus( HWND_DESKTOP ) ); 21 21 // associate viewer with that. … … 77 77 mp2 ); 78 78 if ( ok ) 79 LogEvent( " Posted OK" ); 79 LogEvent( " Posted OK" ); 80 80 else 81 81 LogEvent( " WinPostMsg failed" ); … … 86 86 //-------------------------------------------------------------------------------- 87 87 void PostQueuedViewerMessages( TPHelpInstance pHelpInstance ) 88 { 88 { 89 89 int i; 90 90 TQueuedViewerMessage ViewerMessage; … … 119 119 //-------------------------------------------------------------------------------- 120 120 121 // Add the given window to the list of associated 121 // Add the given window to the list of associated 122 122 // windows for this help instance 123 123 //-------------------------------------------------------------------------------- … … 129 129 pHelpInstance ); 130 130 131 if ( IsWindowAssociated( pHelpInstance, hwnd ) ) 132 { 131 if ( IsWindowAssociated( pHelpInstance, hwnd ) ) 132 { 133 133 LogEvent( "Already associated" ); 134 134 return; … … 151 151 152 152 // see if it will fit. 153 if ( pHelpInstance -> FNumApplicationWindows 153 if ( pHelpInstance -> FNumApplicationWindows 154 154 >= pHelpInstance -> FMaxApplicationWindows ) 155 155 { … … 160 160 else 161 161 // double space 162 pHelpInstance -> FMaxApplicationWindows *= 2; 162 pHelpInstance -> FMaxApplicationWindows *= 2; 163 163 164 164 LogEvent( "AssociateWIndow: allocating list space to %d", … … 166 166 167 167 // reallocate memory. 168 pHelpInstance -> FApplicationWindows 169 = (HWND*) realloc( pHelpInstance -> FApplicationWindows, 170 pHelpInstance -> FMaxApplicationWindows 168 pHelpInstance -> FApplicationWindows 169 = (HWND*) realloc( pHelpInstance -> FApplicationWindows, 170 pHelpInstance -> FMaxApplicationWindows 171 171 * sizeof( HWND ) ); 172 172 } 173 173 174 174 pHelpInstance -> 175 175 FApplicationWindows[ pHelpInstance -> FNumApplicationWindows ] … … 180 180 LogEvent( "AssociateWindow: Now have %d windows associated", 181 181 pHelpInstance -> FNumApplicationWindows ); 182 } 183 184 // Removes the given window from the list of associated 182 } 183 184 // Removes the given window from the list of associated 185 185 // windows for this help instance (if present) 186 186 //-------------------------------------------------------------------------------- … … 199 199 j = i; 200 200 while( j < pHelpInstance -> FNumApplicationWindows - 1 ) 201 { 201 { 202 202 pHelpInstance -> FApplicationWindows[ j ] 203 203 = pHelpInstance -> FApplicationWindows[ j + 1 ]; … … 245 245 ulMagicNumber = WinQueryWindowULong( hwnd, QWL_HELPINSTANCEMAGICNUMBER ); 246 246 247 if ( ulMagicNumber != HELPINSTANCEMAGICNUMBER ) 247 if ( ulMagicNumber != HELPINSTANCEMAGICNUMBER ) 248 248 return NULL; 249 249 … … 263 263 // free copy of resource 264 264 FreeHelpTable( & ( pHelpInstance -> pHelpTable ) ); 265 } 265 } 266 266 267 267 //-------------------------------------------------------------------------------- … … 276 276 pHelpInstance -> FNumApplicationWindows = 0; 277 277 pHelpInstance -> FMaxApplicationWindows = 0; 278 pHelpInstance -> FApplicationWindows = NULL; 279 280 pHelpInstance -> FActiveWindow = NULLHANDLE; 278 pHelpInstance -> FApplicationWindows = NULL; 279 280 pHelpInstance -> FActiveWindow = NULLHANDLE; 281 281 282 282 return pHelpInstance; 283 283 } 284 284
Note:
See TracChangeset
for help on using the changeset viewer.