Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.2 KiB

  1. #include "precomp.h"
  2. #include "resource.h"
  3. #include "global.h"
  4. #include "nmakwiz.h"
  5. ////////////////////////////////////////////////////////////////////////////////////////////////////
  6. //#include <crtdbg.h>
  7. //#ifdef _DEBUG
  8. //#undef THIS_FILE
  9. //static char THIS_FILE[] = __FILE__;
  10. //#define new new( _NORMAL_BLOCK, THIS_FILE, __LINE__)
  11. //#endif
  12. ////////////////////////////////////////////////////////////////////////////////////////////////////
  13. // Display a message box to query the user if she is sure she wants to exit the wizard
  14. // Returns TRUE if the user wants to quit, else returns FALSE
  15. BOOL VerifyExitMessageBox(void)
  16. {
  17. int ret = NmrkMessageBox(MAKEINTRESOURCE(IDS_DO_YOU_REALLY_WANT_TO_QUIT_THE_WIZARD_NOW),
  18. NULL, MB_YESNO | MB_DEFBUTTON2);
  19. return ( ret == IDYES ) ? TRUE : FALSE;
  20. }
  21. ////////////////////////////////////////////////////////////////////////////////////////////////////
  22. // Copy a string using the "new" allocator.... string must be deleted with delete [];
  23. //
  24. TCHAR *MakeCopyOfString( const TCHAR* sz ) {
  25. if( NULL == sz ) { return NULL; }
  26. TCHAR* local = new char[ strlen( sz ) + 1 ];
  27. if( NULL == local ) { return NULL; }
  28. lstrcpy( local, sz );
  29. return local;
  30. }