944,119 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 1768
  • C++ RSS
Aug 3rd, 2007
0

MessageBox inCPPBuilder 2007

Expand Post »
I have a project in C++Builder. It invokes Application->MessageBox in several files. I recently upgraded to C++Builder 2007. The MessageBox calls that were already there seem to work OK, but those I have added since upgrading all give an AccessViolation at Run time.
The Call Stack looks like this:

:7c812a5b kernel32.RaiseException + 0x52
:004940CC System::NotifyNonDelphiException()
:7c90378b ntdll.RtlConvertUlongToLargeInteger + 0x46
:7c90eafa ntdll.KiUserExceptionDispatcher + 0xe
:7c90f0aa ntdll.RtlAnsiStringToUnicodeString + 0x5e
:7c832874 ; C:\WINDOWS\system32\kernel32.dll
:7473d271 ; C:\WINDOWS\system32\MSCTF.dll
:7473fcfc ; C:\WINDOWS\system32\MSCTF.dll
:74740313 ; C:\WINDOWS\system32\MSCTF.dll
:7474077b ; C:\WINDOWS\system32\MSCTF.dll
:74740ec5 ; C:\WINDOWS\system32\MSCTF.dll
:7473cd8f ; C:\WINDOWS\system32\MSCTF.dll
:7e418734 USER32.GetDC + 0x6d
:7e418816 ; C:\WINDOWS\system32\USER32.dll
:7e4189cd ; C:\WINDOWS\system32\USER32.dll
:7e418a10 USER32.DispatchMessageW + 0xf
:7e42dbbf ; C:\WINDOWS\system32\USER32.dll
:7e42593f ; C:\WINDOWS\system32\USER32.dll
:7e43a91e ; C:\WINDOWS\system32\USER32.dll
:7e43a284 ; C:\WINDOWS\system32\USER32.dll
:7e4661d3 USER32.MessageBoxTimeoutW + 0x7a
:7e466278 USER32.MessageBoxTimeoutA + 0x9c
:7e450617 USER32.MessageBoxExA + 0x1b
:7e4505cf USER32.MessageBoxA + 0x45
:004CE16E Forms::TApplication::MessageBox(Self=:04BAB640, Text=????, Caption=:005351F6, Flags=????)
:0040F5A5 CEnvelope:etVartoIgnoreinPhase(this=:04B8F620, iphase=22, nx=21, ignoreindex=12, iusethisphase=:0013E5E0)

SetVartoIgnoreinPhase is my function.
The calling statement is

Application->MessageBox(messbuff, "Phase Envelopes", MB_OK);

messbuff is a char array.

The included header includes
#include <vcl.h>
ANyone know what I need to do?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
johngw is offline Offline
5 posts
since Aug 2007
Aug 3rd, 2007
0

Re: MessageBox inCPPBuilder 2007

I might add that in Forms::TApplication.MessageBox in line
Result:= Windows.MessageBox(TaskActiveWindow,Text, Caption,Flags);

Text and Caption are correct and the other arguments are the same as for a MB that works OK. Windows is {} for both MBs.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
johngw is offline Offline
5 posts
since Aug 2007
Sep 28th, 2007
0

Re: MessageBox inCPPBuilder 2007

Actually the Message Box was not really the cause of the Access Violation. I corrected something else unconnected with the message box statement and the AV went away. Don't know why it manifested as it did.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
johngw is offline Offline
5 posts
since Aug 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: help please
Next Thread in C++ Forum Timeline: CPPBuilder LINK32 Error REGISTRY.OBJ





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC