/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.cpp
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1063 by astrand, Wed Mar 8 09:41:55 2006 UTC revision 1064 by ossman_, Wed Mar 8 15:52:38 2006 UTC
# Line 95  LRESULT CALLBACK CallWndProc( int nCode, Line 95  LRESULT CALLBACK CallWndProc( int nCode,
95      switch ( details->message ) {      switch ( details->message ) {
96            
97          case WM_WINDOWPOSCHANGED:          case WM_WINDOWPOSCHANGED:
98          if ( !( dwStyle & WS_DLGFRAME ) )              if ( dwStyle & WS_CHILD)
99              break;                  break;
100    
101    
102                if ( wp->flags & SWP_SHOWWINDOW ) {
103                    // FIXME: Now, just like create!
104                    SendDebug("SWP_SHOWWINDOW for %p!", details->hwnd);
105                    
106                    snprintf( result, sizeof( result ),
107                              "CREATE1,0x%p,0x%x\n",
108                              details->hwnd, 0 );
109                    result[ sizeof( result ) - 1 ] = '\0';
110                    WriteToChannel( result );
111    
112                    // FIXME: SETSTATE
113                
114                    if ( !GetWindowRect( details->hwnd, &rect ) ) {
115                        SendDebug( "GetWindowRect failed!\n" );
116                        break;
117                    }
118                    snprintf( result, sizeof( result ),
119                              "POSITION1,0x%p,%d,%d,%d,%d,0x%x\n",
120                              details->hwnd,
121                              rect.left, rect.top,
122                              rect.right - rect.left,
123                              rect.bottom - rect.top,
124                              0 );
125                    result[ sizeof( result ) - 1 ] = '\0';
126                    WriteToChannel( result );
127    
128                }
129    
130    
131                if ( wp->flags & SWP_HIDEWINDOW ) {
132                    snprintf( result, sizeof( result ),
133                              "DESTROY1,0x%p,0x%x\n",
134                              details->hwnd, 0 );
135                    result[ sizeof( result ) - 1 ] = '\0';
136                    WriteToChannel( result );
137    
138                }
139    
140    
141            if ( !( dwStyle & WS_VISIBLE ) )
142                    break;
143                            
144          if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE )          if ( wp->flags & SWP_NOMOVE && wp->flags & SWP_NOSIZE )
145              break;              break;
# Line 128  LRESULT CALLBACK CallWndProc( int nCode, Line 171  LRESULT CALLBACK CallWndProc( int nCode,
171          WM_WINDOWPOSCHANGING event is sent which looks just like          WM_WINDOWPOSCHANGING event is sent which looks just like
172          the event that was sent when the About dialog was opened...  */          the event that was sent when the About dialog was opened...  */
173          case WM_WINDOWPOSCHANGING:          case WM_WINDOWPOSCHANGING:
174          if ( !( dwStyle & WS_DLGFRAME ) )              if ( dwStyle & WS_CHILD)
175              break;                  break;
176    
177                if ( !( dwStyle & WS_VISIBLE ) )
178                    break;
179                            
180          if ( !( wp->flags & SWP_NOZORDER ) ) {          if ( !( wp->flags & SWP_NOZORDER ) ) {
181              snprintf( result, sizeof( result ),              snprintf( result, sizeof( result ),
# Line 142  LRESULT CALLBACK CallWndProc( int nCode, Line 188  LRESULT CALLBACK CallWndProc( int nCode,
188          }          }
189          break;          break;
190                    
191                  
192          case WM_CREATE:        
         if ( cs->style & WS_DLGFRAME ) {  
           
             if ( cs->cx < 0 || cs->cy < 0 )  
                 break;  
                   
             snprintf( result, sizeof( result ),  
                       "CREATE1,0x%p,0x%x\n",  
                       details->hwnd, 0 );  
             result[ sizeof( result ) - 1 ] = '\0';  
             WriteToChannel( result );  
               
             snprintf( result, sizeof( result ),  
                       "SETSTATE1,0x%p,%s,0x%x,0x%x\n",  
                       details->hwnd,  
                       cs->lpszName,  
                       1,         // FIXME: Check for WS_MAXIMIZE/WS_MINIMIZE  
                       0 );  
             result[ sizeof( result ) - 1 ] = '\0';  
             WriteToChannel( result );  
               
             snprintf( result, sizeof( result ),  
                       "POSITION1,0x%p,%d,%d,%d,%d,0x%x\n",  
                       details->hwnd,  
                       cs->x,  
                       cs->y,  
                       cs->cx,  
                       cs->cy,  
                       0 );  
             result[ sizeof( result ) - 1 ] = '\0';  
             WriteToChannel( result );  
               
         }  
         break;  
           
193                    
194          case WM_DESTROY:          case WM_DESTROY:
195          if ( dwStyle & WS_DLGFRAME ) {              if ( dwStyle & WS_CHILD)
196                    break;
197    
198              snprintf( result, sizeof( result ),              snprintf( result, sizeof( result ),
199                        "DESTROY1,0x%p,0x%x\n",                        "DESTROY1,0x%p,0x%x\n",
200                        details->hwnd, 0 );                        details->hwnd, 0 );
201              result[ sizeof( result ) - 1 ] = '\0';              result[ sizeof( result ) - 1 ] = '\0';
202              WriteToChannel( result );              WriteToChannel( result );
         }  
203                    
204          break;          break;
205            
206                  
207          default:          default:
208          break;          break;
209      }      }

Legend:
Removed from v.1063  
changed lines
  Added in v.1064

  ViewVC Help
Powered by ViewVC 1.1.26