您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ FrmGetObjectIndex函数代码示例

51自学网 2021-06-01 20:48:57
  C++
这篇教程C++ FrmGetObjectIndex函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中FrmGetObjectIndex函数的典型用法代码示例。如果您正苦于以下问题:C++ FrmGetObjectIndex函数的具体用法?C++ FrmGetObjectIndex怎么用?C++ FrmGetObjectIndex使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了FrmGetObjectIndex函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: SetPeople

static void SetPeople( Short num ) {    Int x;    Boolean found = false;    FormPtr frm;    ControlPtr cPtr;    Word oIdx;    frm = FrmGetActiveForm();    x = MaxPlayers - 1;    while( ( x > ( MaxPlayers - (num + 1) ) ) &&            !found ) {        oIdx = FrmGetObjectIndex( frm, pbtnVal[x--] );        cPtr = FrmGetObjectPtr( frm, oIdx );        if( CtlGetValue( cPtr ) ) {            CtlSetValue( cPtr, false );            found = true;        }    }    if ( found ) {        stor.tmpcomputers = MaxPlayers - (num + 1);        oIdx = FrmGetObjectIndex( frm, cbtnVal[stor.tmpcomputers] );        cPtr = FrmGetObjectPtr( frm, oIdx );        CtlSetValue( cPtr, true);    }}
开发者ID:docwhat,项目名称:cwimp,代码行数:29,


示例2: ResidentBrowseFormFieldChanged

static Boolean ResidentBrowseFormFieldChanged(AppContext* appContext, FormType* form, EventType* event){    char *      word;    UInt32      newSelectedWord=0;    FieldType * field;    ListType *  list;    UInt16      index=FrmGetObjectIndex(form, fieldWord);    Assert(index!=frmInvalidObjectId);    field=(FieldType*)FrmGetObjectPtr(form, index);    Assert(field);    index=FrmGetObjectIndex(form, listMatching);    Assert(index!=frmInvalidObjectId);    list=(ListType*)FrmGetObjectPtr(form, index);    Assert(list);    word=FldGetTextPtr(field);    // TODO: get length of the word via FldGetTextLength()    if (word && *word)        newSelectedWord = dictGetFirstMatching(GetCurrentFile(appContext), word);    if (appContext->selectedWord != newSelectedWord)    {        appContext->selectedWord = newSelectedWord;        Assert(appContext->selectedWord < appContext->wordsCount);        LstSetSelectionMakeVisibleEx(appContext, list, appContext->selectedWord);    }    return true;}
开发者ID:kjk,项目名称:noah-palm,代码行数:27,


示例3: SetComputers

static void SetComputers( Short num ) {    FormPtr frm;    ControlPtr cPtr;    Word oIdx;    if( num > (MaxPlayers - 1) || num < 0 ) {        ErrNonFatalDisplayIf( true, "SetComputers: Out of Bounds");        return;    }    if( stor.tmpcomputers == num ) {        return;    }    frm = FrmGetActiveForm();    /* Unset the old one */    oIdx = FrmGetObjectIndex( frm, cbtnVal[stor.tmpcomputers] );    cPtr = FrmGetObjectPtr( frm, oIdx );    CtlSetValue( cPtr, false );    /* Set new one */    oIdx = FrmGetObjectIndex( frm, cbtnVal[num] );    cPtr = FrmGetObjectPtr( frm, oIdx );    CtlSetValue( cPtr, true );    stor.tmpcomputers = num;    if( stor.tmpcomputers + stor.tmpplayers > MaxPlayers ) {        SetPlayers( MaxPlayers - stor.tmpcomputers );    }    return;}
开发者ID:docwhat,项目名称:cwimp,代码行数:35,


示例4: UserCredentialsFormHandleEvent

static Boolean UserCredentialsFormHandleEvent(EventType* event){    switch (event->eType)    {        case ctlSelectEvent:            DMSG("UserCredentialsFormHandleEvent(): ctlSelectEvent"); DENDL;            if (okButton == event->data.ctlSelect.controlID)            {                FormType* form = FrmGetFormPtr(userCredentialsForm);                UInt16 emailIndex = FrmGetObjectIndex(form, emailField);                UInt16 passwordIndex = FrmGetObjectIndex(form, passwordField);                const char* email = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, emailIndex));                const char* password = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, passwordIndex));                if (NULL == email || 0 == StrLen(email))                {                    FrmSetFocus(form, emailIndex);                    return true;                }                if (NULL == password || 0 == StrLen(password))                {                    FrmSetFocus(form, passwordIndex);                    return true;                }            }            return false;        default:            return false;    }}
开发者ID:kjk,项目名称:moriarty-palm,代码行数:31,


