Parent C# application hangs whith embedded C++ Builder XE application

I have an application .net written in C# with Microsoft Visual Studio 2010. The application main window has some tabs. One of this contains a frame which is set as parent of the main window of a second application, written with C++ Builder XE and launched by main application. The two applications communicate by SendMessage, and child application, in order to do this, contains a frame whose WindowProc has been assigned a new function (the frame contains also controls for interaction with the user).
The tab containing the child application is not active at statup, during startup the child application is launched and all works well. Then user activates the tab, the main application sets focus on child application frame in order to allow interaction with user, the child application works well but parent application hangs: when user clicks an icon on toolbar of parent application the event is not processed by the parent application. I inserted a TApplicationEvents in child application and I found that c
lick event, instead, is processed by child application.
Previous clild application version was build with C++ Builder 5, and all worked well.

Here I report some code in child application:

//--- Application main

WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
extern HWND OwnerHWND;

    try
    {
// Parent application sends frame handle as first parameter
         if ( ParamCount() > 1 ) OwnerHWND = (HWND)ParamStr(1).ToInt(); 
         Application->Initialize();
         Application->MainFormOnTaskBar = true;
         Application->CreateForm(__classid(TFormMain), &FormMain);
         Application->Run();
    }
    catch (Exception &exception)
    {
         Application->ShowException(&exception);
    }
//…

//--- Application main window

HWND OwnerHWND = NULL;
void __fastcall TFormMain::CreateParams(TCreateParams &Params)
{
  TForm::CreateParams (Params);

  if ( OwnerHWND )
  {
    Params.WndParent = OwnerHWND;
    Params.Caption =  L"Client application caption";
    Params.Style = WS_CHILD | WS_CLIPSIBLINGS;
  }
}
thanks for the help
0
Alberto
9/7/2011 11:55:25 AM
embarcadero.cppbuilder.using 1848 articles. 1 followers. Follow

1 Replies
1062 Views

Similar Articles

[PageSpeed] 40

Resolved by myself
0
Alberto
10/4/2011 11:26:00 AM
Reply:

Similar Artilces:

how to end a .exe application in web application using c#
i'm currently working out with a project which require to run a .exe application in a web application.but the problem is once i run the .exe application and i click the "X" button to close it, it will still appear in task manager processes.anyone have an idea of how to end the application in both window and  task manager too?thanks for your helping.. Hi, kill the process,  process.stop() Hope it helps Stoian Bucovich www.snb-bg.com   =================================================== Please  don't forget to mark as "Answered". Thanks...

Going from C++ Builder XE Achitect Trial to C++ Builder Professional XE
What are the correct steps that I need to perform to go from a trial of C++ Builder XE Architect Trial to a purchased copy of C++ Builder Professional XE? I want to make sure that no traces are left from the installation of the trial version. Thanks I phoned support and here is the reply: Run the 'Modify, Repair, Uninstall' link in the Embarcadero start menu. Then choose 'Upgrade' and follow instructions. ...

How to use JNI to start JVM in builder C++ application
So i need to use jni to call java method. i started with this code : {code} JNIEnv *env1; JavaVM** jvm1; JavaVMInitArgs vm_args1; JavaVMOption options1[1]; options1[0].optionString = "-Djava.class.path=D:\\Java Src\\TestStruct"; //Path to the java source code vm_args1.version = JNI_VERSION_1_6; //JDK version. This indicates version 1.6 vm_args1.nOptions = 1; vm_args1.options = options1; vm_args1.ignoreUnrecognized = 0; int reAt = JNI_CreateJavaVM(jvm1, (void**)&env1, &vm_args1); if(reAt < 0) Label1->Caption = "failed"; else Label1->...

Windows Principle security working in C#.NET Windows application, but not on ASP.NET Web Application with C#.NET as code behind
AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal); WindowsPrincipal usrPrincipal = (WindowsPrincipal)Thread.CurrentPrincipal; WindowsIdentity usrIdentity = (WindowsIdentity)usrPrincipal.Identity; String usrPrincipalName = usrPrincipal.Identity.Name; String usrPrincipalType = usrPrincipal.Identity.AuthenticationType; String usrPrincipalAuth = usrPrincipal.Identity.IsAuthenticated.ToString()   Can you check why this code is not working in Web application, however it is working in Windows application  Is it crashing at runtime? Not compiling? What...

Can I create Windows mobile applications with C++Builder XE?
Hi Can I create Windows mobile applications with C++Builder XE? Thanks Barak Am 01.12.2010 08:15, schrieb barak kurant: > Can I create Windows mobile applications with C++Builder XE? No. You need a cross compiler for the target platform and the appropriate SDKs. Both should be available here: http://create.msdn.com Christian > {quote:title=barak kurant wrote:}{quote} > Can I create Windows mobile applications with C++Builder XE? If you have some pascal code, you can use FPC - for instance with http://opensoft.homeip.net:8080/fpgui ...

Convert to C++ Builder XE from C++ Builder 6 and 2007
Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? On 6/20/2012 8:20 AM, Girish Duddu wrote: > Any information regarding the roadblocks of converting the code build in C++ Builder 6,2007 to C++ Builder XE? The big change is the default string in XE is UnicodeString rather than AnsiString. All VCL String properites (Text, etc.) are Unicode in XE. There are good white papers regarding making this transition on the Embarcadero EDN site. I found that most of the changes I had to make fell into two categories: 1) Places...

