diff options
Diffstat (limited to 'plugins/Non-IM Contact')
-rw-r--r-- | plugins/Non-IM Contact/res/resource.rc | 14 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/dialog.cpp | 40 |
2 files changed, 25 insertions, 29 deletions
diff --git a/plugins/Non-IM Contact/res/resource.rc b/plugins/Non-IM Contact/res/resource.rc index bc0e3fc00e..b92a412734 100644 --- a/plugins/Non-IM Contact/res/resource.rc +++ b/plugins/Non-IM Contact/res/resource.rc @@ -150,15 +150,13 @@ BEGIN PUSHBUTTON "Help",IDC_HELPMSG,385,73,43,14
END
-IDD_HELP DIALOG DISCARDABLE 0, 0, 280, 161
-STYLE DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | DS_CENTERMOUSE |
- WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
-CAPTION "Help!!!"
-FONT 8, "MS Sans Serif"
+IDD_HELP DIALOGEX DISCARDABLE 0, 0, 267, 218
+STYLE DS_SETFONT | DS_MODALFRAME | DS_SETFOREGROUND | DS_CENTER | DS_CENTERMOUSE | WS_POPUP | WS_VISIBLE | WS_CAPTION
+CAPTION "Help"
+FONT 9, "MS Sans Serif", 0, 0, 0x0
BEGIN
- DEFPUSHBUTTON "OK",IDOK,223,140,50,14
- EDITTEXT IDC_HELPTEXT,7,7,266,128,ES_MULTILINE | ES_READONLY |
- WS_VSCROLL | WS_HSCROLL
+ DEFPUSHBUTTON "OK",IDOK,210,197,50,14
+ EDITTEXT IDC_HELPTEXT,7,7,253,187,ES_MULTILINE | ES_READONLY | WS_VSCROLL
END
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index c457ab1ed6..cf99e00c03 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -1,4 +1,21 @@ #include "commonheaders.h"
+ +#define NIM_HELP_TEXT LPGEN("String replacing variables....\r\nThe following are all the valid variables that can be used. Refer to the readme for a proper explanation.\r\n\r\n\ +file(X)\t\t<- specifies the file to read from\r\nMUST be followed by either start() or end() or wholeline()\r\n\ +filename(X)\t\t<- copyies the filename of file X.\r\n\ +start(...)\t\t<-specifies where to start copying from.\r\n\ +end(...)\t\t<-specifies where to stop copying.\r\n\ +wholeline(line(...))\t<-specifies a whole line to copy\r\n\r\n\ +start() and end() explained\r\n.........................\r\n\ +MUST start with line() followed by a number or a string inside \" marks, OR csv(seperatorX) variable\r\n\ +The number specifies which character in the line to start/end copying.\r\nThe string specifies a string in the line to start/end copying.\r\n\ +csv(seperatorX) explained...\r\nseperator is either \"tab\" or \"space\" or any SINGLE character.\r\nX is the Xth seperator to pass before copying, (or to stop before)\r\n\r\n\ +Lastly the line(...) variable...\r\n\ +Inside the brackets must be either a number (to specify the line number), or a string inside \" marks (to use the line with that string), or lastline(X).\r\nthe X in lastline is the Xth line above the last line. i.e lastline(1) will use the 2nd last line of the file.\r\n\ +If searching for a line with u may put a + or - X after the closing ) i.e line(\"some words\")+3 to go 3 lines after the line with \"some words\".\r\n\r\n\ +Some Expamples...\r\n\r\n\ +filename(0) <- will display the filename of the 0th file\r\nfile(0)wholeline(line(0))) <- will display the whole first line of the 0th file\r\nfile(0)wholeline(line(\"hello\")-1))) <- the wholeline above the first occurance of \"hello\" in the file\r\nfile(0)start(line(lastline(1))csv(tab2))end(line(lastline())csv(tab4))) <- starts at the 2nd last line of the file, from the 2nd tab variable, untill the 4th tab variable in the last line (in the 0th file)\r\nfile(0)start(line(\"hello\")+1\"zzzz\")end(line(6)17)) <- starts from the first occurance of zzzz in the line after the first occurance of hello, untill the 17th character in the 6th line (starting from line 0) of the 0th file.\r\n") +
INT_PTR CALLBACK DlgProcNimcOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
@@ -90,27 +107,8 @@ INT_PTR CALLBACK HelpWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP {
switch(msg) {
case WM_INITDIALOG:
- {
- char string[10000];
- TranslateDialogDefault(hwnd);
-
- strcpy(string, Translate("String replacing variables....\r\nThe following are all the valid variables that can be used. Refer to the readme for a proper explanation.\r\n\r\n"));
- strcat(string, Translate("file(X)\t\t<- specifies the file to read from\r\nMUST be followed by either start() or end() or wholeline()\r\n"));
- strcat(string, Translate("filename(X)\t\t<- copyies the filename of file X.\r\n"));
- strcat(string, Translate("start(...)\t\t<-specifies where to start copying from.\r\n"));
- strcat(string, Translate("end(...)\t\t<-specifies where to stop copying.\r\n"));
- strcat(string, Translate("wholeline(line(...))\t<-specifies a whole line to copy\r\n\r\n"));
- strcat(string, Translate("start() and end() explained\r\n.........................\r\n"));
- strcat(string, Translate("MUST start with line() followed by a number or a string inside \" marks, OR csv(seperatorX) variable\r\n"));
- strcat(string, Translate("The number specifies which character in the line to start/end copying.\r\nThe string specifies a string in the line to start/end copying.\r\n"));
- strcat(string, Translate("csv(seperatorX) explained...\r\nseperator is either \"tab\" or \"space\" or any SINGLE character.\r\nX is the Xth seperator to pass before copying, (or to stop before)\r\n\r\n"));
- strcat(string, Translate("Lastly the line(...) variable...\r\n"));
- strcat(string, Translate("Inside the brackets must be either a number (to specify the line number), or a string inside \" marks (to use the line with that string), or lastline(X).\r\nthe X in lastline is the Xth line above the last line. i.e lastline(1) will use the 2nd last line of the file.\r\n"));
- strcat(string, Translate("If searching for a line with u may put a + or - X after the closing ) i.e line(\"some words\")+3 to go 3 lines after the line with \"some words\".\r\n\r\n"));
- strcat(string, Translate("Some Expamples...\r\n\r\n"));
- strcat(string, Translate("filename(0) <- will display the filename of the 0th file\r\nfile(0)wholeline(line(0))) <- will display the whole first line of the 0th file\r\nfile(0)wholeline(line(\"hello\")-1))) <- the wholeline above the first occurance of \"hello\" in the file\r\nfile(0)start(line(lastline(1))csv(tab2))end(line(lastline())csv(tab4))) <- starts at the 2nd last line of the file, from the 2nd tab variable, untill the 4th tab variable in the last line (in the 0th file)\r\nfile(0)start(line(\"hello\")+1\"zzzz\")end(line(6)17)) <- starts from the first occurance of zzzz in the line after the first occurance of hello, untill the 17th character in the 6th line (starting from line 0) of the 0th file.\r\n"));
- SetDlgItemTextA(hwnd, IDC_HELPTEXT,string);
- }
+ SetDlgItemTextA(hwnd, IDC_HELPTEXT, NIM_HELP_TEXT);
+ TranslateDialogDefault(hwnd);
return TRUE;
case WM_COMMAND:
|