Members of IOleInPlaceObjectWindowlessImpl Class
We have various members of this support class which enable windowless operations. Following are the members provided by this support class.
ContextSensitiveHelp
It is a public method of the member class. It allows for context-sensitive help.
Syntax
HRESULT ContextSensitiveHelp(BOOL fEnterMode);

You can also try this code with Online C++ Compiler
Run Code
The ATL implementation of this method will return E_NOTIMPL.
GetDropTarget
It provides the IDropTarget interface for an active, windowless in-place object that supports drag and drop.
Syntax
HRESULT GetDropTarget(IDropTarget** ppDropTarget);

You can also try this code with Online C++ Compiler
Run Code
The ATL implementation of this method will return E_NOTIMPL.
GetWindow
The container calls this function to obtain the control's window handle. It is one of the public class methods.
Some containers will not operate with a windowless control, even if it is currently windowed. If the control class's data member m_bWasOnceWindowless is TRUE in ATL's implementation, the function returns E_FAIL. Otherwise, if it is not NULL, GetWindow sets * phwnd to the data member m_hWnd of the control class.
Syntax
HRESULT GetWindow(HWND* phwnd);

You can also try this code with Online C++ Compiler
Run Code
This function's ATL implementation always returns S_OK.
InPlaceDeactivate
For this method of the IOleInPlaceObjectWindowlessImpl, the container has requested that an in-place active control should be deactivated. Depending on the control status, this technique conducts full or partial deactivation. If necessary, the control's user interface is deactivated, and the control's window, if any, is removed. The container is informed that the control is no longer active. The container's IOleInPlaceUIWindow interface for negotiating menus and border space is freed.
Syntax
HRESULT InPlaceDeactivate(HWND* phwnd);

You can also try this code with Online C++ Compiler
Run Code
OnWindowMessage
This member of IOleInPlaceObjectWindowlessImpl will send a message from a container to an in-place active windowless control. It also belongs to the public method class.
Syntax
HRESULT OnWindowMessage(
UINT msg,
WPARAM WParam,
LPARAM LParam,
LRESULT plResultParam);

You can also try this code with Online C++ Compiler
Run Code
ReactivateAndUndo
This public class method will reactivate the previously deactivated control. It basically undoes the previously taken control action.
Syntax
HRESULT ReactivateAndUndo();

You can also try this code with Online C++ Compiler
Run Code
The ATL implementation of this method will return E_NOTIMPL.
SetObjectRects
By using this method, the container calls the function to notify the control that its size and/or the position has changed. The control's m_rcPos data member and the controlled display are updated afterwards. The only part of the control that intersects the clip zone is visible if needed. If the display of a control was previously clipped, but the clipping has been eliminated, this function can be used to redraw the control's full view.
Syntax
HRESULT SetObjectRects(LPCRECT prcPos, LPCRECT prcClip);

You can also try this code with Online C++ Compiler
Run Code
UIDeactivate
This member class deactivates and removes the user interface for the control that supports in-place activation. It is also a public method class. It sets up the data member m_bUIActive of the control class to FALSE.
Syntax
HRESULT UIDeactivate();

You can also try this code with Online C++ Compiler
Run Code
This function's ATL implementation always returns S_OK.
Frequently Asked Questions
What are classes in ATL?
Classes in Active Template Library(ATL) contain important data to display in different directions like metafile, printer, or ActiveX control. Class instance data in the ATL windowing code.
What is ATL?
Active Template Library is a collection of C++ classes that are template based to make writing Component Object Model(COM) objects easier.
What are C++ templates?
In C++, templates are an effective tool for passing data types as parameters to generalised functions.
What are some ATL applications?
The Active Template Library (ATL), a wrapper library that facilitates COM development, is frequently used to create ActiveX controls. Applications written in MFC or ATL can be made using Visual Studio Community Edition or higher.
What does Windows' COM object mean?
The Microsoft Component Object Model is a distributed, object-oriented method for creating binary software components that can communicate (COM).
Conclusion
This article discussed the UI support class IOleInPlaceObjectWindowlessImpl. We discussed members of the IOleInPlaceObjectWindowlessImplclass in detail. We hope this blog has helped you enhance your knowledge on the topic of the UI support class IOIeInPlaceObjectWindowlessImpl. If you like to learn more, you can check out our articles:
Refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and Algorithms, Competitive Programming, JavaScript, AWS and many more! If you wish to test your competency in coding, check out the mock test series and take part in the contests hosted on Coding Ninjas Studio!
If you have started your learning process and are looking for questions from tech giants like Amazon, Microsoft, Uber, etc. For placement preparations, you must look at the problems, interview experiences, and interview bundles.
Nevertheless, consider our paid courses to give your career an edge over others!
Happy Learning!