/[rdesktop]/sourceforge.net/trunk/seamlessrdp/ServerExe/HookDll/hookdll.c
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.c

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

revision 1091 by astrand, Fri Mar 10 09:12:36 2006 UTC revision 1097 by ossman_, Fri Mar 10 12:38:00 2006 UTC
# Line 68  update_position(HWND hwnd) Line 68  update_position(HWND hwnd)
68  static LRESULT CALLBACK  static LRESULT CALLBACK
69  wndproc_hook_proc(int code, WPARAM cur_thread, LPARAM details)  wndproc_hook_proc(int code, WPARAM cur_thread, LPARAM details)
70  {  {
71          HWND hwnd;          HWND hwnd, parent;
72          UINT msg;          UINT msg;
73          WPARAM wparam;          WPARAM wparam;
74          LPARAM lparam;          LPARAM lparam;
# Line 90  wndproc_hook_proc(int code, WPARAM cur_t Line 90  wndproc_hook_proc(int code, WPARAM cur_t
90          if ((style & WS_CHILD) && !(style & WS_POPUP))          if ((style & WS_CHILD) && !(style & WS_POPUP))
91                  goto end;                  goto end;
92    
93            if (style & WS_POPUP)
94                    parent = (HWND) GetWindowLong(hwnd, GWL_HWNDPARENT);
95            else
96                    parent = NULL;
97    
98          switch (msg)          switch (msg)
99          {          {
100    
# Line 101  wndproc_hook_proc(int code, WPARAM cur_t Line 106  wndproc_hook_proc(int code, WPARAM cur_t
106                                  {                                  {
107                                          // FIXME: Now, just like create!                                          // FIXME: Now, just like create!
108                                          debug("SWP_SHOWWINDOW for %p!", hwnd);                                          debug("SWP_SHOWWINDOW for %p!", hwnd);
109                                          vchannel_write("CREATE,0x%p,0x%x", hwnd, 0);                                          vchannel_write("CREATE,0x%p,0x%p,0x%x", hwnd, parent, 0);
110    
111                                          // FIXME: SETSTATE                                          // FIXME: SETSTATE
112    
# Line 157  wndproc_hook_proc(int code, WPARAM cur_t Line 162  wndproc_hook_proc(int code, WPARAM cur_t
162  static LRESULT CALLBACK  static LRESULT CALLBACK
163  cbt_hook_proc(int code, WPARAM wparam, LPARAM lparam)  cbt_hook_proc(int code, WPARAM wparam, LPARAM lparam)
164  {  {
         char title[150];  
   
165          if (code < 0)          if (code < 0)
166                  goto end;                  goto end;
167    
# Line 170  cbt_hook_proc(int code, WPARAM wparam, L Line 173  cbt_hook_proc(int code, WPARAM wparam, L
173    
174                                  show = LOWORD(lparam);                                  show = LOWORD(lparam);
175    
                                 if ((show == SW_SHOWMINIMIZED) || (show == SW_MINIMIZE))  
                                 {  
                                         MessageBox(0,  
                                                    "Minimizing windows is not allowed in this version. Sorry!",  
                                                    "SeamlessRDP", MB_OK);  
                                         return 1;  
                                 }  
   
                                 GetWindowText((HWND) wparam, title, sizeof(title));  
   
                                 /* FIXME: Strip title of dangerous characters */  
   
176                                  if (show == SW_SHOWNORMAL)                                  if (show == SW_SHOWNORMAL)
177                                          state = 0;                                          state = 0;
178                                  else if (show == SW_SHOWMINIMIZED)                                  else if (show == SW_SHOWMINIMIZED)
179                                          state = 1;                                          state = 1;
180                                  else if (show == SW_SHOWMAXIMIZED)                                  else if (show == SW_SHOWMAXIMIZED)
181                                          state = 2;                                          state = 2;
182                                  vchannel_write("SETSTATE,0x%p,%s,0x%x,0x%x",                                  vchannel_write("STATE,0x%p,0x%x,0x%x", (HWND) wparam, state, 0);
                                                (HWND) wparam, title, state, 0);  
183                                  break;                                  break;
184                          }                          }
185    

Legend:
Removed from v.1091  
changed lines
  Added in v.1097

  ViewVC Help
Powered by ViewVC 1.1.26