Mouse Event in ATL ActiveX in C++ - events

I have to build a viewer object (just like a picture box in C#) in a ATL/ ActiveX library. Now I have to listen to the event of mouse on my viewer object. But I can't find any solution or suggest for this. So, are there any idea or document can help me to do this task.
Thank you.

Related

Can such a UI be created with unmanaged Visual C++ and MFC?

I need to create a shoebox-style native Windows app in C++. A good example of such a UI would be CleanMyPC:
I've tried the various options of the MFC App wizard in Visual Studio 2019 to see what that would give, but it's either document-based (SDI), or too limited (dialog-style). The closest was an empty Win32 app, which just displays a menu bar and a blank window beneath it. At least it matches the Windows style. But that would mean using bare Win32 API, which doesn't seem like a good idea.
Can a UI like in the screenshot be created with MFC? If so, would that be a reasonable approach? Can MFC be effectively used in a non-document-style, non-dialog-style UI like this?
I understand that there's heavy customization of the controls going on in the screenshot; the question is can it be done with MFC?
It looks like the left sidebar and the right details areas could be made of customized list controls. I'll be looking into how a dialog-based sample app arranges the window, so that no document stuff is involved, but without immediate termination on a button click.

JavaFX 2.0 custom Window frame buttons

I want to add a button to my applications window frame. At the moment I have the regular windows look: "minimize, maximize and close". I were thinking that I should make a whole new window frame with my own buttons, but what I really need is just an additional button that has the functionality of "Log out". Kinda like Skype: http://cloud.addictivetips.com/wp-content/uploads/2011/08/Compact-View.jpg
I have been searching the web for some pointers and hints, but I've gotten no longer.
So if anybody has any comments or code that would help me, it would be greatly appreciated!
The JavaFX Ensemble Sample application demonstrates custom buttons for "minimize, maximize and close", you can get it's source code here.

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

VB6: enabling mousewheel for controls

can someone tell me if there's an easy way to enable mousewheel for controls (in runtime)?
i want to use the wheel for scrolling controls as soon as the mouse is over them.
thx
Karl E Peterson shows how to make any control respond to the mousewheel in this nice article in Visual Studio Magazine, with VB6 code you can just drop into your project.
Have you looked at this vbforums example code: Enabling MouseWheel Support with any control
Ref.
One very easy way is to install VBScroll by Shahin Gasanov. This is to enable scroll bars in the VB6 IDE. Even if that's no what you meant by 'the runtime' then it's worth having anyhow ;)
This solution works fine for me. Method 1 http://support.microsoft.com/kb/837910

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