Article View: borland.public.cppbuilder.nativeapi
Article #2972Re: Calling .Net code
From: Bob Piskac
Date: Wed, 25 Oct 2006 12:45
Date: Wed, 25 Oct 2006 12:45
27 lines
2006 bytes
2006 bytes
Let me see if I understand correctly.... 1) From my unmanaged CPP application I call PInvoke and pass my window handle. 2) In my .NET class function I get the handle as a parameter and call the win32 API SetParent(). It's that easy? Remy Lebeau (TeamB) wrote: > "Bob Piskac" <bob@pbsoftware.com> wrote in message > news:453e737f$1@newsgroups.borland.com... > >> I want to display a managed code button in my unmanaged CPP application. > > Managed controls can only (officially) appear inside of other managed > controls and managed windows. There is no direct access available to > specify an unmanaged owner window for a managed control. So you will need > to either have your unmanaged application tell the assembly to show its own > managed window, or else you will have to use PInvoke to call the Win32 API > SetParent() function to reparent the managed control's Handle to an > unmanaged parent window. > > > Gambit > >
Technical Details
Message-ID:
<453f5c29$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45319f54$1@newsgroups.borland.com> <4533c3b4$1@newsgroups.borland.com> <453e737f$1@newsgroups.borland.com> <453e7b63$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,930b64d8f249fdd6 X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Wed, 25 Oct 2006 08:45:38 -0400 From: Bob Piskac <bob@pbsoftware.com> User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Calling .Net code References: <45319f54$1@newsgroups.borland.com> <4533c3b4$1@newsgroups.borland.com> <453e737f$1@newsgroups.borland.com> <453e7b63$1@newsgroups.borland.com> In-Reply-To: <453e7b63$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.154.8.58 Message-ID: <453f5c29$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1161780265 24.154.8.58 (25 Oct 2006 05:44:25 -0700) Lines: 27 Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail