home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / mswindo / programm / misc / 5259 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  1.2 KB

  1. Path: sparky!uunet!cs.utexas.edu!tamsun.tamu.edu!ffeng
  2. From: ffeng@cs.tamu.edu (Fang Feng)
  3. Newsgroups: comp.os.ms-windows.programmer.misc
  4. Subject: Need help on MessageBox in DialogBox
  5. Date: 22 Jan 1993 06:14:22 GMT
  6. Organization: Computer Science Department, Texas A&M University
  7. Lines: 28
  8. Distribution: world
  9. Message-ID: <1jo3buINN7gd@tamsun.tamu.edu>
  10. NNTP-Posting-Host: neuron.tamu.edu
  11.  
  12. Hi, netters:
  13.     I am a new Windows programmer. When I tried to put a MessageBox into
  14. a DialogBox, I encountered a problem. Following the book "Programming Windows
  15. 3.1" by Charles Petzold (p.443), I used the handle of the DialogBox as the 
  16. first parameter of MessageBox so that the program looks like:
  17.  
  18. BOOL FAR PASCAL AboutProc (HWND hDlg, UINT message, ...)
  19. {
  20. ...
  21.      case IDD_MESSAGE: 
  22.          MessageBox(hDlg, szText, szTitle, MB_OK);
  23.      break;
  24. ...
  25.  
  26. It was compiled without any error message.  However, when the message box
  27. was popped up, it was hung there and would not close when I clicked "OK"
  28. button, so I have to reboot the machine. Can anybody help me out?
  29.  
  30. Thanks in advance.
  31.  
  32. - Fang
  33.  
  34.  
  35. --
  36. ====================================================
  37. Department of Computer Science, Texas A&M University
  38. internet: ffeng@cs.tamu.edu
  39.