Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. MFC CDialog hosting WPF components

MFC CDialog hosting WPF components

Scheduled Pinned Locked Moved WPF
questionc++csharpvisual-studiowpf
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 8833981
    wrote on last edited by
    #1

    Hi, I'm integrating some some WPF controls into a MFC dialog box. One of the control is a media player that shows live video. The second one is a label that shows the current video time. What I need is to have is the label on top of the media player. The label should only display the time, so its background needs to be transparent. Right now, I have the video player running fine inside the dialog box, but I am unable to have the time displayed as I wish. It just overlap the video player. Both WPF components were creating by following instructions from this link. https://msdn.microsoft.com/en-us/library/ms742522(v=vs.110).aspx#hosting\_a\_wpf\_page\[^\] I try to set the label with a transparent background. timeLabel->Background = gcnew System::Windows::Media::SolidColorBrush (System::Windows::Media::Colors::Transparent); But the label background is shown black. I also try to set the Transparent flag of the MFC CDialog to true, but it didn't have any effect. How can I that fixed? Do I need to set up something special when I instantiate the WPF controls? Do I need to call some functions from inside the MFC dialog box? Thanks, Alain Migeon PS This question has also been asked in "C / C++ / MFC" forum.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups