Hi, I'm developing a gui using the win32 API in c++ with visual studios. I was wondering if anybody can help me.
On my window i have a button which when pressed, the typical open file dialog is displayed for a user to select a text file to open. When the user has selected a file to open, I want a new tab to be added my tab control and to display the text file which was selected by the user.
I'm struggling with how I can do this and would greatly appreciate any help with this.
Yeah but once I add the tab items, how do I switch between the views for each window?
I don't know if it's something obvious staring me in the face, but i have no idea how to do it when i don't know how many tabs there are going to be at any given time. I can do it when i know how many tabs are going to be open, then i can just code which window to show depending on which tab clicked, but I'm unsure of how to do this when there isn't a definitive number of tabs.
That's what the lParam member of the TCITEM struct is for; to associate data with a tab. It could be set to a pointer to the filename of a text document, for example.