🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.ms-windows.programmer.misc
Article #2255

Need help on MessageBox in DialogBox

#2255
From: Fang Feng
Date: Fri, 22 Jan 1993 06:14
28 lines
1265 bytes
Hi, netters:
    I am a new Windows programmer. When I tried to put a MessageBox into
a DialogBox, I encountered a problem. Following the book "Programming Windows
3.1" by Charles Petzold (p.443), I used the handle of the DialogBox as the 
first parameter of MessageBox so that the program looks like:

BOOL FAR PASCAL AboutProc (HWND hDlg, UINT message, ...)
{
...
     case IDD_MESSAGE: 
         MessageBox(hDlg, szText, szTitle, MB_OK);
	 break;
...
} 

It was compiled without any error message.  However, when the message box
was popped up, it was hung there and would not close when I clicked "OK"
button, so I have to reboot the machine. Can anybody help me out?

Thanks in advance.

- Fang


--
====================================================
Department of Computer Science, Texas A&M University
internet: ffeng@cs.tamu.edu
Technical Details
Message-ID: <1jo3buINN7gd@tamsun.tamu.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!tamsun.tamu.edu!ffeng

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!tamsun.tamu.edu!ffeng
From: ffeng@cs.tamu.edu (Fang Feng)
Newsgroups: comp.os.ms-windows.programmer.misc
Subject: Need help on MessageBox in DialogBox
Date: 22 Jan 1993 06:14:22 GMT
Organization: Computer Science Department, Texas A&M University
Lines: 28
Distribution: world
Message-ID: <1jo3buINN7gd@tamsun.tamu.edu>
NNTP-Posting-Host: neuron.tamu.edu