Path: utzoo!utgpu!watserv1!watmath!att!tut.cis.ohio-state.edu!cs.utexas.edu!wuarchive!uunet!rlgvax!bdmrrr!davis From: davis@bdmrrr.bdm.com (Arthur Davis x4675) Newsgroups: comp.windows.ms Subject: MessageBox problem Message-ID: <1990Sep9.224303.10981@bdmrrr.bdm.com> Date: 9 Sep 90 22:43:03 GMT Organization: BDM International Lines: 18 Someone mentioned having a problem with garbled strings in a MessageBox call; i.e. MessageBox (hDlg, "abc", "xyz", MB_OK) produces garbage on the display. Unless you are working in large model (which you shouldn't be without VERY good reasons), quoted string literals are certain to be passed as near addresses. The declaration of the string parameters in the MessageBox function is LPSTR, or the long address of string. What is happening to you I guess is that Windows is moving your segment around and the near addresses of your strings is becoming invalid, leaving you with screen crud. Try this: MessageBox (hDlg, (LPSTR) "abc", (LPSTR) "xyz", MB_OK); This will force the pass of a FAR or long address and should solve your problem.