示例5: UserCredentialsFormValidate

static void UserCredentialsFormValidate(FormType* form, FlickrPrefs& prefs){    const char* email = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, FrmGetObjectIndex(form, emailField)));    const char* password = FldGetTextPtr((FieldType*)FrmGetObjectPtr(form, FrmGetObjectIndex(form, passwordField)));    StrCopy(prefs.email, email);    StrCopy(prefs.password, password);}
开发者ID:kjk,项目名称:moriarty-palm,代码行数:7,


示例6: prefs_save_checkboxes_1

static Boolean prefs_save_checkboxes_1(){  FormPtr frm;  ControlPtr checkbox;  Boolean val, dirty = false;  frm = FrmGetActiveForm();  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_4));  my_prefs.sound = (CtlGetValue(checkbox) != 0);  // Inverted background:  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_13));  val = (CtlGetValue(checkbox) != 0);  if (my_prefs.black_bg != val)    dirty = true;  my_prefs.black_bg = val;  // Color:  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_14));  val = (CtlGetValue(checkbox) != 0);  if (my_prefs.color_on != val)    dirty = true;  my_prefs.color_on = val;  return dirty;}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:25,


示例7: DetailsFormInit

/* Initialize the details form */static void DetailsFormInit( void ){    FormType*   detailsForm;    FieldType*  urlField;    UInt16      reference;    detailsForm = FrmGetFormPtr( frmDetails );    urlField    = GetObjectPtr( frmDetailsLink );    reference   = GetHistoryCurrent();    if ( AddURLToField( urlField, reference ) )        FrmShowObject( detailsForm, FrmGetObjectIndex( detailsForm,                                        frmDetailsCopy ) );    else        FrmHideObject( detailsForm, FrmGetObjectIndex( detailsForm,                                        frmDetailsCopy ) );    FrmDrawForm( detailsForm );    AddDocNameTitle( Prefs()->docName );    CtlSetValue( GetObjectPtr( frmDetailsStatusRead ),        LinkVisited( reference ) );    CtlSetValue( GetObjectPtr( frmDetailsStatusUnread ),        ! LinkVisited( reference ) );    CtlSetValue( GetObjectPtr( frmDetailsShowImages ),        ShowImages( reference ) );}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:28,


示例8: SetTimeTriggers

