Codejock Forums Homepage
Forum Home Forum Home > General > XAML Snippets
  New Posts New Posts RSS Feed - My Component within Markup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

My Component within Markup

 Post Reply Post Reply
Author
Message
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post Topic: My Component within Markup
    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++
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post Posted: 11 December 2008 at 3:10am
thanks!
     Product: Xtreme ToolkitPro (MFC) version 13.0.0
     Platform: Windows (32bit) - XP - Vista
     Language: Visual C++
Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post 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++
Back to Top
Oleg View Drop Down
Admin Group
Admin Group
Avatar

Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
BobWansink View Drop Down
Groupie
Groupie
Avatar

Joined: 24 January 2008
Status: Offline
Points: 59
Post Options Post Options   Thanks (0) Thanks(0)   Quote BobWansink Quote  Post ReplyReply Direct Link To This Post 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++
Back to Top
Moritz View Drop Down
Groupie
Groupie
Avatar

Joined: 22 December 2005
Location: Germany
Status: Offline
Points: 11
Post Options Post Options   Thanks (0) Thanks(0)   Quote Moritz Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.