MessageBox inCPPBuilder 2007

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Aug 2007
Posts: 5
Reputation: johngw is an unknown quantity at this point 
Solved Threads: 0
johngw johngw is offline Offline
Newbie Poster

MessageBox inCPPBuilder 2007

 
0
  #1
Aug 3rd, 2007
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?
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 5
Reputation: johngw is an unknown quantity at this point 
Solved Threads: 0
johngw johngw is offline Offline
Newbie Poster

Re: MessageBox inCPPBuilder 2007

 
0
  #2
Aug 3rd, 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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 5
Reputation: johngw is an unknown quantity at this point 
Solved Threads: 0
johngw johngw is offline Offline
Newbie Poster

Re: MessageBox inCPPBuilder 2007

 
0
  #3
Sep 28th, 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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum


Views: 1358 | Replies: 2
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC