Print Page | Close Window

My Component within Markup

Printed From: Codejock Forums
Category: General
Forum Name: XAML Snippets
Forum Description: Post your XAML snippets here for everyone to enjoy :)
URL: http://forum.codejock.com/forum_posts.asp?TID=12878
Printed Date: 04 December 2024 at 3:49am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: My Component within Markup
Posted By: BobWansink
Subject: My Component within Markup
Date Posted: 10 December 2008 at 4:41am
Hi!

I'd like to place one of my CWnd derived panels inside a (created) CXTPMarkupObject. Is this possible? If not, will this functionality be added?

[edit]
I just thought of another question:
What is the default setup for XAML in resource files? So far, I've created a Custom type ("XAML") and added a *.XAML file to it. Do i have to use FindResource/LoadResource with RT_RCDATA? if so, how do I use the HGLOBAL that function returns?
[/edit]

Thanks!

Bob


-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++



Replies:
Posted By: Oleg
Date Posted: 10 December 2008 at 3:24pm
Hi,
 
You can use HTML type:
 
IDR_SPIRAL              HTML    MOVEABLE PURE   "res\\spiral.xml"
 
 HRSRC hRsrc = ::FindResource(hInstance, lpszResourceName, RT_HTML);
 if (hRsrc == NULL)
  return FALSE;
 HGLOBAL hGlobal = LoadResource(hInstance, hRsrc);
 if (hGlobal == NULL)
  return FALSE;
 LPCSTR pData = (LPCSTR)LockResource(hGlobal);
 if (pData == NULL)
  return FALSE;


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: BobWansink
Date Posted: 11 December 2008 at 3:10am
thanks!

-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++


Posted By: BobWansink
Date Posted: 11 December 2008 at 6:32am
I'm still trying to place one of my CWnd derived panels inside a (created) CXTPMarkupObject... Is this possible? 

-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++


Posted By: Oleg
Date Posted: 11 December 2008 at 7:18am
No :(
 
You can add some Border object to Markup, render markup, determine posiotn of this Border and then move your CWnd panel to this position.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: BobWansink
Date Posted: 11 December 2008 at 9:33am
Thanks oleg.

I like the workaround! will it be added sometime in the future?


-------------
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++


Posted By: Moritz
Date Posted: 31 December 2008 at 9:47am
This would be like some child alignment manager, something that we are missing in the MFC and which would be very usefull especially for designing dynamic dialog layouts for example. combined with the drawing power of markup, this would be great to even have nice bitmap background windows with dynamically aligned transparent child windows in it.
 
A child window alignment manager would be in general a good addition to the XTResize functionality, maybe even combined with markup.
 
Greetings Moritz Leutenecker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net