Utilizing a tab in a .res file

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 06/12/2012 at 08:42, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   r13 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
So, I've been doing some more programming and I ran into an issue that a more experience plugin programmer has probably come across.

So in my plugin I did a LoadDialogResource(DLG_TEST,NULL,0) to utilize the res file and string file to create the dialog.

My issue is that in the .res file I've created some tabs (see below)

DIALOG DLG_TEST
{
.....

TAB TAB_ID
 {
GROUP FIRST_TAB
{
....}

....etc

The tabs load up fine but for some reason I can't select each tab, it looks as if both of them are already selected.  In the documentation it states "Use GetLong() and SetLong() with the sub-group ID to control the active tab"

Can someone elaborate on this for me?  I am a bit lost as to what that means, I understand that it has to do with the GeDialog class but I'm not sure how I would get the sub-group ID, and where I would put this code in my derived class of the GeDialog class.

Thanks everyone for the help.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 06/12/2012 at 09:18, xxxxxxxx wrote:

Normally you don't need to do anything for a tab beyond defining it in the .res file. C4D handles switching between tabs automatically on click - I don't write any code for that.

If both tabs seem selected, that sounds more like a problem with the IDs to me. Is FIRST_TAB different from SECOND_TAB different from TAB_ID od did you accidentally write something like
enum {TAB_ID=1000, FIRST_TAB=1000, SECOND_TAB=1000} ?

The sub-group IDs in the example are FIRST_TAB and SECOND_TAB, and the way to switch the tabs programmatically is simply to call
SetLong(TAB_ID, FIRST_TAB);
on the dialog.

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 06/12/2012 at 09:27, xxxxxxxx wrote:

OH man! You totally solved my problem.  I didn't put the tab names and IDs in the c4d_symbols.h file...You rock Cairyn!

Thanks!

Jimmy
http://www.jimmycoppens.com