Guest User

Untitled

a guest
Oct 15th, 2014
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.13 KB | None | 0 0
  1. /* File:main.h        *
  2.  * Credits: w2ch Anon */
  3.  
  4.  
  5. #ifndef MAIN_H
  6. #define MAIN_H
  7.  
  8.  
  9. #ifndef WINVER              // Allow use of features specific to Windows 7 or later.
  10. #define WINVER 0x0700       // Change this to the appropriate value to target other versions of Windows.
  11. #endif
  12.  
  13. #ifndef _WIN32_WINNT        // Allow use of features specific to Windows 7 or later.
  14. #define _WIN32_WINNT 0x0700 // Change this to the appropriate value to target other versions of Windows.
  15. #endif
  16.  
  17. #ifndef UNICODE
  18. #define UNICODE
  19. #endif
  20.  
  21.  
  22. #define WIN32_LEAN_AND_MEAN
  23.  
  24.  
  25. // Windows Header Files:
  26. #include <windows.h>
  27.  
  28.  
  29. // C++ RunTime Header Files:
  30. #include <vector>
  31.  
  32.  
  33. /******************************************************************
  34. *                                                                 *
  35. *  #define                                                        *
  36. *                                                                 *
  37. ******************************************************************/
  38. #define NULL 0
  39.  
  40.  
  41. /******************************************************************
  42. *                                                                 *
  43. *  typedef                                                        *
  44. *                                                                 *
  45. ******************************************************************/
  46. //expect to find in the plugins
  47. typedef void(*PLUGIN_PROCESS_DATA)(HWND hwndInputEdit, HWND hwndOutpuEdit);
  48.  
  49.  
  50. /******************************************************************
  51. *                                                                 *
  52. *  Struct                                                         *
  53. *                                                                 *
  54. ******************************************************************/
  55. struct PluginElements
  56. {
  57.     HMODULE hMod;
  58.     PLUGIN_PROCESS_DATA ProcessData;
  59.     TCHAR szFileName[MAX_PATH];
  60. };
  61.  
  62.  
  63. PluginElements make_PluginElements(HMODULE &rhMod, PLUGIN_PROCESS_DATA &rProcessData, TCHAR *rFileName);
  64.  
  65.  
  66. /******************************************************************
  67. *                                                                 *
  68. *  Classes                                                        *
  69. *                                                                 *
  70. ******************************************************************/
  71. class w2chTools
  72. {
  73. public:
  74.     w2chTools();            // EnigmaApp constructor.
  75.    
  76.     bool Initialize();      // Register the window class and call methods for instantiating drawing resources.
  77.     void RunMessageLoop();  // Process and dispatch messages
  78.     void OnExit();
  79.    
  80.     void LoadPlugins();     // Load all plugin in executable directory of program that forfile the requerments.
  81.     void UnloadPlugins();   // Clean up plugins that have been loaded.
  82.    
  83. private:
  84.     // The dialog procedure.
  85.     static INT_PTR CALLBACK DialogProc(
  86.         HWND hwnd,
  87.         UINT Message,
  88.         WPARAM wParam,
  89.         LPARAM lParam);
  90.    
  91. private:
  92.     HWND m_hDlg;
  93.     HINSTANCE m_hinstRichedLib;
  94.    
  95.     std::vector<PluginElements> m_Plugins;
  96.    
  97.     HWND m_hwndInputEdit;
  98.     HWND m_hwndOutpuEdit;
  99.    
  100.     HWND m_ComboBox;
  101. };
  102.  
  103.  
  104. #endif /* MAIN_H */
Advertisement
Add Comment
Please, Sign In to add comment