Guest User

Untitled

a guest
Jun 23rd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. void Foo(CDataExchange* pDX, int ID, TCHAR string[MAX_PATH])
  2. {
  3. CString cstr(string);
  4. DDX_Text(pDX, ID, cstr);
  5. _tcscpy(string, cstr.GetString());
  6. }
  7.  
  8. void Foo(CDataExchange* pDX, int ID, TCHAR string[MAX_PATH])
  9. {
  10. CString cstr(string);
  11. DDX_Text(pDX, ID, cstr);
  12. if (MAX_PATH > (cstr.GetLength() + 1))
  13. {
  14. _tcscpy_s(string, cstr.GetLength() + 1, cstr.GetString());
  15. }
  16. }
Add Comment
Please, Sign In to add comment