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.

89 lines
2.2 KiB

  1. /*++
  2. Copyright (c) 1996 Microsoft Corporation
  3. Module Name:
  4. dialogs.c
  5. Abstract:
  6. This file implements the dialog proc for the station
  7. identifier page (tsid & csid).
  8. Environment:
  9. WIN32 User Mode
  10. Author:
  11. Wesley Witt (wesw) 17-Feb-1996
  12. --*/
  13. #include "wizard.h"
  14. #pragma hdrstop
  15. LRESULT
  16. StationIdDlgProc(
  17. HWND hwnd,
  18. UINT msg,
  19. WPARAM wParam,
  20. LPARAM lParam
  21. )
  22. {
  23. switch( msg ) {
  24. case WM_INITDIALOG:
  25. SendDlgItemMessage( hwnd, IDC_FAX_PHONE, EM_SETLIMITTEXT, LT_FAX_PHONE, 0 );
  26. break;
  27. case WM_NOTIFY:
  28. switch( ((LPNMHDR)lParam)->code ) {
  29. case PSN_SETACTIVE:
  30. if (Unattended) {
  31. UnAttendGetAnswer(
  32. UAA_FAX_PHONE,
  33. (LPBYTE) WizData.Csid,
  34. LT_FAX_PHONE
  35. );
  36. _tcscpy( WizData.Tsid, WizData.Csid );
  37. SetWindowLong( hwnd, DWL_MSGRESULT, -1 );
  38. return TRUE;
  39. }
  40. if (InstallMode != INSTALL_NEW) {
  41. SetWindowLong( hwnd, DWL_MSGRESULT, -1 );
  42. return TRUE;
  43. }
  44. break;
  45. case PSN_WIZNEXT:
  46. SendDlgItemMessage(
  47. hwnd,
  48. IDC_FAX_PHONE,
  49. WM_GETTEXT,
  50. LT_FAX_PHONE,
  51. (LPARAM) WizData.Csid
  52. );
  53. if (!WizData.Csid[0]) {
  54. PopUpMsg( hwnd, IDS_CSID, TRUE, 0 );
  55. SetFocus( GetDlgItem( GetParent( hwnd ), IDCANCEL ));
  56. PostMessage( hwnd, WM_NEXTDLGCTL, 1, FALSE );
  57. PostMessage( hwnd, WM_NEXTDLGCTL, 1, FALSE );
  58. PostMessage( hwnd, WM_NEXTDLGCTL, 1, FALSE );
  59. SetWindowLong( hwnd, DWL_MSGRESULT, -1 );
  60. return TRUE;
  61. }
  62. _tcscpy( WizData.Tsid, WizData.Csid );
  63. break;
  64. }
  65. break;
  66. }
  67. return FALSE;
  68. }