/*********************************************************************** * * FUNCTION:    SetTimeTriggers * * DESCRIPTION: This routine sets the text label of the start time and *              end time triggers. * * PARAMETERS:  startTime	    - pointer to TimeType *              endTime        - pointer to TimeType *              startTimeText  - buffer that holds start time string *              emdTimeText    - buffer that holds end time string *              timeFormat     - time format *              untimed  	    - true if there isn't a time. * * RETURNED:	 nothing * * REVISION HISTORY: *			Name	Date		Description *			----	----		----------- *			art	4/4/96	Initial Revision * ***********************************************************************/static void SetTimeTriggers (TimeType startTime, TimeType endTime,		Char * startTimeText, Char * endTimeText, 		TimeFormatType timeFormat, Boolean untimed)	{	FormType *		frm;	ControlPtr 	startTimeCtl, endTimeCtl;	frm = FrmGetActiveForm ();	startTimeCtl = FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, TimeSelectorStartTimeButton));	endTimeCtl = FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, TimeSelectorEndTimeButton));	if (! untimed)		{		TimeToAscii (startTime.hours, startTime.minutes, timeFormat, startTimeText);		TimeToAscii (endTime.hours, endTime.minutes, timeFormat, endTimeText);		}	else		{		// copy two spaces into these fields instead of just a null		// because controls with empty strings (or one space) cause old-style		// graphic control behavior, which uses the wrong colors!		StrCopy(startTimeText, "  ");		StrCopy(endTimeText, "  ");		}			CtlSetLabel (startTimeCtl, startTimeText);	CtlSetLabel(endTimeCtl, endTimeText);	}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:51,


示例9: ShowSelectWordTapIcon

/* Indicate that the next tap looks things up in the selected word */static void ShowSelectWordTapIcon( void ){    FormType* mainForm;    UInt16    prevCoordSys;    if ( Prefs()->toolbar == TOOLBAR_NONE )        return;    mainForm = FrmGetFormPtr( GetMainFormId() );    prevCoordSys = PalmSetCoordinateSystem( STANDARD );    if ( Prefs()->toolbar == TOOLBAR_SILK ) {        /* FIXME: figure this out */    }    else {        FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpWait ) );        if ( isSelectWordTapMode ) {            FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpHome ) );            FrmShowObject( mainForm, FrmGetObjectIndex( mainForm, bmpLookup ) );        }        else {            FrmHideObject( mainForm, FrmGetObjectIndex( mainForm, bmpLookup ) );            FrmShowObject( mainForm, FrmGetObjectIndex( mainForm, bmpHome ) );        }    }    PalmSetCoordinateSystem( prevCoordSys );}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:29,


示例10: FormPenDownEvent

static BooleanFormPenDownEvent(EventType * e){  FormPtr frm = FrmGetActiveForm ();  UInt16 objIndex;  RectangleType r;  Boolean res = false;  objIndex = FrmGetObjectIndex (frm, ID_EditorMidiKeysGadget);  FrmGetObjectBounds (frm, objIndex, &r);  if (RctPtInRectangle (e->screenX, e->screenY, &r)) {    midikeys_tapped(&midikeys, e->screenX, e->screenY);    res = true;  }  objIndex = FrmGetObjectIndex (frm, ID_EditorNoteListGadget);  FrmGetObjectBounds (frm, objIndex, &r);  if (RctPtInRectangle (e->screenX, e->screenY, &r)) {    notelist_tapped(&notelist, e->screenX, e->screenY);    res = true;  }  UpdateNoteProperties();  return res;}
开发者ID:asashnov,项目名称:palmano,代码行数:26,


示例11: FrmHideObject

/* A game of Hide and go Seek er, Show? */static void HideNShow    (    UInt16 hideThis,    UInt16 andThis,    UInt16 butShowThis    ){    FrmHideObject( form, FrmGetObjectIndex( form, hideThis ) );    FrmHideObject( form, FrmGetObjectIndex( form, andThis ) );    FrmShowObject( form, FrmGetObjectIndex( form, butShowThis ) );}
开发者ID:TimofonicJunkRoom,项目名称:plucker,代码行数:12,


示例12: init_lists

static void init_lists(Short rw, Short ws){  FormPtr frm;  ListPtr lst;  frm = FrmGetActiveForm();  /* set initial settings for lists */  lst = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, list_prf_1));  LstSetSelection(lst, ws-1);  lst = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, list_prf_2));  LstSetSelection(lst, rw-1);}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:11,


示例13: widgets

