当前位置: 首页>>代码示例>>C++>>正文


C++ GetMsg函数代码示例

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


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

示例1: GetAge

 unsigned GetAge() const
 {
     const char* age = strstr(GetMsg().c_str(), "AGE=");
     if (age == NULL)
         return (unsigned) -1;
     return (unsigned) atoi(age + sizeof("AGE=") - 1);
 }
开发者ID:swuecho,项目名称:igblast,代码行数:7,代码来源:netcache_api_expt.hpp

示例2: GetVersion

 int GetVersion() const
 {
     const char* ver = strstr(GetMsg().c_str(), "VER=");
     if (ver == NULL)
         return 0;
     return atoi(ver + sizeof("VER=") - 1);
 }
开发者ID:swuecho,项目名称:igblast,代码行数:7,代码来源:netcache_api_expt.hpp

示例3: flush_port

// Flush a message port
void flush_port(struct MsgPort *port)
{
	struct Message *msg;

	while ((msg=GetMsg(port)))
		ReplyFreeMsg(msg);
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:8,代码来源:misc.c

示例4: memset

int PluginManager::ShowHelp(const char *Type, const char *FileName, const char *Keyword, unsigned long Flags, int CallType, const char *Encoding, char *Error)
{
  HelpOutData outdata;
  memset(&outdata,0,sizeof(outdata));
  outdata.StructSize=sizeof(outdata);
  HelpInData data;
  memset(&data,0,sizeof(data));
  data.StructSize=sizeof(data);
  data.FileName = FileName;
  data.Keyword = Keyword;
  data.Encoding = Encoding;
  data.Flags = Flags;
  data.CallType = CallType;
  for (int i=0; i<PluginsCount; i++)
  {
    for (int j=0; j<PluginsData[i].TypesNumber; j++)
    {
      if (!FSF.LStricmp(Type,PluginsData[i].TypesInfo[j].TypeString))
      {
        data.TypeNumber = j;
        int ret = SendMessage(i,AHMSG_SHOWHELP,(void *)&data,(void *)&outdata);
        lstrcpy(Error,*outdata.Error==0?GetMsg(MErrX):outdata.Error);
        return ret;
      }
    }
  }
  return TRUE;
}
开发者ID:CS-svnmirror,项目名称:evil-programmers,代码行数:28,代码来源:ahp_class.cpp

示例5: _ASSERTE

void CPluginW2800::GetPluginInfoPtr(void *piv)
{
	PluginInfo *pi = (PluginInfo*)piv;
	//memset(pi, 0, sizeof(PluginInfo));
	//pi->StructSize = sizeof(struct PluginInfo);
	_ASSERTE(pi->StructSize>0 && ((size_t)pi->StructSize >= sizeof(*pi)/*(size_t)(((LPBYTE)&pi->MacroFunctionNumber) - (LPBYTE)pi))*/));

	static wchar_t *szMenu[1], szMenu1[255];
	szMenu[0]=szMenu1; //lstrcpyW(szMenu[0], L"[&\x2560] ConEmu"); -> 0x2584
	GetMsg(CEPluginName, szMenu1, 240);

	//static WCHAR *szMenu[1], szMenu1[255];
	//szMenu[0]=szMenu1; //lstrcpyW(szMenu[0], L"[&\x2560] ConEmu"); -> 0x2584
	//szMenu[0][1] = L'&';
	//szMenu[0][2] = 0x2560;
	// Проверить, не изменилась ли горячая клавиша плагина, и если да - пересоздать макросы
	//IsKeyChanged(TRUE); -- в FAR2 устарело, используем Synchro
	//if (gcPlugKey) szMenu1[0]=0; else lstrcpyW(szMenu1, L"[&\x2584] ");
	//lstrcpynW(szMenu1+lstrlenW(szMenu1), GetMsgW(2), 240);
	//lstrcpynW(szMenu1, GetMsgW(CEPluginName), 240);
	//_ASSERTE(pi->StructSize = sizeof(struct PluginInfo));
	pi->Flags = PF_EDITOR | PF_VIEWER | PF_DIALOG | PF_PRELOAD;
	//pi->DiskMenuStrings = NULL;
	//pi->DiskMenuNumbers = 0;
	pi->PluginMenu.Guids = &guid_ConEmuPluginMenu;
	pi->PluginMenu.Strings = szMenu;
	pi->PluginMenu.Count = 1;
	//pi->PluginConfigStrings = NULL;
	//pi->PluginConfigStringsNumber = 0;
	pi->CommandPrefix = L"ConEmu";
	//pi->Reserved = ConEmu_SysID; // 'CEMU'
}
开发者ID:michaellukashov,项目名称:ConEmu,代码行数:32,代码来源:ConEmuPlugin2800.cpp

示例6: FilterMessages

bool iwPostWindow::ValidateMessages()
{
    if(lastMsgCt == postBox.GetNumMsgs() && GetMsg(curMsgId) == curMsg)
        return true;
    // Messages have changed -> Update filter
    FilterMessages();
    if(!curMsg)
    {
        // No last message? Display oldest
        curMsgId = 0;
        DisplayPostMessage();
        return false;
    } else
    {
        // Message was either deleted or others were added and message was shifted
        // So first search it, if not found we will display the next (newer) message
        for(unsigned i = curMsgId; i > 0; i--)
        {
            if(postBox.GetMsg(i - 1) == curMsg)
            {
                curMsgId = i - 1;
                DisplayPostMessage();
                return true;
            }
        }
        // Display next valid one
        DisplayPostMessage();
        return false;
    }
}
开发者ID:Return-To-The-Roots,项目名称:s25client,代码行数:30,代码来源:iwPostWindow.cpp

示例7: UserCB

DZStrW UserCallback::UserArg(int arg, int idx, int *cnt)
{
    DZStrW tmp;
    bool raw = arg > 0x1f;

    if (raw)
        arg &= 0x1f;

    CBData.Arg1 = arg;    // type
    CBData.Arg3 = idx;
    int r = UserCB(zacArg);
    if (r >= CALLBACK_UNHANDLED)
    {
        if (cnt && (arg == zcbFSpecArgs || arg == zcbFSpecArgsExcl))
            *cnt = CBData.Arg3;

        if (r == CALLBACK_TRUE)
        {
            tmp = GetMsg();
            if (!raw)
            {
                tmp.TrimLeft();  // trim trailing unless password

                if (arg != zcbPassword && !tmp.Find(ZPasswordFollows))
                    tmp.TrimRight();
            }
        }
    }

    return tmp;
}
开发者ID:geoffsmith82,项目名称:delphizip,代码行数:31,代码来源:DZOper.cpp

示例8: cleanup_timer

__stkargs void cleanup_timer(struct timerequest ** tr)
{
    struct MsgPort *tp;
    struct timerequest *tmp;
    UBYTE pFlags;

    if (*tr) {
	tmp = *tr;
	tp = tmp->tr_node.io_Message.mn_ReplyPort;
	if (tp) {
	    /* abort the current request */
	    pFlags = tp->mp_Flags;	/* still needed for DeletePort */
	    tp->mp_Flags = PA_IGNORE;
	    AbortIO((struct IORequest *) tmp);
	    WaitIO((struct IORequest *) tmp);
	    while (GetMsg(tp));
	    Forbid();
	    tp->mp_Flags = pFlags;
	    DeletePort(tp);
	    Permit();
	}
	CloseDevice((struct IORequest *) tmp);
	DeleteExtIO((struct IORequest *) tmp);
    }
    *tr = NULL;
}
开发者ID:DailyR,项目名称:mudos,代码行数:26,代码来源:signal.c

示例9: GetOpenPanelInfoW

void WINAPI GetOpenPanelInfoW(struct OpenPanelInfo *Info)
{
	
	if(!Info->hPanel || INVALID_HANDLE_VALUE == Info->hPanel)
		return;

	fardroid * android = (fardroid *)Info->hPanel;
	Info->StructSize=sizeof(*Info);
	Info->Flags = OPIF_ADDDOTS | OPIF_SHOWPRESERVECASE;

	Info->StartSortMode = (OPENPANELINFO_SORTMODES)	conf.SortMode;
	Info->StartSortOrder = conf.SortOrder;

	Info->CurDir = NULL;
	Info->Format= GetMsg(MTitle);

	android->PreparePanel(Info);

	Info->DescrFiles=NULL;
	Info->DescrFilesNumber=0;

	Info->StartPanelMode = _F('0')+conf.PanelMode;
	Info->PanelModesArray=NULL;
	Info->PanelModesNumber=0;

	Info->KeyBar=&KeyBar;
}
开发者ID:kholodovitch,项目名称:cromfarplugs,代码行数:27,代码来源:fardroidPlugin.cpp

示例10: Message

int WINAPI _export Message(unsigned long Msg,void *InData,void *OutData)
{
  switch(Msg)
  {
    case AHMSG_GETINFO:
    {
      GetInfoOutData *data=(GetInfoOutData *)OutData;
      data->TypesNumber=1;
      static struct TypeInfo TypesInfo[1];
      memset(TypesInfo,0,sizeof(TypesInfo));
      TypesInfo[0].StructSize=sizeof(TypesInfo[0]);
      lstrcpy(TypesInfo[0].TypeString,"Custom");
      *TypesInfo[0].Mask=0;
      TypesInfo[0].HFlags=F_INPUTKEYWORD;
      data->TypesInfo=TypesInfo;
      GetMsg(MTitle,data->ConfigString);
      data->Flags=AHMSG_CONFIG;
      return TRUE;
    }

    case AHMSG_SHOWHELP:
    {
      HelpInData *data = (HelpInData *)InData;
      HelpOutData *odata = (HelpOutData *)OutData;
      return ShowCustom(data->FileName,data->Keyword,odata->Error);
    }

    case AHMSG_CONFIG:
    {
      Config();
      return TRUE;
    }
  }
  return FALSE;
}
开发者ID:CS-svnmirror,项目名称:evil-programmers,代码行数:35,代码来源:ahp_custom.cpp

示例11: lib_exec_f_GetMsg_2

int lib_exec_f_GetMsg_2(emumsg_syscall_t *msg)
{
	/* Make real syscall */
	msg->arg[0]._aptr = GetMsg((struct MsgPort *)msg->arg[0]._aptr);

	return HOOK_DONE;
}
开发者ID:moggen,项目名称:emumiga,代码行数:7,代码来源:f_getmsg.cpp

示例12: config_paths_cleanup

// Clean up
void config_paths_cleanup(config_path_data *data)
{
	if (data)
	{
		// AppWindow
		RemoveAppWindow(data->appwindow);

		// Close window
		CloseConfigWindow(data->window);

		// Free list
		Att_RemList(data->path_list,0);

		// Close cx library
		/*#ifdef __amigaos4__
		DropInterface((struct Interface *)ICommodities); 
		#endif
		CloseLibrary(data->cxbase);*/

		// Free port
		if (data->appport)
		{
			struct Message *msg;

			// Flush it
			while ((msg=GetMsg(data->appport))) ReplyMsg(msg);

			// Delete it
			DeleteMsgPort(data->appport);
		}

		// Free data
		FreeVec(data);
	}
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:36,代码来源:pathformat.c

示例13: rexx_exit

void rexx_exit (void)
{
    if (ARexxPort) {
	struct RexxMsg *msg;
	gui_rexx_s *gui = &gui_rexx[ON_EXIT];

	if (gui->port[0] && gui->cmd_on[0]) {
	    if (ADDRESS(gui->port, gui->cmd_on) != RC_OK) {
		write_log ("%s:%s:%s\n", gui->port,
					 gui->cmd_on,
					 RESULT);
	    }
	    gui->port[0] = '\0';
	}
	Forbid ();
	while ((msg = (struct RexxMsg*)GetMsg (ARexxPort))) {
	   msg->rm_Result1 = RC_ERROR;
	   msg->rm_Result2 = 0;
	   ReplyMsg ((void*)msg);
	}
	DeletePort (ARexxPort);
	Permit ();
	ARexxPort = NULL;
    }
#ifdef __amigaos4__
    if (IRexxSys) {
	DropInterface ((struct Interface *)IRexxSys);
	IRexxSys = NULL;
    }
#endif
    if (RexxSysBase) {
	CloseLibrary ((void*)RexxSysBase);
	RexxSysBase = NULL;
    }
}
开发者ID:diablodiab,项目名称:libretro-uae,代码行数:35,代码来源:ami-rexx.c

示例14: printerror

/*** printerror - print error message on status line
*
*  prints a formatted error message on the status line, and then waits for a
*  keystroke. Once hit, the message is cleared.
*
* Input:
*  printf style parameters
*
* Output:
*  Number of characters output in error message
*
*************************************************************************/
int
printerror (
    char *pszFmt,
    ...
    ) {

    buffer       bufLocal;
    va_list      Arguments;
    REGISTER int cch;

    va_start(Arguments, pszFmt);

    ZFormat (bufLocal, pszFmt, Arguments);

    fReDraw = TRUE;
    bell ();
    FlushInput ();
    cch = soutb (0, YSIZE, bufLocal, errColor);
    if (fErrPrompt) {
		asserte (*GetMsg (MSG_PRESS_ANY, bufLocal));
        soutb (XSIZE-strlen(bufLocal)-1, YSIZE, bufLocal, errColor);
        SetEvent( semIdle );
		ReadChar ();
        WaitForSingleObject(semIdle, INFINITE);
		bufLocal[0] = ' ';
		bufLocal[1] = '\0';
		soutb(0, YSIZE, bufLocal, errColor);
    }

    va_end(Arguments);

    return cch;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:45,代码来源:display.c

示例15: L_IPC_Startup

// Send an IPC startup
int ASM L_IPC_Startup(
	REG(a0, IPCData *ipc),
	REG(a1, APTR data),
	REG(a2, struct MsgPort *reply))
{
	struct MsgPort *port=0;
	IPCMessage startup;

	// If no message port supplied, create one
	if (!reply) port=reply=CreateMsgPort();

	// Fill out startup message
	startup.msg.mn_ReplyPort=reply;
	startup.command=IPC_STARTUP;
	startup.flags=(ULONG)ipc;
	startup.data=data;

	// Send the startup message
	PutMsg(&ipc->proc->pr_MsgPort,(struct Message *)&startup);

	// Wait for reply back
	WaitPort(reply);
	GetMsg(reply);

	// Delete port if we created one
	if (port) DeleteMsgPort(port);

	// If there's no command port, report failure
	if (startup.command!=IPC_STARTUP) return 0;
	return 1;
}
开发者ID:timofonic,项目名称:dopus5allamigas,代码行数:32,代码来源:ipc.c


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