Guest User

Untitled

a guest
Oct 15th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.62 KB | None | 0 0
  1. #ifndef PLUGIN_H
  2. #define PLUGIN_H
  3.  
  4.  
  5. #include <windows.h>
  6. #include <tchar.h>
  7.  
  8.  
  9. // Plugin function that does the actual data processing.
  10. extern "C" __declspec(dllexport) void ProcessData(HWND hwndInputEdit, HWND hwndOutpuEdit)
  11. {
  12.     TCHAR buffer[MAX_PATH];
  13.     SendMessage(hwndInputEdit, WM_GETTEXT, (WPARAM)((sizeof(TCHAR)*MAX_PATH) + 1), (LPARAM)buffer);
  14.    
  15.     int szLength = 0;
  16.     for (; buffer[szLength] != 0; szLength++);
  17.    
  18.     TCHAR result[MAX_PATH];
  19.     _stprintf(result, TEXT("%s%d%s"), TEXT("The string has "), szLength, TEXT(" characters in it."));
  20.    
  21.     SetWindowText(hwndOutpuEdit, result);
  22. }
  23.  
  24.  
  25. #endif /* PLUGIN_H */
Advertisement
Add Comment
Please, Sign In to add comment