Using CxImage in VC++ 2008 MDI application - image

Im new to cximage so i need help. Im building as MDI project in which i need cximage functionalities.
Please help me by specifying how to load and display an image in the child window.
How to get active windows hwnd and hdc.
this is the requirement:
Drawing App(Image Viewer and editing) using cximage and Mdi
First of all, there should be a provision to open an image (any format i.e. tif, jpg, bmp…..).
The user should be able to do operations like rotate, zoom negate etc. The changes should be saved after prompting.
The user should be able to draw standard shapes like rectangle, square etc on top of the image.
Should be able to fill color in the shapes drawn. Save that as well.
Also user should be given a provision to change an image format(i.e. may be from jpg to tif and so on) and save.

http://www.codeproject.com/Articles/1300/CxImage itself is a good tutorial and it has sample project as well.
see the tutorial below to which explains how to get active windows handle in MDI app:
http://www.winprog.org/tutorial/app_four.html

Related

Why do standard applications show slightliy different colors

I uploaded a simple png file with a overall fill color here: https://ufile.io/kx1mopq2
If i view this file in the windows explorer or in firefox the color displayed is slightly different than the color shown in Windows Paint, Paint 3d or several other applications i tested - including WinApi and Qt applications i developed myself.
In the screenshot below on the left you see firefox and windows explorer preview - we think that this display color is the correct one. On the right you see Pant and paint 3d. I modified the file in paint as i moved a strip from the left views into the right views in order to make the difference visible.
My question is: Where do these differences have their origin? I want my applications to show the same color as FireFox or Windows Explorer. It seems that there is a application setting or the like that influences that?
Any suggestion welcome.

In Visual Studio, how to solve Button image Quality?

I am using Visual Studio 2019 to build an Excel Addin with a Custom Task Pane.
In the User Control used as Custom Task Pane, i added imlNavigation(ImageList)
I tried to generate transparent Images PNG with size [512,512] and attached it with the Buttons, but the Quality is very poor
I tried to generate transparent Images PNG [16,16] but no changes.
Below is the screenshot. And even the transparency is not good. We still see those white colors around the pictures:
Can anyone please suggest me what exactly I shall do as I am still new in Visual Studio?
Where could I get transparent Icons/Images to use for my Buttons?
What Extension shall I use if necessary to get them easily attached with my Buttons?
Where do I fail and I should still learn regarding the buttons?
I am willing to learn and to follow you instructions and suggestions. Thank you in advance!
May be instead of using image list you can use Image Resources?
Click on the Button
On your property click on the assist button of image
From the Select Resource Dialog box, click on Project Resource File
Import you pictures (Png transparent) better 25-25px or 20-20px based on the size of your button. It accepts transparent images as well
This should improve the quality of your button images.
enter image description here

Opening an image in TImage from a server

I am working on a huge project using Delphi XE5, the core of the program is to open an image using the TImage component on the application but the image is on a server that is accessed trough the internet. The image that displays depends on the criteria set trough other events or actions from the user. I already have the criteria's code etc in place, I only neet die Image display part..
What other components do I need to use other than TImage component to make this happen and how does one do this? I have been searching for answers for more than a week and couldn't find something that works.
This is also a multi platform application.
Found what I was looking for at FireMonkey iOS RAD Studio XE2 - Display Image on form loaded from URL although its a bit slow, but for now it can do the job just fine.
Well you can load a TBitmapImage or TJPEGImage from a stream and then stick it into your TImage. However, you will need to know the image type before you do this. Here is an example using TJPEGImage: JPEG data-stream to TImage

Drawing an IplImage within an MFC Dialog Application

I have an MFC dialog application that I am using as the front end for some image processing with OpenCV 2.1. I would like to move away from using the cvShowImage and place my image directly on the dialog box or a suitable container. I've found examples that with a technique using an MFC SDI application with a View/Doc model, but I can't figure out how to convert that.
I'm curious if anyone has done this and/or knows where an example may live that does this?
Also, this is my first MFC application.
Thanks all.
There is a CvvImage type in highgui with a drawtoHDC(or simialr) function that will draw into a bitmap

Is there an easy way to recreate the WinForms layout experience at runtime for user positioning of controls

When laying out a WinForm in Visual Studio you get the ability to resize and align your controls very easily with drag handles and border alignment hints.
I'd like to do the same with a runtime control to enable the user to position an image on a page.
For example, if the user has a photo and they want to place it as a background on the desktop I'd like the control to help them move and size the photo thumbnail in a mini desktop visual.
I can do all of this, but my real question is, does anyone know of a way to inherit from the standard WinForms layout editor so that I can choose to use the nice docking, alignment hints and control resizing without coding it all again?
Thanks in advance
Ryan
I don't know about easy, but you can host the actual winforms designer in your own applications without too many problems.. See here.

Resources