Dialog resource problem



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

    On 05/03/2008 at 18:45, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   10.5 
    Platform:      
    Language(s) :     C++  ;

    ---------
    'REAL SLIDER_PICTURE' doen't work~
    when i run c4d it occured error

    plz somebody help.
    thx in advance.

    // C4D-DialogResource

    DIALOG DLG_MAIN
    {
         NAME IDS_DLG_TITLE;
         SIZE -800, -600;
         SCALE_H;SCALE_V;
         
         GROUP
         {
              COLUMNS 5;
              BORDERSIZE 4,4,4,4;
              
              BUTTON BTN_01 { NAME IDS_BTN01; SIZE 50, 40; }
              
              SEPARATOR { SIZE 4, 40; }
              
              BUTTON BTN_02 { NAME IDS_BTN02; SIZE 50, 40; }
              BUTTON BTN_03 { NAME IDS_BTN03; SIZE 50, 40; }
              BUTTON BTN_04 { NAME IDS_BTN04; SIZE 50, 40; }
         }
         
         SEPARATOR { SCALE_H; }
         
         GROUP
         {
              COLUMNS 1;
              BORDERSIZE 4,4,4,4;
              SCALE_H;SCALE_V;
              
              GROUP
              {
                   CENTER_V;CENTER_H;
                   USERAREA AREA_PICTURE { CENTER_V;CENTER_H; SIZE -640, -480; }
              }
              
              SEPARATOR { SCALE_H; }
              
              GROUP
              {
                   CENTER_V;CENTER_H;
                   REAL SLIDER_PICTURE { UNIT REAL; MIN 0.0; MAX 100.0; STEP 1; CUSTOMGUI REALSLIDER; }
                   EDITSLIDER SLIDER_PICTURE { CENTER_V;CENTER_H; SIZE -400, 0; }
              }
         }
    }



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

    On 05/03/2008 at 19:49, xxxxxxxx wrote:

    Methinks that you are mixing metaphors, as it were. You CANNOT use Description resource elements in a Dialog resource and vice versa. Just add a SLIDER instead of REAL (the latter being a description resource and will not work).



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

    On 06/03/2008 at 02:39, xxxxxxxx wrote:

    Thanks for answer!

    Now I see about that...
    And if so, how can I use and control a 'EDITSLIDER' in dialog?

    And is there any ways to get a detail information about error? c4d is saying just 'error line xx'



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

    On 06/03/2008 at 12:59, xxxxxxxx wrote:

    You already have the EDITSLIDER in your dialog - remove the REAL ... line. Using and controlling it is done within the methods of your GeDialog-extended class (Command(), Message(), Init() are good places to look).

    Use SetReal() and GetReal() to set and get the slider values.

    To check for user changes, add the Command() method and check the 'id' argument (in a switch perhaps) :

    switch(id) {
    ...
    case SLIDER_PICTURE:     ActOnSliderPicture(msg.GetReal(BFM_ACTION_VALUE));     break;
    ...
    }

    The error is in the resource file (.res) or in the string file (.str). It only shows the line that couldn't be parsed properly. The error is that REAL is not valid for a GeDialog resource (and you shouldn't use an id more than once otherwise you'll confuse Cinema - which element was it?)



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

    On 06/03/2008 at 22:36, xxxxxxxx wrote:

    Yeah when I deleted the REAL there was no error,
    but it couldn't control, so i asked again~

    Anyway now i can go to a next step, thank you Robert!


Log in to reply