/**********************************************************************                       UPDATE_FIELD_SCROLLERS IN: frm, fld, up_scroller, down_scroller = various UI doodads OUT: nothing PURPOSE: Update the given scroller widgets (for the given field  (in the given form)), according to whether the field is scrollable in the "up" and "down" directions. **********************************************************************/void update_field_scrollers(FormPtr frm, FieldPtr fld,			    Word up_scroller, Word down_scroller) {  Boolean u, d;  u = FldScrollable(fld, winUp);  d = FldScrollable(fld, winDown);  FrmUpdateScrollers(frm, 		     FrmGetObjectIndex(frm, up_scroller),		     FrmGetObjectIndex(frm, down_scroller),		     u, d);  return;}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:23,


示例14: RulesSetScrolling

static voidRulesSetScrolling (void){    FieldPtr	    field;    field = FrmGetObjectPtr (rulesFrm, FrmGetObjectIndex (rulesFrm, rulesText));    FrmUpdateScrollers (rulesFrm,                        FrmGetObjectIndex (rulesFrm, rulesScrollUp),                        FrmGetObjectIndex (rulesFrm, rulesScrollDown),                        FldScrollable (field, winUp),                        FldScrollable (field, winDown));}
开发者ID:ricochet-robotics,项目名称:rr-palmpilot-c,代码行数:12,


示例15: init_checkboxes_1

static void init_checkboxes_1(){  FormPtr frm;  ControlPtr checkbox;  frm = FrmGetActiveForm();  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_4));  CtlSetValue(checkbox, (my_prefs.sound ? 1 : 0));  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_13));  CtlSetValue(checkbox, (my_prefs.black_bg ? 1 : 0));  checkbox = FrmGetObjectPtr(frm, FrmGetObjectIndex(frm, check_prf_14));  CtlSetValue(checkbox, (my_prefs.color_on ? 1 : 0));}
开发者ID:BackupTheBerlios,项目名称:paleohack,代码行数:13,


示例16: ThumbnailDetailViewLoadGadgets

/*********************************************************************** * * FUNCTION:    ThumbnailDetailViewLoadGadgets * * DESCRIPTION: This routine loads sketches into the thumbnail view form *              thumbnail gadgets. * * PARAMETERS:  recordNum index of the first record to display. * * RETURNED:    nothing * ***********************************************************************/static void ThumbnailDetailViewLoadGadgets(FormType* frm) {  UInt16 row;  MemHandle recordH;  DynamicButtonType* btnThumb, *btnName, *btnNameMasked, *btnAlarm;  MemPtr ptr;  UInt16 attr;  Char* record_name, *record_note;  DiddleBugRecordType record;  FontID font;  UInt32 alarmSecs;  UInt16 recordNum = d.top_visible_record;  const UInt16 max = Min(recordsPerPage, d.records_in_cat - d.top_row_pos_in_cat);  Boolean private = false;  for (row = 0; row < max; row++) {    /* Get the next record in the current category. */    recordH = DmQueryNextInCategory (d.dbR, &recordNum, p.category);    if(row == 0) {      /* store the position of the first row so we can use */      /* d.top_row_pos_in_cat+row when drawing             */      d.top_row_pos_in_cat = recordH ? DmPositionInCategory(d.dbR, recordNum, p.category) : 0;    }    btnThumb = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1 + row));    btnName = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1Name + row));    btnNameMasked = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1NameMasked + row));    btnAlarm = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, Thumb1Alarm + row));    /* Store record number */    btnThumb->value = recordNum;    btnName->value = recordNum;    btnNameMasked->value = recordNum;    btnAlarm->value = recordNum;    /* Clear old internal values */    btnThumb->selected = false;    /* Read record attributes */    DmRecordInfo(d.dbR, recordNum, &attr, NULL, NULL);    private = attr & dmRecAttrSecret && d.privateRecordStatus == maskPrivateRecords;        /* Get a pointer to the record */    ptr = MemHandleLock(recordH);    if (private) {      DrawMaskedRecord(btnThumb->content.bmpW, maskPattern);    } else {
开发者ID:jemyzhang,项目名称:DiddleBug,代码行数:60,


示例17: GetObjectPtr

void * GetObjectPtr(UInt16 objectID){	FormType * frmP;	frmP = FrmGetActiveForm();	return FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, objectID));}
开发者ID:CocoaBob,项目名称:ZDic,代码行数:7,


