#include "WndParentGraphProc.h"Include dependency graph for WndParentGraphProc.c:

Go to the source code of this file.
Functions | |
| HDC | TryToGetDC (HWND hWnd) |
| void | DragFunc (LPTW lptw, HDROP hdrop) |
| BOOL | ON_WND_PARENTGRAPH_WM_CLOSE (HWND hwnd) |
| BOOL | ON_WND_PARENTGRAPH_WM_DESTROY (HWND hwnd) |
| BOOL | ON_WND_PARENTGRAPH_WM_CREATE (HWND hwnd, LPCREATESTRUCT lpCreateStruct) |
| BOOL | ON_WND_PARENTGRAPH_WM_PAINT (HWND hwnd) |
| BOOL | ON_WND_PARENTGRAPH_WM_DROPFILES (HWND hwnd, HDROP hDrop) |
| BOOL | ON_WND_PARENTGRAPH_WM_COMMAND (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) |
| BOOL | ON_WND_PARENTGRAPH_WM_SIZE (HWND hwnd, UINT state, int cx, int cy) |
| void | ON_WND_PARENTGRAPH_WM_EXITSIZEMOVE (HWND hwnd) |
| void | ON_WND_PARENTGRAPH_WM_ENTERSIZEMOVE (HWND hwnd) |
| BOOL | ON_WND_PARENTGRAPH_WM_GETMINMAXINFO (HWND hwnd, LPMINMAXINFO lpMinMaxInfo) |
| void | ON_WND_PARENTGRAPH_WM_CHAR (HWND hwnd, TCHAR ch, int cRepeat) |
| void | ON_WND_PARENTGRAPH_WM_KEY (HWND hwnd, UINT vk, BOOL fDown, int cRepeat, UINT flags) |
| BOOL | ON_WND_PARENTGRAPH_WM_SETFOCUS (HWND hwnd, HWND hwndOldFocus) |
| BOOL | ON_WND_PARENTGRAPH_WM_SYSCOMMAND (HWND hwnd, WPARAM wParam, LPARAM lParam) |
| void | ON_WND_PARENTGRAPH_WM_KILLFOCUS (HWND hwnd, HWND hwndNewFocus) |
| EXPORT LRESULT CALLBACK | WndParentGraphProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) |
Variables | |
| TW | textwin |
| GW | graphwin |
| void DragFunc | ( | LPTW | lptw, | |
| HDROP | hdrop | |||
| ) |
Definition at line 13 of file DragnDrop.c.
References tagTW::bGetCh, FALSE, i, LaunchFilebyExtension(), MAX_PATH, and NULL.
Referenced by ON_WND_CONSOLE_WM_DROPFILES(), ON_WND_GRAPH_WM_DROPFILES(), and ON_WND_PARENTGRAPH_WM_DROPFILES().
00014 { 00015 static char szFile[MAX_PATH]; 00016 int i, cFiles; 00017 00018 cFiles = DragQueryFile (hdrop, 0xffffffff, (LPSTR) NULL, 0); 00019 00020 lptw->bGetCh =FALSE; 00021 00022 for (i = 0; i < cFiles; i++) 00023 { 00024 DragQueryFile (hdrop, i, szFile, MAX_PATH); 00025 LaunchFilebyExtension(szFile); 00026 } 00027 DragFinish (hdrop); 00028 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void ON_WND_PARENTGRAPH_WM_CHAR | ( | HWND | hwnd, | |
| TCHAR | ch, | |||
| int | cRepeat | |||
| ) |
Definition at line 180 of file WndParentGraphProc.c.
References BCG::CWindow.
Referenced by WndParentGraphProc().
00181 { 00182 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00183 SendMessage (ScilabGC->CWindow, WM_CHAR, ch, MAKELPARAM((cRepeat),0)); 00184 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_CLOSE | ( | HWND | hwnd | ) |
Definition at line 53 of file WndParentGraphProc.c.
References BCG::CWindow, and TRUE.
Referenced by WndParentGraphProc().
00054 { 00055 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00056 SendMessage (ScilabGC->CWindow, WM_CLOSE, 0, 0); 00057 return TRUE; 00058 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_COMMAND | ( | HWND | hwnd, | |
| int | id, | |||
| HWND | hwndCtl, | |||
| UINT | codeNotify | |||
| ) |
Definition at line 96 of file WndParentGraphProc.c.
References BCG::CWindow, SetFocus(), and TRUE.
Referenced by WndParentGraphProc().
00097 { 00098 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00099 WPARAM wParam=id; 00100 LPARAM lParam=(LPARAM)hwndCtl; 00101 00102 if (IsWindow (ScilabGC->CWindow)) SetFocus (ScilabGC->CWindow); 00103 SendMessage (ScilabGC->CWindow, WM_COMMAND, wParam, lParam); 00104 return TRUE; 00105 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_CREATE | ( | HWND | hwnd, | |
| LPCREATESTRUCT | lpCreateStruct | |||
| ) |
Definition at line 68 of file WndParentGraphProc.c.
Referenced by WndParentGraphProc().
00069 { 00070 struct BCG *ScilabGC = NULL; 00071 ScilabGC = lpCreateStruct->lpCreateParams; 00072 SetWindowLong (hwnd, 0, (LONG) ScilabGC); 00073 ScilabGC->hWndParent = hwnd; 00074 if (ScilabGC->lpgw->lptw) DragAcceptFiles (hwnd, TRUE); 00075 return TRUE; 00076 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_DESTROY | ( | HWND | hwnd | ) |
Definition at line 60 of file WndParentGraphProc.c.
References BCG::CWindow, FALSE, and TRUE.
Referenced by WndParentGraphProc().
00061 { 00062 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00063 SendMessage (ScilabGC->CWindow, WM_DESTROY, 0, 0); 00064 DragAcceptFiles (hwnd, FALSE); 00065 return TRUE; 00066 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_DROPFILES | ( | HWND | hwnd, | |
| HDROP | hDrop | |||
| ) |
Definition at line 88 of file WndParentGraphProc.c.
References DragFunc(), and TRUE.
Referenced by WndParentGraphProc().
00089 { 00090 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00091 00092 DragFunc (ScilabGC->lpgw->lptw, hDrop); 00093 return TRUE; 00094 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void ON_WND_PARENTGRAPH_WM_ENTERSIZEMOVE | ( | HWND | hwnd | ) |
Definition at line 159 of file WndParentGraphProc.c.
Referenced by WndParentGraphProc().
00160 { 00161 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00162 /* set ScilabGC->in_sizemove to zero if you want graphics 00163 * redraw during resizing or to one to prevent redraw while sizing. 00164 */ 00165 00166 ScilabGC->in_sizemove=0; 00167 }
Here is the caller graph for this function:

| void ON_WND_PARENTGRAPH_WM_EXITSIZEMOVE | ( | HWND | hwnd | ) |
Definition at line 152 of file WndParentGraphProc.c.
References BCG::CWindow, FALSE, and NULL.
Referenced by WndParentGraphProc().
00153 { 00154 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00155 ScilabGC->in_sizemove=0; 00156 InvalidateRect (ScilabGC->CWindow, (LPRECT) NULL, FALSE); 00157 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_GETMINMAXINFO | ( | HWND | hwnd, | |
| LPMINMAXINFO | lpMinMaxInfo | |||
| ) |
Definition at line 169 of file WndParentGraphProc.c.
References TRUE.
Referenced by WndParentGraphProc().
00170 { 00171 POINT *MMinfo = (POINT *) lpMinMaxInfo; 00172 /* minimum size */ 00173 /* same minimum size as Linux */ 00174 MMinfo[3].x = 400; 00175 MMinfo[3].y =320; 00176 00177 return TRUE; 00178 }
Here is the caller graph for this function:

| void ON_WND_PARENTGRAPH_WM_KEY | ( | HWND | hwnd, | |
| UINT | vk, | |||
| BOOL | fDown, | |||
| int | cRepeat, | |||
| UINT | flags | |||
| ) |
Definition at line 186 of file WndParentGraphProc.c.
References BCG::CWindow, and UINT.
Referenced by WndParentGraphProc().
00187 { 00188 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00189 00190 if ( fDown) SendMessage (ScilabGC->CWindow, WM_KEYDOWN,(WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags))); 00191 else SendMessage (ScilabGC->CWindow, WM_KEYUP,(WPARAM)(UINT)(vk), MAKELPARAM((cRepeat), (flags))); 00192 }
Here is the caller graph for this function:

| void ON_WND_PARENTGRAPH_WM_KILLFOCUS | ( | HWND | hwnd, | |
| HWND | hwndNewFocus | |||
| ) |
Definition at line 219 of file WndParentGraphProc.c.
References tagTW::hWndText, L, and textwin.
Referenced by WndParentGraphProc().
00220 { 00221 SendMessage (textwin.hWndText, WM_KILLFOCUS, (WPARAM)(HWND)(hwndNewFocus), 0L); 00222 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_PAINT | ( | HWND | hwnd | ) |
Definition at line 78 of file WndParentGraphProc.c.
Referenced by WndParentGraphProc().
00079 { 00080 PAINTSTRUCT ps; 00081 HDC hdc; 00082 00083 hdc = BeginPaint (hwnd, &ps); 00084 EndPaint (hwnd, &ps); 00085 return TRUE; 00086 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_SETFOCUS | ( | HWND | hwnd, | |
| HWND | hwndOldFocus | |||
| ) |
Definition at line 194 of file WndParentGraphProc.c.
References BCG::CWindow, SetFocus(), and TRUE.
Referenced by WndParentGraphProc().
00195 { 00196 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00197 SetFocus (ScilabGC->CWindow); 00198 00199 return TRUE; 00200 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 107 of file WndParentGraphProc.c.
References BCG::CurResizeStatus, BCG::CWindow, BCG::CWindowHeight, BCG::CWindowHeightView, BCG::CWindowWidth, BCG::CWindowWidthView, NULL, and TRUE.
Referenced by WndParentGraphProc().
00108 { 00109 RECT rect, rect1, rrect, rrect1; 00110 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00111 00112 GetWindowRect (ScilabGC->Statusbar, &rect); 00113 SetWindowPos (ScilabGC->Statusbar, (HWND) NULL, 0,cy - (rect.bottom - rect.top), 00114 cx, (rect.bottom - rect.top), 00115 SWP_NOZORDER | SWP_NOACTIVATE); 00116 00117 switch (state) /* Maximized case . F.leray 01.07.04 */ 00118 { 00119 case SIZE_MAXIMIZED: 00120 GetWindowRect (ScilabGC->Statusbar, &rrect1); 00121 GetClientRect (ScilabGC->hWndParent, &rrect); 00122 ScilabGC->CWindowWidthView = rrect.right; 00123 ScilabGC->CWindowHeightView = rrect.bottom - (rrect1.bottom - rrect1.top); 00124 if (ScilabGC->CurResizeStatus != 0) 00125 { 00126 ScilabGC->CWindowWidth = ScilabGC->CWindowWidthView; 00127 ScilabGC->CWindowHeight = ScilabGC->CWindowHeightView; 00128 } 00129 break; 00130 00131 default: 00132 break; 00133 } 00134 00135 SetWindowPos (ScilabGC->CWindow, (HWND) NULL, 0,0, 00136 cx,cy - (rect.bottom - rect.top), 00137 SWP_NOZORDER | SWP_NOACTIVATE); 00138 00139 GetWindowRect (ScilabGC->Statusbar, &rect1); 00140 GetClientRect (ScilabGC->hWndParent, &rect); 00141 ScilabGC->CWindowWidthView = rect.right; 00142 ScilabGC->CWindowHeightView = rect.bottom - (rect1.bottom - rect1.top); 00143 /* MAJ D.ABDEMOUCHE*/ 00144 if (ScilabGC->CurResizeStatus != 0) 00145 { 00146 ScilabGC->CWindowWidth = ScilabGC->CWindowWidthView; 00147 ScilabGC->CWindowHeight = ScilabGC->CWindowHeightView; 00148 } 00149 return TRUE; 00150 }
Here is the caller graph for this function:

| BOOL ON_WND_PARENTGRAPH_WM_SYSCOMMAND | ( | HWND | hwnd, | |
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) |
Definition at line 202 of file WndParentGraphProc.c.
References BCG::CWindow, M_ABOUT, M_COPY_CLIP, M_PASTE, M_WRITEINI, and TRUE.
Referenced by WndParentGraphProc().
00203 { 00204 switch (LOWORD (wParam)) 00205 { 00206 case M_COPY_CLIP: 00207 case M_PASTE: 00208 case M_WRITEINI: 00209 case M_ABOUT: 00210 { 00211 struct BCG *ScilabGC = (struct BCG *) GetWindowLong (hwnd, 0); 00212 SendMessage (ScilabGC->CWindow, WM_COMMAND,wParam, lParam); 00213 } 00214 break; 00215 } 00216 return TRUE; 00217 }
Here is the caller graph for this function:

| HDC TryToGetDC | ( | HWND | hWnd | ) |
Definition at line 11 of file TryToGetDC.c.
00012 { 00013 HDC hDCRet=NULL; 00014 00015 if (hWnd) 00016 { 00017 hDCRet=GetDC(hWnd); 00018 if (hDCRet == NULL) 00019 { 00020 #ifdef _DEBUG 00021 MessageBox(NULL,MSG_ERROR36,MSG_ERROR20,MB_ICONWARNING); 00022 #endif 00023 } 00024 } 00025 else 00026 { 00027 #ifdef _DEBUG 00028 MessageBox(NULL,MSG_ERROR37,MSG_ERROR20,MB_ICONWARNING); 00029 #endif 00030 } 00031 00032 return (HDC)hDCRet; 00033 }
| EXPORT LRESULT CALLBACK WndParentGraphProc | ( | HWND | hwnd, | |
| UINT | message, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) |
Definition at line 29 of file WndParentGraphProc.c.
References ON_WND_PARENTGRAPH_WM_CHAR(), ON_WND_PARENTGRAPH_WM_CLOSE(), ON_WND_PARENTGRAPH_WM_COMMAND(), ON_WND_PARENTGRAPH_WM_CREATE(), ON_WND_PARENTGRAPH_WM_DESTROY(), ON_WND_PARENTGRAPH_WM_DROPFILES(), ON_WND_PARENTGRAPH_WM_ENTERSIZEMOVE(), ON_WND_PARENTGRAPH_WM_EXITSIZEMOVE(), ON_WND_PARENTGRAPH_WM_GETMINMAXINFO(), ON_WND_PARENTGRAPH_WM_KEY(), ON_WND_PARENTGRAPH_WM_KILLFOCUS(), ON_WND_PARENTGRAPH_WM_PAINT(), ON_WND_PARENTGRAPH_WM_SETFOCUS(), ON_WND_PARENTGRAPH_WM_SIZE(), and ON_WND_PARENTGRAPH_WM_SYSCOMMAND().
00030 { 00031 switch (message) 00032 { 00033 case WM_ENTERSIZEMOVE : ON_WND_PARENTGRAPH_WM_ENTERSIZEMOVE(hwnd); break; 00034 case WM_EXITSIZEMOVE : ON_WND_PARENTGRAPH_WM_EXITSIZEMOVE(hwnd); break; 00035 case WM_SYSCOMMAND : ON_WND_PARENTGRAPH_WM_SYSCOMMAND(hwnd,wParam,lParam); break; 00036 00037 HANDLE_MSG(hwnd,WM_SIZE,ON_WND_PARENTGRAPH_WM_SIZE); 00038 HANDLE_MSG(hwnd,WM_COMMAND,ON_WND_PARENTGRAPH_WM_COMMAND); 00039 HANDLE_MSG(hwnd,WM_DROPFILES,ON_WND_PARENTGRAPH_WM_DROPFILES); 00040 HANDLE_MSG(hwnd,WM_PAINT,ON_WND_PARENTGRAPH_WM_PAINT); 00041 HANDLE_MSG(hwnd,WM_CREATE,ON_WND_PARENTGRAPH_WM_CREATE); 00042 HANDLE_MSG(hwnd,WM_DESTROY,ON_WND_PARENTGRAPH_WM_DESTROY); 00043 HANDLE_MSG(hwnd,WM_CLOSE,ON_WND_PARENTGRAPH_WM_CLOSE); 00044 HANDLE_MSG(hwnd,WM_GETMINMAXINFO,ON_WND_PARENTGRAPH_WM_GETMINMAXINFO); 00045 HANDLE_MSG(hwnd,WM_CHAR,ON_WND_PARENTGRAPH_WM_CHAR); 00046 HANDLE_MSG(hwnd,WM_KEYDOWN,ON_WND_PARENTGRAPH_WM_KEY); 00047 HANDLE_MSG(hwnd,WM_SETFOCUS,ON_WND_PARENTGRAPH_WM_SETFOCUS); 00048 HANDLE_MSG(hwnd,WM_KILLFOCUS,ON_WND_PARENTGRAPH_WM_KILLFOCUS); 00049 } 00050 return DefWindowProc (hwnd, message, wParam, lParam); 00051 }
Here is the call graph for this function:

We need to provide a hdc for each graphic operation but hdc can be changed to be set to a window a printer a metafile etc... Thus hdc is kept as a global variable which will be set to what we need : see Xcall.c
Definition at line 8 of file GraphWindows.c.
keeps information for the current graphic window
Definition at line 8 of file TextWindows.c.
1.5.1