Using Common Controls in ATL

Posted on 2000-01-05
Medium Priority
Last Modified: 2013-11-25
I've got a problem activating Statusbar in a dialogbox using ATL. I created the Statusbar control using CStatusBarCtrl, and i set the test pane with some message. But since c doesn't display statusbar by default, i have to call ON_UPDATE_COMMAND_UI macro. But since i'm unable to use this macro in an ATL, the status bar doesn't display. If anyone knows how to display a status bar in an ATL, would be helpful to me.
Question by:joji

Expert Comment

ID: 2330928
your ATL has a UI?

Expert Comment

ID: 2331328
If you are building ATL component, while creating the workspace you can check the checkbox 'support MFC' which may allow you to use this macro directly.
By checking this box the wizard adds some header files and macros required to use mfc in ATL. You can find out these addition by creating dummy ATL workspace & add the same to your current workspace.
Hope this works.
LVL 15

Accepted Solution

Tommy Hui earned 300 total points
ID: 2334837
ATL allows you to use simple MFC macros and classes within your ATL program. However, it does not support any of the MFC UI classes very well, primarily because these classes depend on the MFC application architecture. You can create your program as an MFC application and add ATL as needed. Or alternatively, use the Windows API to create your status bar and manipulate it via the Windows API.

Featured Post

Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

627 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question