I have a Tab Control Child Window with a Owner Drawn style. Im having to deal with wm_drawitem to set its appearance, tabcontrol label text and background color, etc. It works and that feels like a miracle :)
In order to process the Tab Change, I am intercepting TCN_SELCHANGE at WM_NOTIFY in order to get the ID of the active tab.
In each of this cases I send a lot of ShowWindow(hwndCtrtl, SHOW/HIDE) to display only the correct controls in each tab. This got a little out of hand now since I have about 100 controls in my program. Its a lot of messages. My app is loosing speed.
As a newbie, I feel sure that there might be some smarter way to display the controls correctly in each tab, without having to send all this messages at each tab change but I couldnt find an answer.
Does anyone have any idea on how to deal with that? Ill greatly appreciate any help :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
usually you would put them in dialogs, then you just have to show the right dialog.
I wrote a program in a another language that has a tab control with a whole bunch of edit controls.. in my case I was able to reuse the same controls on each tab, I just changed the text in the edits and the labels, don't know if you could do something similar, or if it would make it faster.. I think using dialogs would be your best bet.
blackadder
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have a Tab Control Child Window with a Owner Drawn style. Im having to deal with wm_drawitem to set its appearance, tabcontrol label text and background color, etc. It works and that feels like a miracle :)
In order to process the Tab Change, I am intercepting TCN_SELCHANGE at WM_NOTIFY in order to get the ID of the active tab.
In each of this cases I send a lot of ShowWindow(hwndCtrtl, SHOW/HIDE) to display only the correct controls in each tab. This got a little out of hand now since I have about 100 controls in my program. Its a lot of messages. My app is loosing speed.
As a newbie, I feel sure that there might be some smarter way to display the controls correctly in each tab, without having to send all this messages at each tab change but I couldnt find an answer.
Does anyone have any idea on how to deal with that? Ill greatly appreciate any help :)
usually you would put them in dialogs, then you just have to show the right dialog.
I wrote a program in a another language that has a tab control with a whole bunch of edit controls.. in my case I was able to reuse the same controls on each tab, I just changed the text in the edits and the labels, don't know if you could do something similar, or if it would make it faster.. I think using dialogs would be your best bet.
blackadder