示例18: SelectTo

static void SelectTo(){	FormPtr frmP = FrmGetActiveForm();	if (FormIsNot(frmP, FormReply)) return;		SendPref pref;	ReadSendPreference(pref);		if (pref.useFingerAddress) {		if (FasSearchAvailable()) {			SelectUsingFingerAddr();			return;		}	}	FieldPtr fieldTo = (FieldPtr) GetObjectPtr(frmP, FieldTo);	FldSetSelection(fieldTo, 0, StrLen(FldGetTextPtr(fieldTo)));	AddrLookupParamsType params;	MemSet(&params, sizeof(AddrLookupParamsType), 0);	params.formatStringP = "^mobile";	params.field1 = addrLookupSortField;	params.field2 = addrLookupMobile;	params.field2Optional = false;	params.userShouldInteract = true;	PhoneNumberLookupCustom (fieldTo, &params, true);	FrmSetFocus(frmP, FrmGetObjectIndex(frmP, FieldCompose));}
开发者ID:oldhu,项目名称:smstw,代码行数:29,


示例19: GadgetTimeSetRect

voidGadgetTimeSetRect(RectangleType *rect, TimeType begin, TimeType end, UInt8 day, UInt8 num_times, UInt8 pos){  UInt8 top, height, width, width_base;  RectangleType bounds;  UInt16 gadgetIndex = FrmGetObjectIndex(gForm, gGadgetID);  FrmGetObjectBounds(gForm, gadgetIndex, &bounds);  height = GadgetCalcTimeHeight(begin, end);  top = GadgetCalcTimeTop(begin);  if ( (top + height) > GADGET_MAX_PIXELHEIGHT)    height -= ((top + height) - GADGET_MAX_PIXELHEIGHT);  width = gGadgetDaysWidth / num_times;  width_base = width;  if (pos == (GADGET_MAX_AT_A_TIME-1)) {    // It's the last item, add any pixels that get cut off by the division otherwise    // (like: width: 20, num_items = 3, item width = 6, 2 got cut off, add them to the last entry)    width += (gGadgetDaysWidth - (num_times * width));  }  RctSetRectangle(rect,		  // Left          Left Offset                 Days to left          lines between days  position offset		  bounds.topLeft.x+GADGET_BASELEFT+GADGET_LEFT+(gGadgetDaysWidth*day)+day              + pos * width_base,		  // Top           Top Offset      hours		  bounds.topLeft.y+GADGET_TOP +top,		  // Width		  width,		  // 2px per 15min		  height);}
开发者ID:timn,项目名称:unimatrix,代码行数:34,


示例20: GetObjectPtr

static VoidPtr GetObjectPtr (Word objID) {    FormPtr frm;    frm = FrmGetActiveForm();    return (FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, objID)));}
开发者ID:docwhat,项目名称:cwimp,代码行数:7,


示例21: MainFormFindButtonPressed