How Can I use the compliers used under Dev-C++ in C++ builder?
How Can I use the compliers (for instance GCC, ...) used under Dev-C++ in C++ builder? In my program,I used boost lambda expression under Dev-C++ due to the fact that C++ builder 2009 do not support such expression. But Dev-C++ do not support RAD(rapid application development). It is hard to establish the common graphic GUI under windows.So I want to use the compliers of Dev-C++ in C++ builder. And I do not know how to manage it. Where can I get the related materials or advices? Can any one with kindness help me? Il Tue, 11 Aug 2009 23:29:59 -0700, lserjt lserjt <> ha scritto:...

Memory limit vcl forms application c++ builder xe 32 bit
Hi, I use C++ Builder XE and the code below (with new project "VCL Forms Application - C++ Builder" 32 bit) has memory limits. I'd like to know if someone has a C++ Builder succeeding XE that can compile 64 bit and create an executable of type PE32+ (not PE) and test this code to see if the limit increase. Thanks, Best Regards. Davide #include <vector> //--------------------------------------------------------------------------- class ObjectSize { public: char ca[100]; }; //-----------------------------------------------------------------------...

Memory limit vcl forms application c++ builder xe 32 bit [Edit]
Hi, I use C++ Builder XE and the code below (with new project "VCL Forms Application - C++ Builder" 32 bit) has memory limits. I'd like to know if someone has a C++ Builder succeeding XE that can compile 64 bit and create an executable of type PE32+ (not PE) and test this code to see if the limit increase. Thanks, Best Regards. Davide #include <vector> //--------------------------------------------------------------------------- class ObjectSize { public: char ca[100]; }; //-----------------------------------------------------------------------...

I can't update MySQL database directly from C++ Builder XE application
I have a database application written in C++ Builder XE languange called SpeZet. I use MySQL Remote Server database. Sometimes I insert the data directly from SpeZet into the "tbtime" table on the Remote MySQL Server and it worked but when I try to update the record directly from SpeZet, I got any error message like this: *Project SpeZet.exe raised exception class TDBXError with message 'Table 'SpeZet.tbtime' doesn't exist* Whereas the tbtime table is really exists in the database. When I try to continue the process, I got error message again like this: *...

BUG (or issue) with Indy, C++ Builder 2010 and C++ Builder XE [Edit]
To reproduce this issue you need a clean installation (from scratch, no additional components installed, no Indy update) of C++ Builder 2010 or XE. It uses Indy 10.5.5 (with 2010) or 10.5.7 (with XE). Note: although it uses Indy to reproduce the issue, the version of Indy and Indy itself is not the one that causes this problem but the linking of C++ binary probably. Steps to reproduce: 1. Create a simple text file with the following content. Save it as "file.txt" or any other name. It can be also full email message but the text below is enough. {code} Subject: =?windows-125...

Integrating a C# desktop application and a Web application
I have a web application which mainly is concerned with the registration of a user, the user once registered can communicate with the C# desktop application using a cmd prompt, the C# application is more like a server. Is there anyway i can simultaneously access the same database by both the desktop and web applications ?And most importantly how do i deploy this ? Would it need a dedicated machine to host it ? Or is it somehow possible to use the C# desktop class in the asp.net website and Always keep it running ?  Hi Read this article here maybe can help you: http://www.dev...

C C++ application in SUSE 11.4
Hi Does anyone knows the c or c++ application used in open suse 11.4 (KDE) ??? -- soni_shrikant ------------------------------------------------------------------------ Hi there, Welcome to the forum. Can you please clarify what you are looking for? Are you wondering what compiler is used (gcc/g++) or what development environment exists for KDE (kdevelop) or something else? Cheers, -- LewsTherinTelemon ------------------------------------------------------------------------ LewsTherinTelemon's Profile: http://forums.opensuse.org/member.php?userid=14...

A web application with C# to compile C# files
 I have create a website to compile a C# file this works some times on the visual studio 8 debug server some time some times it does'nt . This code how ever when run on IIS ver 5.1 that comes along with the windows XP. I have installed the file required to run .aspx pages. The code of the website  is as follows: The front end code: Default.sapx <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http:...

Web resources about - Parent C# application hangs whith embedded C++ Builder XE application - embarcadero.cppbuilder.using

Application - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Pre-Christmas job application rush hits Australian public service
Speed required for pre-Christmas job window opening for public servants. Check out who is hiring.

Second visa application 'likely' to be approved
The family of a terminally ill Pakistani student can 'hopefully come to Australia sooner rather than later' says Immigration Minister Peter Dutton. ...

Cloud application adoption increases 71 percent in 2015
The adoption of cloud applications is soaring, up by 71 percent in the last year according to the results of a new survey. The latest Cloud ...

Tashfeen Malik's visa application under scrutiny - Business Insider Deutschland
The US government has released the visa application for Tashfeen Malik, who along with her husband killed 14 people in an attack in San Bernardino, ...

MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey, Purchase Applications up 34% YoY
From the MBA: Mortgage Applications Decrease in Latest MBA Weekly Survey Mortgage applications decreased 1.1 percent from one week earlier, ...

Lawmaker: Immigration Officials Didn’t Fully Vet Tashfeen Malik’s Visa Application
"It’s unacceptable that U.S. Citizenship and Immigration Services did not fully vet Malik’s application and instead sloppily approved her visa," ...

German-Based Spirea Promotes Decentralized PV Applications In Uruguay
... Its technical operations specialist, Laurie Lawrence, pointed out that Uruguay [&hellip German-Based Spirea Promotes Decentralized PV Applications ...

Visa application of San Bernardino shooter released
CNN Visa application of San Bernardino shooter released CNN (CNN) The visa application of one of the San Bernardino shooters was released ...

ZTE to develop smartphone application processors in house
ZTE has stepped up its efforts to internally develop smartphone chipset solutions, aiming to re-capture the title as one of the top-three smartphone ...

Resources last updated: 12/24/2015 8:18:24 AM