How to show a picture using GDI? - c

it is possible to display a picture on a window created by winmain i mean using GDI,
i want do create a window that captures my whole screen i have done that by using GDI but unable to show an image on it how can i do so?

There are lots of good tutorials on the web.

Related

Does gtk support display multiple videos with gstreamer?

I've been working on a project that requires me to display multiple videos at the same time.
It's the first time I use gstreamer.
At first, I tried to use videosink to display one and use opencv and cairo to display other one,
but this failed.
And I tried to add more drawing area and use same video sink, but it came out that videos were displayed on same drawing area widget.
I also tried to add more gstvideooverlay, but this could not work.
Is it possible to display multiple videos on different drawing area widgets at the same time?
but this could not work.
is not very descriptive. It sounds like you are doing something wrong here.
On the other hand if you are developing a GTK gui application I would use gtksink or gtkglsink respectively. With these you can simply set GtkWidgets into your GUI.

Dzi Viewer using CPP

I am looking for a Deep Zoom Image (DZI) viewer in CPP.
Currently, we have a viewer designed in javascript (Open Seadragon), java, and C# for the dzi images.
I am looking for the open-source viewer that can be integrated in my CPP application.
I made a tiny example program that displays a libvips image in a window:
https://github.com/libvips/vipsdisp-tiny
It's about 300 lines for the entire thing. It uses gtk+3, but it should be simple to adapt for other toolkits.
The cool thing is that it doesn't just display an image, it displays the end of a libvips pipeline, and it does it asynchronously. You can scroll around the image and the display will be updated in the background by a threadpool as chunks of the image are computed.
For your application, you could use vips_arrayjoin() to join up the tiles of the DZI image, then display the output of arrayjoin in the window.
There's a more complete image viewer here:
https://github.com/jcupitt/vipsdisp
Though I still haven't got around to finishing it, unfortunately.

Image not scaling correctly for each device screen

I am having problems with multi image in the new GUI builder. It doesn't scale as should with individual skin or device screen. Is there another way to add multi image to scale according to screen size in the code?
I got this done very well in the old GUI builder. This is preventing me from having my app update.
Open the designer and verify that the image is indeed a multi-image and that resolutions exist for all the right DPI's.
Look at the code and verify that the image is fetched using getImage(String) and isn't manipulated in any way.
Verify that you are using Label and not ScaleImageLabel or some similar class.
The Phoenix demo was created using the new GUI builder and uses a lot of multi-images.

Getting Handle of DirectX Output inside a WPF Window

I am hoping this makes sense.
I am developing an application which will be a plugin inside of an existing application. The application has DirectX output that is placed in a WPF container/window.
I would like to get a "handle" on that DirectX output such that I can change basic properties of that Output such as switching to a stereoscopic 3d display, switching said output to full screen, etc.
I am not trying to manipulate the objects/information/etc. of that output, just how it is presented.
Any direction I can head in?
Thank you.

Can I use the WP7 Panorama control outside of WP7?

I need a WPF control that acts like the Panorama control for Windows Phone 7, but I need it for a desktop application.
It will contain a series of panels (or Panorama Items) that the application will be able to slide through horizontally programmatically.
Also, the content inside the panels not currently displayed on the screen will need to be "lazy loaded". In other words, they should be referenced but not loaded or rendered.
Can I somehow adapt the WP7 Panorama control to do this? Or will I have to develop a custom control from scratch to behave similarly to it?
Thank you!
EDIT:
I could probably use a VirtualizingPanel to implement the lazyload behaviour.
MahApps.Metro while still not super mature does allow for the wp7 Panorama control. Demo of how to use a panorama here. I've played with it a little and while its not the most customizable thing out there it gets the job done. Pretty sweet. Also Sacha Barber (Codeproject Demigod) wrote up an article on making your own. Of which I haven't looked at yet but, the guy usually does awesome work. So I'd check that one out as well.
http://blogs.microsoft.co.il/blogs/arielbh/archive/2010/10/21/porting-windows-phone-7-s-panorama-control-to-silverlight-4.aspx gives some clues about how do to this.
It suggests using http://phone.codeplex.com/ as your base and then you can use http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=4b281bde-9b01-4890-b3d4-b3b45ca2c2e4 (Microsoft Surface Manipulations and Inertia Sample for Microsoft Silverlight) to run convert get it to respond to touch.
Seems none exist as far as I can see so far.
This blog has started an attempt at making it, so you could work from there to make your own. Be sure to also check out this page which details the creation of an individual panorama item too.

Resources