Click here to Skip to main content
15,894,896 members

How to display message box similar to modal dialog without knowing windows handler, in C++/VC++ without or using MFC

drcool23 asked:

Open original thread
Problem: How do display the message box that is error comes while device operating. This message box should be work like Modal dialog. However, I do not have information about windows handler (VB application window) to pass the Handle to the owner window of the message box to be created. Since, I do not have VB code; I have only VB application executables. I need to implement this error message display functionality in in C++/VC++ win32 application DLL.

I have tried MessageBox, However, I think that it will not be that much appropriate in this scenario.

Additional Information: -

1. Existing scenario: I have an existing application that was develop using VB language and in additions to that this application uses the Win32 dll (Not using MFC) and this dll developed using C++ on VC++ 6.0 platform. It also has OCX active X component that translate the different language (VB and C++) message/command. In short Device ( layer1 ) <-- --RS232C serial comm. --> C++/VC++ DLL (device communication interface) ( layer2 ) <-- -- > OCX (Translator) ( layer3 ) < -- --> VB Front end application( layer4 )

2. New Requirement: I have to enhance this application to provide solution for new device support and I should upgrade/ enhance the DLL Win32 dll only (not front end application)This DLL have the device interface business logic so I need to upgrade this device interface dll. I have upgraded this interface C++/VC++ DLL but problem occur for following scenario design and implementation time:

3. Condition – Will not be required any changes to VB application front-end side. Displayed message box should be work like modal dialog box without knowing windows handler. Message would be implemented at C++/VC++ dll layer. So my question is, please any friend suggest me on How to display device functionality related error information and that error elimination information.
Tags: C++

Plain Text
ASM
ASP
ASP.NET
BASIC
BAT
C#
C++
COBOL
CoffeeScript
CSS
Dart
dbase
F#
FORTRAN
HTML
Java
Javascript
Kotlin
Lua
MIDL
MSIL
ObjectiveC
Pascal
PERL
PHP
PowerShell
Python
Razor
Ruby
Scala
Shell
SLN
SQL
Swift
T4
Terminal
TypeScript
VB
VBScript
XML
YAML

Preview



When answering a question please:
  1. Read the question carefully.
  2. Understand that English isn't everyone's first language so be lenient of bad spelling and grammar.
  3. If a question is poorly phrased then either ask for clarification, ignore it, or edit the question and fix the problem. Insults are not welcome.
  4. Don't tell someone to read the manual. Chances are they have and don't get it. Provide an answer or move on to the next question.
Let's work to help developers, not make them feel stupid.
Please note that all posts will be submitted under the http://www.codeproject.com/info/cpol10.aspx.



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900