Permalink
Browse files

initial import

  • Loading branch information...
0 parents commit 5dccf11b9c18dbee13e39cf51615f3a5bff1dd42 @headius committed with headius Dec 22, 2001
Showing with 11,368 additions and 0 deletions.
  1. +274 −0 AutoEntry.cpp
  2. +25 −0 AutoEntry.h
  3. +222 −0 AutoFunction.cpp
  4. +107 −0 AutoFunction.h
  5. +412 −0 HackIt.dsp
  6. +44 −0 HackIt.dsw
  7. +771 −0 HackIt.rc
  8. +1 −0 HackIt4.h
  9. +2,716 −0 HackItDlg.cpp
  10. +190 −0 HackItDlg.h
  11. +57 −0 HackItMain.cpp
  12. +597 −0 HackItSettings.cpp
  13. +74 −0 HackItSettings.h
  14. +174 −0 IllegalWindowEntry.cpp
  15. +28 −0 IllegalWindowEntry.h
  16. +59 −0 IllegalWindowSpec.cpp
  17. +47 −0 IllegalWindowSpec.h
  18. +49 −0 LoggingSystem.cpp
  19. +33 −0 LoggingSystem.h
  20. +49 −0 ProcessFunctions.cpp
  21. +22 −0 ProcessFunctions.h
  22. +940 −0 SettingsDlg.cpp
  23. +75 −0 SettingsDlg.h
  24. +52 −0 Splash.cpp
  25. +17 −0 Splash.h
  26. +116 −0 SystemHooks.cpp
  27. +35 −0 SystemHooks.h
  28. +77 −0 TextEntry.cpp
  29. +22 −0 TextEntry.h
  30. +350 −0 Wildcard.cpp
  31. +27 −0 Wildcard.h
  32. +165 −0 WindowFunctions.cpp
  33. +33 −0 WindowFunctions.h
  34. +104 −0 WindowInfo.cpp
  35. +21 −0 WindowInfo.h
  36. 0 afxres.h
  37. 0 afxres.rc
  38. +100 −0 defines.h
  39. +62 −0 help/ChildWindowItems.html
  40. +75 −0 help/CustomSystemMenus.html
  41. +109 −0 help/FAQ.html
  42. +14 −0 help/HackIt.hhp
  43. +41 −0 help/HiddenWindows.html
  44. +9 −0 help/Index.hhk
  45. +26 −0 help/StatusBar.html
  46. +120 −0 help/Table of Contents.hhc
  47. +82 −0 help/TopLevelWindowItems.html
  48. +40 −0 help/TopmostWindows.html
  49. +26 −0 help/TrayyedWindows.html
  50. +62 −0 help/VisibleWindows.html
  51. +30 −0 help/WindowList.html
  52. +30 −0 help/advanced_functions.html
  53. +27 −0 help/automatic_functions.html
  54. +46 −0 help/automatic_functions_tab.html
  55. +35 −0 help/basic_functions.html
  56. +54 −0 help/button_functions.html
  57. +72 −0 help/captured_menus.html
  58. +108 −0 help/general_tab.html
  59. +60 −0 help/hack-it_functions.html
  60. +45 −0 help/illegal_windows.html
  61. +22 −0 help/illegal_windows_tab.html
  62. BIN help/images/ChildW5.gif
  63. BIN help/images/ChildWindows.gif
  64. BIN help/images/TopLev9.gif
  65. BIN help/images/TopLevelWindows.gif
  66. BIN help/images/Topmos8.gif
  67. BIN help/images/Trayye7.gif
  68. BIN help/images/Visibl6.gif
  69. BIN help/images/automa1.gif
  70. BIN help/images/automa1.jpg
  71. BIN help/images/automa2.gif
  72. BIN help/images/automa2.jpg
  73. BIN help/images/automatic_dialog.gif
  74. BIN help/images/automatic_tab.gif
  75. BIN help/images/genera1.gif
  76. BIN help/images/generaltab.gif
  77. BIN help/images/illega10.gif
  78. BIN help/images/illega11.gif
  79. BIN help/images/illega3.gif
  80. BIN help/images/illega3.jpg
  81. BIN help/images/illega4.gif
  82. BIN help/images/window2.gif
  83. BIN help/images/windowtab.gif
  84. +31 −0 help/index.html
  85. +52 −0 help/process_functions.html
  86. +203 −0 help/read_me.html
  87. +55 −0 help/registration_information.html
  88. +187 −0 help/revision_history.html
  89. +37 −0 help/settings.html
  90. +23 −0 help/ui.html
  91. +66 −0 help/window_functions.html
  92. +167 −0 help/window_list_tab.html
  93. +8 −0 helpids.h
  94. +35 −0 install/Pro.iss
  95. +29 −0 install/Release.iss
  96. +73 −0 install/license.txt
  97. +71 −0 install/pro.txt
  98. +97 −0 install/readme.txt
  99. +8 −0 install/users.txt
  100. BIN res/HackIt.ico
  101. +13 −0 res/HackIt.rc2
  102. BIN res/bitmap4.bmp
  103. BIN res/bitmap5.bmp
  104. BIN res/bitmap6.bmp
  105. BIN res/bitmap9.bmp
  106. BIN res/hackitico.gif
  107. BIN res/ico00001.ico
  108. BIN res/ico00002.ico
  109. BIN res/ico00003.ico
  110. BIN res/ico00004.ico
  111. BIN res/ico00005.ico
  112. BIN res/ico00006.ico
  113. BIN res/ico00007.ico
  114. BIN res/ico00008.ico
  115. BIN res/ico00009.ico
  116. BIN res/ico00010.ico
  117. BIN res/ico00011.ico
  118. BIN res/ico00012.ico
  119. BIN res/ico00013.ico
  120. BIN res/ico00014.ico
  121. BIN res/ico00015.ico
  122. BIN res/ico00016.ico
  123. BIN res/ico00017.ico
  124. BIN res/ico00018.ico
  125. BIN res/icon1.ico
  126. BIN res/icon2.ico
  127. BIN res/mainfram.ico
  128. BIN res/newsplash.bmp
  129. BIN res/splash.bmp
  130. +342 −0 resource.h
  131. +16 −0 trayman/Resource.h
  132. +252 −0 trayman/TrayMan.cpp
  133. +10 −0 trayman/TrayMan.def
  134. +4 −0 trayman/TrayMan.h
  135. +128 −0 trayman/TrayMan.rc
  136. +168 −0 trayman/TrayMan2.dsp
  137. +13 −0 trayman/res/TrayMan.rc2
@@ -0,0 +1,274 @@
+// AutoEntry.cpp : implementation file
+//
+#pragma warning(disable: 4768)
+
+#include <windows.h>
+#include <objbase.h>
+#include <commctrl.h>
+#include <winuser.h>
+#include "AutoEntry.h"
+#include "AutoFunction.h"
+#include "HackItSettings.h"
+#include "SettingsDlg.h"
+#include "defines.h"
+#include "resource.h"
+
+extern int (__stdcall *MySetLayeredWindowAttributes)(struct HWND__ *,unsigned long,unsigned char,unsigned long);
+
+/////////////////////////////////////////////////////////////////////////////
+// AutoEntryDlg dialog
+
+void GetWindowFileName(struct HWND__ *,char *,int);
+
+AutoEntryDlg::AutoEntryDlg(HWND hWndParent, HINSTANCE hInstance)
+{
+ m_hWndParent = hWndParent;
+ m_hInstance = hInstance;
+}
+
+void AutoEntryDlg::Initialize(SettingsDlg *pdlg, int function)
+{
+ m_pSettingsDlg = pdlg;
+ m_Function = function;
+}
+
+void AutoEntryDlg::OnOK()
+{
+ AutoFunction *function;
+ char filename[STRING_BUFFER_SIZE], winclass[STRING_BUFFER_SIZE], title[STRING_BUFFER_SIZE];
+ char text[STRING_BUFFER_SIZE];
+ char name[STRING_BUFFER_SIZE];
+ int result;
+
+ GetDlgItemText(m_hWnd, IDC_ENTRYNAME, name, STRING_BUFFER_SIZE);
+
+ if (strlen(name) == 0) {
+ MessageBox(m_hWnd, "You did not enter anything for 'Name'", "Name Field Required", MB_OK);
+ return;
+ }
+
+ function = new AutoFunction();
+
+ GetDlgItemText(m_hWnd, IDC_CLASSCOMBO, winclass, STRING_BUFFER_SIZE);
+ function->setWinClass(winclass);
+
+ GetDlgItemText(m_hWnd, IDC_TITLECOMBO, title, STRING_BUFFER_SIZE);
+ function->setTitle(title);
+
+ GetDlgItemText(m_hWnd, IDC_FILENAMECOMBO, filename, STRING_BUFFER_SIZE);
+ function->setFilename(filename);
+
+ if (strlen(winclass) == 0 && strlen(filename) == 0 && strlen(title) == 0) {
+ if (MessageBox(m_hWnd, "You have not entered any criteria to match.\nThis function could apply to ALL windows, including children.\nAre you sure you want to do this?",
+ "Global Function Warning",
+ MB_YESNO | MB_ICONEXCLAMATION) & IDOK) {
+
+ return;
+ }
+ }
+
+ GetDlgItemText(m_hWnd, IDC_SPECIALTEXT, text, STRING_BUFFER_SIZE);
+ function->setSpecialData(text);
+
+ GetDlgItemText(m_hWnd, IDC_ALTERNATETEXT, text, STRING_BUFFER_SIZE);
+ function->setAlternateData(text);
+
+ function->setResize(IsDlgButtonChecked(m_hWnd, IDC_RESIZECHECK));
+ function->setResizeH(GetDlgItemInt(m_hWnd, IDC_RESIZEHEIGHT, NULL, FALSE));
+ function->setResizeW(GetDlgItemInt(m_hWnd, IDC_RESIZEWIDTH, NULL, FALSE));
+ function->setMove(IsDlgButtonChecked(m_hWnd, IDC_MOVECHECK));
+ function->setMoveX(GetDlgItemInt(m_hWnd, IDC_MOVEX, NULL, FALSE));
+ function->setMoveY(GetDlgItemInt(m_hWnd, IDC_MOVEY, NULL, FALSE));
+
+ function->setWindowAction(SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_GETCURSEL, 0, 0));
+ function->setTopmostAction(SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_GETCURSEL, 0, 0));
+ function->setVisibilityAction(SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_GETCURSEL, 0, 0));
+ if (MySetLayeredWindowAttributes) {
+ function->setTransparency(SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_GETCURSEL, 0, 0));
+ }
+ function->setPriorityAction(SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_GETCURSEL, 0, 0));
+ function->setDestructionAction(SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_GETCURSEL, 0, 0));
+ function->setSpecialAction(SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_GETCURSEL, 0, 0));
+ function->setAlternateTarget(SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_GETCURSEL, 0, 0));
+ function->setTrayIcon(IsDlgButtonChecked(m_hWnd, IDC_TRAYCHECK));
+ function->setTopOnly(IsDlgButtonChecked(m_hWnd, IDC_TOPCHECK));
+ function->setCaseSensitive(IsDlgButtonChecked(m_hWnd, IDC_CASESENSITIVE));
+
+ result = SendDlgItemMessage(m_hWndParent, IDC_AUTOENTRIES, LB_FINDSTRINGEXACT, -1, (LPARAM)name);
+ if (result == LB_ERR ||
+ m_Function >= 0) {
+ m_pSettingsDlg->AddEditFunction(name, function);
+ EndDialog(m_hWnd, IDOK);
+ } else {
+ MessageBox(m_hWnd, "Your 'Name' field is not unique.", "Unique Name", MB_OK);
+ }
+}
+
+BOOL AutoEntryDlg::OnInitDialog(WPARAM wParam, LPARAM lParam)
+{
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_ADDSTRING, 0, (LONG)"Restore");
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_ADDSTRING, 0, (LONG)"Minimize");
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_ADDSTRING, 0, (LONG)"Maximize");
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Stays on Top");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_ADDSTRING, 0, (LONG)"Doesn't Stay on Top");
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
+ SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_ADDSTRING, 0, (LONG)"Visible");
+ SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_ADDSTRING, 0, (LONG)"Hidden");
+ SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_SETCURSEL, 0, 0);
+ if (MySetLayeredWindowAttributes) {
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"None");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"10%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"20%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"30%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"40%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"50%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"60%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"70%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"80%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"90%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_ADDSTRING, 0, (LONG)"100%");
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_SETCURSEL, 0, 0);
+ } else {
+ EnableWindow(GetDlgItem(m_hWnd, IDC_TRANSPARENCYCOMBO), FALSE);
+ EnableWindow(GetDlgItem(m_hWnd, IDC_TRANSPARENCYSTATIC), FALSE);
+ }
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_ADDSTRING, 0, (LONG)"No Change");
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_ADDSTRING, 0, (LONG)"Idle");
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_ADDSTRING, 0, (LONG)"Normal");
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_ADDSTRING, 0, (LONG)"High");
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_ADDSTRING, 0, (LONG)"Real-Time");
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_ADDSTRING, 0, (LONG)"Don't Destroy");
+ //SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_ADDSTRING, 0, (LONG)"Prevent Creation");
+ SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_ADDSTRING, 0, (LONG)"Close Window");
+ SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_ADDSTRING, 0, (LONG)"End Task");
+ SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_ADDSTRING, 0, (LONG)"Nothing");
+ SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_ADDSTRING, 0, (LONG)"Press Button");
+ //SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_ADDSTRING, 0, (LONG)"Enter Text");
+ SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_SETCURSEL, 0, 0);
+ SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_ADDSTRING, 0, (LONG)"None");
+ SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_ADDSTRING, 0, (LONG)"Act on Child");
+ SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_ADDSTRING, 0, (LONG)"Act on Parent");
+ SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_SETCURSEL, 0, 0);
+ CheckDlgButton(m_hWnd, IDC_CASESENSITIVE, FALSE);
+ CheckDlgButton(m_hWnd, IDC_TOPCHECK, TRUE);
+
+ if (m_Function >= 0) {
+ AutoFunction *af;
+ char astring[STRING_BUFFER_SIZE];
+
+ SendDlgItemMessage(m_hWndParent, IDC_AUTOENTRIES, LB_GETTEXT, m_Function, (LPARAM)astring);
+ SetDlgItemText(m_hWnd, IDC_ENTRYNAME, astring);
+ EnableWindow(GetDlgItem(m_hWnd, IDC_ENTRYNAME), FALSE);
+ af = (AutoFunction*)SendDlgItemMessage(m_hWndParent, IDC_AUTOENTRIES, LB_GETITEMDATA, m_Function, 0);
+
+ SetDlgItemText(m_hWnd, IDC_TITLECOMBO, af->getTitle().c_str());
+ SetDlgItemText(m_hWnd, IDC_CLASSCOMBO, af->getWinClass().c_str());
+ SetDlgItemText(m_hWnd, IDC_FILENAMECOMBO, af->getFilename().c_str());
+ SetDlgItemText(m_hWnd, IDC_SPECIALTEXT, af->getSpecialData().c_str());
+ SetDlgItemText(m_hWnd, IDC_ALTERNATETEXT, af->getAlternateData().c_str());
+ SetDlgItemInt(m_hWnd, IDC_RESIZEHEIGHT, af->getResizeH(), FALSE);
+ SetDlgItemInt(m_hWnd, IDC_RESIZEWIDTH, af->getResizeW(), FALSE);
+ SetDlgItemInt(m_hWnd, IDC_MOVEX, af->getMoveX(), FALSE);
+ SetDlgItemInt(m_hWnd, IDC_MOVEY, af->getMoveY(), FALSE);
+
+ SendDlgItemMessage(m_hWnd, IDC_WINDOWCOMBO, CB_SETCURSEL, af->getWindowAction(), 0);
+ SendDlgItemMessage(m_hWnd, IDC_TOPMOSTCOMBO, CB_SETCURSEL, af->getTopmostAction(), 0);
+ SendDlgItemMessage(m_hWnd, IDC_VISIBILITYCOMBO, CB_SETCURSEL, af->getVisibilityAction(), 0);
+ if (MySetLayeredWindowAttributes) {
+ SendDlgItemMessage(m_hWnd, IDC_TRANSPARENCYCOMBO, CB_SETCURSEL, af->getTransparency(), 0);
+ } else {
+ EnableWindow(GetDlgItem(m_hWnd, IDC_TRANSPARENCYCOMBO), FALSE);
+ EnableWindow(GetDlgItem(m_hWnd, IDC_TRANSPARENCYSTATIC), FALSE);
+ }
+ SendDlgItemMessage(m_hWnd, IDC_PRIORITYCOMBO, CB_SETCURSEL, af->getPriorityAction(), 0);
+ SendDlgItemMessage(m_hWnd, IDC_DESTRUCTIONCOMBO, CB_SETCURSEL, af->getDestructionAction(), 0);
+ SendDlgItemMessage(m_hWnd, IDC_SPECIALCOMBO, CB_SETCURSEL, af->getSpecialAction(), 0);
+ SendDlgItemMessage(m_hWnd, IDC_ALTERNATECOMBO, CB_SETCURSEL, af->getAlternateTarget(), 0);
+
+ CheckDlgButton(m_hWnd, IDC_RESIZECHECK, af->getResize());
+ CheckDlgButton(m_hWnd, IDC_MOVECHECK, af->getMove());
+ CheckDlgButton(m_hWnd, IDC_TRAYCHECK, af->getTrayIcon());
+ CheckDlgButton(m_hWnd, IDC_TOPCHECK, af->getTopOnly());
+ CheckDlgButton(m_hWnd, IDC_CASESENSITIVE, af->getCaseSensitive());
+ }
+
+ HWND window;
+ char buffer[256];
+
+ window = GetWindow(GetDesktopWindow(), GW_CHILD);
+
+ while (window != NULL) {
+ GetWindowText(window, buffer, 256);
+ if (buffer[0] >= '!' && SendDlgItemMessage(m_hWnd, IDC_TITLECOMBO, CB_FINDSTRINGEXACT, 0, (LPARAM)buffer) == CB_ERR) {
+ SendDlgItemMessage(m_hWnd, IDC_TITLECOMBO, CB_ADDSTRING, 0, (LONG)buffer);
+ }
+
+ GetWindowFileName(window, buffer, 256);
+ if (buffer[0] >= '!' && SendDlgItemMessage(m_hWnd, IDC_FILENAMECOMBO, CB_FINDSTRINGEXACT, 0, (LPARAM)buffer) == CB_ERR) {
+ SendDlgItemMessage(m_hWnd, IDC_FILENAMECOMBO, CB_ADDSTRING, 0, (LONG)buffer);
+ }
+
+ GetClassName(window, buffer, 256);
+ if (buffer[0] >= '!' && SendDlgItemMessage(m_hWnd, IDC_CLASSCOMBO, CB_FINDSTRINGEXACT, 0, (LPARAM)buffer) == CB_ERR) {
+ SendDlgItemMessage(m_hWnd, IDC_CLASSCOMBO, CB_ADDSTRING, 0, (LONG)buffer);
+ }
+
+ window = GetWindow(window, GW_HWNDNEXT);
+ }
+
+ return TRUE;
+}
+
+BOOL CALLBACK AutoEntryDlg::DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+{
+ AutoEntryDlg* theDlg = (AutoEntryDlg*)GetWindowLong(hWnd, GWL_USERDATA);
+
+ switch (uMsg) {
+ case WM_INITDIALOG:
+ theDlg = (AutoEntryDlg*)lParam;
+ theDlg->m_hWnd = hWnd;
+ SetWindowLong(hWnd, GWL_USERDATA, (LONG)theDlg);
+ theDlg->OnInitDialog(wParam, lParam);
+ return TRUE;
+ case WM_COMMAND:
+ return theDlg->OnCommand(wParam, lParam);
+ break;
+ }
+
+ return FALSE;
+}
+
+BOOL AutoEntryDlg::OnCommand(WPARAM wParam, LPARAM lParam) {
+ switch (HIWORD(wParam)) {
+ case BN_CLICKED:
+ switch (LOWORD(wParam)) {
+ case IDOK:
+ OnOK();
+ return TRUE;
+ break;
+ case IDCANCEL:
+ OnCancel();
+ return TRUE;
+ break;
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
+int AutoEntryDlg::DoModal()
+{
+ return DialogBoxParam(m_hInstance, MAKEINTRESOURCE(IDD_AUTOENTRY), m_hWndParent, DialogProc, (LPARAM)this);
+}
+
+void AutoEntryDlg::OnCancel()
+{
+ EndDialog(m_hWnd, IDCANCEL);
+}
@@ -0,0 +1,25 @@
+class SettingsDlg ;
+/////////////////////////////////////////////////////////////////////////////
+// AutoEntryDlg dialog
+#include "AutoFunction.h"
+
+class AutoEntryDlg
+{
+ HWND m_hWndParent;
+ HWND m_hWnd;
+ HINSTANCE m_hInstance;
+// Construction
+public:
+ void OnCancel();
+ int DoModal();
+ BOOL OnCommand(WPARAM wParam, LPARAM lParam);
+ static BOOL CALLBACK DialogProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
+ void Initialize(SettingsDlg* pdlg , int function);
+ SettingsDlg* m_pSettingsDlg;
+ int m_Function ;
+ AutoEntryDlg(HWND hWndParent, HINSTANCE hInstance); // standard constructor
+
+protected:
+ void OnOK();
+ BOOL OnInitDialog(WPARAM wParam, LPARAM lParam);
+};
Oops, something went wrong.

0 comments on commit 5dccf11

Please sign in to comment.