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

Go to the source code of this file.
Functions | |
| LPTW | GetTextWinScilab (void) |
| char * | GetScilabDirectory (BOOL UnixStyle) |
| BOOL CALLBACK | MessageBoxNewGraphicModeDlgProc (HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) |
| BOOL | ON_MESSAGEBOXNEWGRAPHICMODE_WM_INITDIALOG (HWND hDlg, HWND hwndFocus, LPARAM lParam) |
| BOOL | ON_MESSAGEBOXNEWGRAPHICMODE_WM_COMMAND (HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) |
| void | MessageBoxNewGraphicMode (void) |
Variables | |
| HINSTANCE | hdllInstance |
| static int | MessageBoxLanguageCode = 0 |
| char* GetScilabDirectory | ( | BOOL | UnixStyle | ) |
Definition at line 64 of file SciEnv.c.
00065 { 00066 LPSTR ScilabModuleName=NULL; 00067 char drive[_MAX_DRIVE]; 00068 char dir[_MAX_DIR]; 00069 char fname[_MAX_FNAME]; 00070 char ext[_MAX_EXT]; 00071 00072 char *SciPathName=NULL; 00073 char *DirTmp=NULL; 00074 00075 ScilabModuleName = (LPSTR) MALLOC (MAXSTR + 1); 00076 00077 if (!GetModuleFileName ((HINSTANCE)GetModuleHandle(MSG_SCIMSG9), (LPSTR) ScilabModuleName, MAXSTR)) 00078 { 00079 if (ScilabModuleName) {FREE(ScilabModuleName);ScilabModuleName=NULL;} 00080 return NULL; 00081 } 00082 00083 _splitpath(ScilabModuleName,drive,dir,fname,ext); 00084 if (ScilabModuleName) {FREE(ScilabModuleName);ScilabModuleName=NULL;} 00085 if (dir[strlen(dir)-1] == '\\') dir[strlen(dir)-1] = '\0'; 00086 00087 DirTmp=strrchr (dir, '\\'); 00088 if (strlen(dir)-strlen(DirTmp)>0) 00089 { 00090 dir[strlen(dir)-strlen(DirTmp)] = '\0'; 00091 } 00092 else return NULL; 00093 00094 SciPathName=(char*)MALLOC((int)(strlen(drive)+strlen(dir)+5)*sizeof(char)); 00095 00096 _makepath(SciPathName,drive,dir,NULL,NULL); 00097 00098 if ( UnixStyle ) 00099 { 00100 int i=0; 00101 for (i=0;i<(int)strlen(SciPathName);i++) 00102 { 00103 if (SciPathName[i]=='\\') SciPathName[i]='/'; 00104 } 00105 } 00106 SciPathName[strlen(SciPathName)-1]='\0'; 00107 setSCIpath(SciPathName); 00108 return SciPathName; 00109 }
| LPTW GetTextWinScilab | ( | void | ) |
| void MessageBoxNewGraphicMode | ( | void | ) |
Definition at line 17 of file MessageBoxNewGraphicMode.c.
References hdllInstance, MAX_PATH, MessageBoxNewGraphicModeDlgProc(), NULL, result, SCI_VERSION_STRING, and size.
Referenced by Windows_Main().
00018 { 00019 HKEY key; 00020 DWORD result,size=4; 00021 char Clef[MAX_PATH]; 00022 int DontShowMessageNewGraphicMode,Ans; 00023 00024 wsprintf(Clef,"SOFTWARE\\Scilab\\%s\\Settings",SCI_VERSION_STRING); 00025 result=RegOpenKeyEx(HKEY_CURRENT_USER, Clef, 0, KEY_QUERY_VALUE , &key); 00026 00027 if ( RegQueryValueEx(key, "DontShowMessageNewGraphicMode", 0, NULL, (LPBYTE)&Ans, &size) != ERROR_SUCCESS ) 00028 { 00029 DontShowMessageNewGraphicMode = 0; 00030 } 00031 else 00032 { 00033 DontShowMessageNewGraphicMode = Ans; 00034 } 00035 00036 if ( result == ERROR_SUCCESS ) RegCloseKey(key); 00037 00038 if (DontShowMessageNewGraphicMode == 0) 00039 { 00040 DialogBox(hdllInstance, "IDD_MESSAGE_NEW_GRAPHIC", NULL,MessageBoxNewGraphicModeDlgProc); 00041 } 00042 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL CALLBACK MessageBoxNewGraphicModeDlgProc | ( | HWND | hwnd, | |
| UINT | Message, | |||
| WPARAM | wParam, | |||
| LPARAM | lParam | |||
| ) |
Definition at line 44 of file MessageBoxNewGraphicMode.c.
References FALSE, ON_MESSAGEBOXNEWGRAPHICMODE_WM_COMMAND(), and ON_MESSAGEBOXNEWGRAPHICMODE_WM_INITDIALOG().
Referenced by MessageBoxNewGraphicMode().
00045 { 00046 switch(Message) 00047 { 00048 case WM_INITDIALOG: 00049 return HANDLE_WM_INITDIALOG(hwnd,wParam,lParam,ON_MESSAGEBOXNEWGRAPHICMODE_WM_INITDIALOG); 00050 00051 case WM_COMMAND: 00052 return HANDLE_WM_COMMAND(hwnd,wParam,lParam,ON_MESSAGEBOXNEWGRAPHICMODE_WM_COMMAND); 00053 } 00054 return FALSE; 00055 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL ON_MESSAGEBOXNEWGRAPHICMODE_WM_COMMAND | ( | HWND | hwnd, | |
| int | id, | |||
| HWND | hwndCtl, | |||
| UINT | codeNotify | |||
| ) |
Definition at line 102 of file MessageBoxNewGraphicMode.c.
References error, FALSE, FREE, GetScilabDirectory(), IDC_CHECKNEWGRAPHIC, IDC_OPENRELEASENOTES, int, MAX_PATH, MessageBoxLanguageCode, MSG_WARNING22, MSG_WARNING32, MSG_WARNING33, NULL, result, SCI_VERSION_STRING, SW_SHOWNORMAL, and TRUE.
Referenced by MessageBoxNewGraphicModeDlgProc().
00103 { 00104 switch(id) 00105 { 00106 case IDOK: 00107 { 00108 HKEY key; 00109 DWORD result,dwsize=4; 00110 char Clef[MAX_PATH]; 00111 int DontShowMessageNewGraphicMode; 00112 LONG TstRegCreateKeyEx=0; 00113 00114 wsprintf(Clef,"SOFTWARE\\Scilab\\%s\\Settings",SCI_VERSION_STRING); 00115 TstRegCreateKeyEx=RegCreateKeyEx(HKEY_CURRENT_USER, Clef, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &key, &result); 00116 if (TstRegCreateKeyEx == ERROR_SUCCESS) 00117 { 00118 if(IsDlgButtonChecked(hwnd, IDC_CHECKNEWGRAPHIC) == BST_CHECKED) 00119 { 00120 //The Box is CHECKED! 00121 DontShowMessageNewGraphicMode=1; 00122 RegSetValueEx(key, "DontShowMessageNewGraphicMode", 0, REG_DWORD, (LPBYTE)&DontShowMessageNewGraphicMode, dwsize); 00123 } 00124 else 00125 { 00126 //The Box is NOT checked! 00127 DontShowMessageNewGraphicMode=0; 00128 RegSetValueEx(key, "DontShowMessageNewGraphicMode", 0, REG_DWORD, (LPBYTE)&DontShowMessageNewGraphicMode, dwsize); 00129 } 00130 00131 RegCloseKey(key); 00132 } 00133 00134 EndDialog(hwnd, IDOK); 00135 } 00136 break; 00137 case IDC_OPENRELEASENOTES: 00138 { 00139 char *ScilabDirectory=NULL; 00140 char Chemin[MAX_PATH]; 00141 int error=0; 00142 00143 ScilabDirectory=GetScilabDirectory(FALSE); 00144 00145 wsprintf(Chemin,"%s\\release_notes.txt",ScilabDirectory); 00146 if (ScilabDirectory){FREE(ScilabDirectory);ScilabDirectory=NULL;} 00147 00148 error =(int)ShellExecute(NULL, "open", Chemin, NULL, NULL, SW_SHOWNORMAL); 00149 if (error<= 32) 00150 { 00151 switch (MessageBoxLanguageCode) 00152 { 00153 case 1: 00154 MessageBox(hwnd,MSG_WARNING32,MSG_WARNING22,MB_ICONWARNING); 00155 break; 00156 00157 case 0: default: 00158 MessageBox(hwnd,MSG_WARNING33,MSG_WARNING22,MB_ICONWARNING); 00159 break; 00160 } 00161 } 00162 } 00163 break; 00164 } 00165 return TRUE; 00166 }
Here is the call graph for this function:

Here is the caller graph for this function:

| BOOL ON_MESSAGEBOXNEWGRAPHICMODE_WM_INITDIALOG | ( | HWND | hDlg, | |
| HWND | hwndFocus, | |||
| LPARAM | lParam | |||
| ) |
Definition at line 57 of file MessageBoxNewGraphicMode.c.
References GetTextWinScilab(), IDC_CHECKNEWGRAPHIC, IDC_NEWGRAPHICMESSAGE, IDC_OPENRELEASENOTES, MAX_PATH, MessageBoxLanguageCode, MSG_SCIMSG114, MSG_SCIMSG115, MSG_SCIMSG87, MSG_SCIMSG88, MSG_SCIMSG89, MSG_SCIMSG90, MSG_SCIMSG91, MSG_WARNING22, NULL, result, SCI_VERSION_STRING, ScilexWindowName, size, and TRUE.
Referenced by MessageBoxNewGraphicModeDlgProc().
00058 { 00059 int LanguageCode=0; 00060 extern char ScilexWindowName[MAX_PATH]; 00061 00062 HKEY key; 00063 DWORD result,size=4; 00064 int Language; 00065 char Clef[MAX_PATH]; 00066 LPTW lptw=GetTextWinScilab(); 00067 00068 wsprintf(Clef,"SOFTWARE\\Scilab\\%s\\Settings",SCI_VERSION_STRING); 00069 result=RegOpenKeyEx(HKEY_CURRENT_USER, Clef, 0, KEY_QUERY_VALUE , &key); 00070 00071 if ( RegQueryValueEx(key, "Language", 0, NULL, (LPBYTE)&Language, &size) != ERROR_SUCCESS ) 00072 { 00073 MessageBoxLanguageCode = 0; /* English Default*/ 00074 } 00075 else 00076 { 00077 MessageBoxLanguageCode = Language; 00078 } 00079 00080 if ( result == ERROR_SUCCESS ) RegCloseKey(key); 00081 00082 CheckDlgButton(hDlg, IDC_CHECKNEWGRAPHIC, BST_UNCHECKED); 00083 switch (MessageBoxLanguageCode) 00084 { 00085 case 1: 00086 SetWindowText(hDlg,MSG_SCIMSG87); 00087 SetDlgItemText(hDlg,IDC_OPENRELEASENOTES,MSG_SCIMSG114); 00088 SetDlgItemText(hDlg,IDC_NEWGRAPHICMESSAGE,MSG_SCIMSG88); 00089 SetDlgItemText(hDlg,IDC_CHECKNEWGRAPHIC,MSG_SCIMSG89); 00090 break; 00091 00092 case 0:default: 00093 SetWindowText(hDlg,MSG_WARNING22); 00094 SetDlgItemText(hDlg,IDC_OPENRELEASENOTES,MSG_SCIMSG115); 00095 SetDlgItemText(hDlg,IDC_NEWGRAPHICMESSAGE,MSG_SCIMSG90); 00096 SetDlgItemText(hDlg,IDC_CHECKNEWGRAPHIC,MSG_SCIMSG91); 00097 break; 00098 } 00099 return TRUE; 00100 }
Here is the call graph for this function:

Here is the caller graph for this function:

| HINSTANCE hdllInstance |
int MessageBoxLanguageCode = 0 [static] |
Definition at line 15 of file MessageBoxNewGraphicMode.c.
Referenced by ON_MESSAGEBOXNEWGRAPHICMODE_WM_COMMAND(), and ON_MESSAGEBOXNEWGRAPHICMODE_WM_INITDIALOG().
1.5.1