static void MainFormFindButtonPressed(AppContext* appContext, FormType* form){    const char* newWord=NULL;    UInt16      index=FrmGetObjectIndex(form, fieldWordInput);    Assert(frmInvalidObjectId!=index);    FieldType* field=static_cast<FieldType*>(FrmGetObjectPtr(form, index));    const char* prevWord=ebufGetDataPointer(&appContext->currentWordBuf);    Assert(field);    newWord=FldGetTextPtr(field);    if (newWord && (StrLen(newWord)>0) && (!prevWord || 0!=StrCompare(newWord, prevWord)))        StartWordLookup(appContext, newWord);    else if (mainFormShowsDefinition!=appContext->mainFormContent)    {        const char* currentDefinition=ebufGetDataPointer(&appContext->currentDefinition);        if ( NULL != currentDefinition )        {            // it can be NULL if we didn't have a definition and pressed "GO"            // with no word in text field            cbNoSelection(appContext);            appContext->mainFormContent=mainFormShowsDefinition;            diSetRawTxt(appContext->currDispInfo, const_cast<char*>(currentDefinition));            FrmUpdateForm(formDictMain, redrawAll);        }    } }
开发者ID:kjk,项目名称:noah-palm,代码行数:28,


示例22: GotoRecordField

/*** Go to the record specified gadgetID and open the specified** "field" (the note dialog, the details dialog, ...)*/static void GotoRecordField(UInt16 gadgetID, UInt16 field) {  FormType* frm = FrmGetActiveForm();  DynamicButtonType* btn = (DynamicButtonType*) FrmGetGadgetData(frm, FrmGetObjectIndex(frm, gadgetID));  p.dbI = btn->value;  LoadRecordData();  switch (field) {  case ffNote:    DoNoteDialog(0, 0);    break;  case ffDetails:    d.detailsWithSketch = false;    FrmPopupForm(RecordDetailsForm);    break;  case ffAlarm:    recordUnsetCountdown();    FrmGotoForm(TimeForm);    break;  default:    /* ignore */  }}
开发者ID:jemyzhang,项目名称:DiddleBug,代码行数:30,


示例23: AnnotationFormInit

static void AnnotationFormInit( void ){    FormType*   annotationForm;    annotationForm = FrmGetFormPtr( frmAnnotation );        if ( ( entryP->flags & ANNOTATION_BOOKMARK ) &&         entryP->id.indexInParagraph == NEW_ANNOTATION ) {        SetFormTitle( annotationForm, strAddBookmarkTitle );    }    else {        SetFormTitle( annotationForm, strAnnotationTitle );    }    scrollBar      = GetObjectPtr( frmAnnotationScrollBar );    if ( Prefs()->scrollbar == SCROLLBAR_LEFT ) {        SetObjectPosition( annotationForm, frmAnnotationField, false );        SetObjectPosition( annotationForm, frmAnnotationScrollBar, true );    }    field = GetObjectPtr( frmAnnotationField );    CtlSetUsable( GetObjectPtr( frmAnnotationDelete ),        entryP->id.indexInParagraph != NEW_ANNOTATION );    FrmDrawForm( annotationForm );    InsertText( field, data );    if ( entryP->id.indexInParagraph == NEW_ANNOTATION )        FldSetSelection( field, 0, StrLen( data ) );    else        FldSetInsertionPoint( field, 0 );    UpdateFieldScrollbar( field, scrollBar );    FrmSetFocus( annotationForm, FrmGetObjectIndex( annotationForm,                                     frmAnnotationField ) );}
开发者ID:TimofonicJunkRoom,项目名称:plucker-1,代码行数:35,


示例24: NewGameGetPlayerName

static void NewGameGetPlayerName( UInt16 field, Int16 player){    FormPtr frm = FrmGetActiveForm();    Char *buff;    if( tmppref[player].type == PlayerNone )    {        return;    }    buff = FldGetTextPtr(               FrmGetObjectPtr(                   frm,                   FrmGetObjectIndex(                       frm,                       fldNGname0+player )               )           );    if( tmppref[player].type == PlayerHuman )    {        StrCopy( tmppref[player].hname, buff );    }    if( tmppref[player].type == PlayerAI )    {        StrCopy( tmppref[player].aname, buff );    }}
开发者ID:docwhat,项目名称:cwimp,代码行数:27,


示例25: ApplicationHandleEvent

static Boolean ApplicationHandleEvent( EventPtr event ){	FormPtr frm;	FieldPtr fld;	FieldAttrType fldattr;	Int formId;	Boolean handled = false;	if( event->eType == frmLoadEvent ) {		formId = event->data.frmLoad.formID;		frm = FrmInitForm( formId );		FrmSetActiveForm( frm );		switch( formId ) {			case mainFormID:				FrmSetEventHandler( frm, MyMainFormHandleEvent );				fld = FrmGetObjectPtr( frm, FrmGetObjectIndex( frm,					dataFieldID ) );				FldGetAttributes( fld, &fldattr );				fldattr.hasScrollBar=true;				FldSetAttributes( fld, &fldattr );				break;			default:				break;		}		handled = true;	}	return handled;}
开发者ID:12019,项目名称:scez-ng,代码行数:33,


示例26: PrvUpdateTimeFields

/*********************************************************************** * * FUNCTION:    PrvUpdateTimeFields * * DESCRIPTION: Update the current time and new time displayed if they have *					 changed in the time zone dialog. Also used to update these *					 times in the daylight saving time dialog. * * PARAMETERS:  frm	 - the time zone or daylight saving time dialog * * RETURNED:    nothing * * REVISION HISTORY: *			Name	Date		Description *			----	----		----------- *			peter	4/13/00	Initial Revision * ***********************************************************************/static void PrvUpdateTimeFields (FormPtr frm,	DateTimeType *currentTimeP, DateTimeType *newTimeP,	MemHandle currentTimeHandle, MemHandle newTimeHandle,	UInt16 currentTimeFieldID, UInt16 newTimeFieldID){	DateTimeType now, then;	UInt32 delta;	TimSecondsToDateTime(TimGetSeconds(), &now);	if (now.minute != currentTimeP->minute ||		now.hour != currentTimeP->hour ||		now.day != currentTimeP->day ||		now.month != currentTimeP->month ||		now.year != currentTimeP->year)	{		then = *currentTimeP;		*currentTimeP = now;		PrvSetTimeField(frm, currentTimeFieldID, currentTimeHandle, currentTimeP, true);		if (FldGetTextLength(FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, newTimeFieldID))) != 0)		{			delta = TimDateTimeToSeconds(newTimeP) - TimDateTimeToSeconds(&then);			TimSecondsToDateTime(TimDateTimeToSeconds(currentTimeP) + delta, newTimeP);			PrvSetTimeField(frm, newTimeFieldID, newTimeHandle, newTimeP, true);		}	}} // PrvUpdateTimeFields
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:45,


示例27: AudioCDTabSave

// Audio CDstatic Boolean AudioCDTabSave() {	ControlType *cck3P;	FieldType *fld2P, *fld3P;	ListType *list1P, *list2P;	UInt16 firstTrack;	FormPtr frmP;	frmP = FrmGetActiveForm();	cck3P = (ControlType *)GetObjectPtr(TabAudioCDMP3Checkbox);	fld2P = (FieldType *)GetObjectPtr(TabAudioCDLengthSecsField);	fld3P = (FieldType *)GetObjectPtr(TabAudioCDFirstTrackField);	list1P = (ListType *)GetObjectPtr(TabAudioCDDriverList);	list2P = (ListType *)GetObjectPtr(TabAudioCDFormatList);	firstTrack = StrAToI(FldGetTextPtr(fld3P));	if (firstTrack < 1 || firstTrack > 999) {		TabSetActive(frmP, myTabP, 2);		FrmSetFocus(frmP, FrmGetObjectIndex(frmP, TabAudioCDFirstTrackField));		FrmCustomAlert(FrmErrorAlert, "Invalid track value (1...999)", 0, 0);		return false;	}	gameInfoP->musicInfo.sound.CD = CtlGetValue(cck3P);	gameInfoP->musicInfo.sound.drvCD = LstGetSelection(list1P);	gameInfoP->musicInfo.sound.frtCD = LstGetSelection(list2P);	gameInfoP->musicInfo.sound.defaultTrackLength = StrAToI(FldGetTextPtr(fld2P));	gameInfoP->musicInfo.sound.firstTrack = firstTrack;	return true;}
开发者ID:iPodLinux-Community,项目名称:iScummVM,代码行数:34,


示例28: PrvSetTimeField

/*********************************************************************** * * FUNCTION:    PrvSetTimeField * * DESCRIPTION: Set the given field's text to show a time and day of week. * * PARAMETERS:  frm - a pointer to the form containing the field to set *					 timeFieldID - the ID of the field to set *					 timeHandle - the handle used for storing the text for this field *					 time - a pointer to the date and time to show in the field *					 drawField - whether to draw field after setting its text * * RETURNED:	 nothing * * REVISION HISTORY: *			Name	Date		Description *			----	----		----------- *			peter	3/7/00	Initial Revision * ***********************************************************************/static void PrvSetTimeField(FormType * frm, UInt16 timeFieldID, MemHandle timeHandle,	DateTimeType *time, Boolean drawField){	FieldType * timeFieldP;	Char * timeString, * timeZoneDOWFormatString, * currentDOWString;	MemHandle resHandle;	TimeFormatType timeFormat;			// Format to display time in	timeFormat = (TimeFormatType)PrefGetPreference(prefTimeFormat);		timeString = MemHandleLock(timeHandle);	TimeToAscii(time->hour, time->minute, timeFormat, timeString);	currentDOWString = timeString + StrLen(timeString);	currentDOWString[0] = ' ';	currentDOWString++;	resHandle = DmGetResource(strRsc, DOWformatString);	ErrNonFatalDisplayIf(resHandle == NULL, "Missing string resource");	timeZoneDOWFormatString = MemHandleLock(resHandle);	DateTemplateToAscii(timeZoneDOWFormatString, time->month, time->day, time->year,		currentDOWString, dowLongDateStrLength);	MemHandleUnlock(resHandle);		MemHandleUnlock(timeHandle);	timeFieldP = FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, timeFieldID));	FldSetTextHandle(timeFieldP, timeHandle);		if (drawField)		FldDrawField(timeFieldP);}
开发者ID:kernelhcy,项目名称:hcyprojects,代码行数:50,


示例29: RepeatChangeRepeatOn

/*********************************************************************** * * FUNCTION:    RepeatChangeRepeatOn * * DESCRIPTION: This routine is called when one of the weekly "repeat on" *              push button is pushed.  This routine checks *              if all the buttons has been turned off,  if so the day *              of the week of the appointment's start date is turn on. * * PARAMETERS:  event - pointer to and event * * RETURNED:    nothing * ***********************************************************************/static void RepeatChangeRepeatOn(EventType* event) {  UInt16 id = 0;  UInt16 dayOfWeek = 0;  FormType* frm = FrmGetFormPtr(RepeatForm);  Boolean on = false;  UInt16 i = 0;  const UInt16 idx = FrmGetObjectIndex(frm, RepeatDayOfWeek1PushButton);  /* Check if any of the buttons are on. */  for (; i < daysInWeek; i++) {    if (FrmGetControlValue(frm, idx + i) != 0) {      on = true;      break;    }  }  /* If all the buttons are off, turn on the start date's button. */  if (!on) {    dayOfWeek = DayOfWeek (d.frm_date.month,			   d.frm_date.day,			   d.frm_date.year /*+ firstYear*/); /* frm_date is DateTimeType */    dayOfWeek = (dayOfWeek - d.repeat_start_of_week + daysInWeek) % daysInWeek;        id = RepeatDayOfWeek1PushButton + dayOfWeek;    CtlSetValue(GetObjectPointer(frm, id), true);  }  /* Update the display of the repeat description. */  RepeatDrawDescription(frm);}
开发者ID:jemyzhang,项目名称:DiddleBug,代码行数:44,


示例30: GetTextFromField

Char * GetTextFromField ( UInt16 fieldID ) {	FieldType *fldP;	FormType * frmP;	frmP = FrmGetActiveForm();	fldP = FrmGetObjectPtr (frmP, FrmGetObjectIndex ( frmP, fieldID )); /* Find field pointer */	return FldGetTextPtr (fldP);}
开发者ID:teras,项目名称:FEdit,代码行数:8,



注:本文中的FrmGetObjectIndex函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ FromHere函数代码示例
C++ FrmGetActiveForm函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。