Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ATL COM dialog controls

Status
Not open for further replies.

MarcinW

Programmer
Jun 8, 2003
6
0
0
PL
Hi,

I'm writing an ATL COM dll. I want to create interface to it (dialog box with controls). I created the ATL dialog box and tried to add some controls to it.

I did following things:

* Added some simple controls (textbox, radiobutton)
* Added ListBox and Tab Control.
* Added events for these controls.


I haven't problems with getting events from TextBox and RadioButton but I have problems with more advanced controls:

1. Standard Windows controls like ListBox or Tab Control don't want to work with ATL dialogs.

2. I don't know how to initialize controls (i.e. adding entries to list) and catch events from them.

3. Which kind of controls should I use in my ATL COM add-in to create dialog box with Tab Control, ListBox, some Textboxes, RadioButtons and buttons ?

Does somebody know how to do it or know some links to examples ??

Regards,
Marcin.
 
>> I don't know how to initialize controls (i.e. adding entries to list) and catch events from them.

ATL does not alter the fact that messages are sent to windows controls to modify them and they in turn send windows messages for event notification. Since that is always true you have a choice. You can use SendMessage() and read messages from the message queue or you can learn to use the framework you are working with (ATL in this case) that provides some assistance in the process of using windows messages.

When learning a new API or framework you need to have some form of documentation and/or tutorial to work with. Without these materials it is next to impossible to progress. Once they are obtained, read them and go to work.


-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top