• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ HandleMessage函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: while

void Yodar_4028B::DoHandleWork()
{
	if(m_nReadIndex == m_nWriteIndex)
	{
		return ;
	}

	if(m_nReadIndex > m_nWriteIndex)
	{
		while(m_nReadIndex < MAX_DATA_COUNT && m_bRun)
		{
			HandleMessage( & m_data[m_nReadIndex]);
			memset((char *) m_data[m_nReadIndex].data, 0, MAX_DATA_LENGTH);
			m_data[m_nReadIndex].len = 0;
			
			m_nReadIndex++;
			if(m_nReadIndex >= MAX_DATA_COUNT)
			{
				m_nReadIndex = 0;
				break;
			}
		}
	}

	while(m_nReadIndex < m_nWriteIndex && m_bRun)
	{
		HandleMessage(&m_data[m_nReadIndex]);
		memset((char *) m_data[m_nReadIndex].data, 0, MAX_DATA_LENGTH);
		m_data[m_nReadIndex].len = 0;
		m_nReadIndex++;
	}
}
开发者ID:BackupGGCode,项目名称:faceaip,代码行数:32,代码来源:Yodar_4028B.cpp


示例2: DefaultProcessing

//
/// Intercepts the WM_MDICREATE message sent when MDI child windows are created,
/// and, if the client's style includes MDIS_ALLCHILDSTYLES, and the child window's
/// specified style is 0, then changes the child window style attributes to
/// WS_VISIBLE, WS_CHILD, WS_CLIPSIBLINGS, WS_CLIPCHILDREN, WS_SYSMENU, WS_CAPTION,
/// WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX.
//
TResult
TMDIClient::EvMDICreate(MDICREATESTRUCT & createStruct)
{
  // Fill in default child window styles if they request style 0 since this
  // client by default has set allchildstyles
  //
  if ((Attr.Style&MDIS_ALLCHILDSTYLES) && !createStruct.style)
    createStruct.style =
               WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
               WS_SYSMENU | WS_CAPTION | WS_THICKFRAME |
               WS_MINIMIZEBOX | WS_MAXIMIZEBOX;

  // Work around a Windows MDI bug w/ bad menus if MDI child is created
  // maximized, by hiding child now & maximizing later
  //
  uint32 origStyle = createStruct.style;
  if (createStruct.style & WS_MAXIMIZE)
    createStruct.style &= ~(WS_MAXIMIZE | WS_VISIBLE);

  TResult result = DefaultProcessing();

  // Finish up maximized MDI child workaround
  //
  if (THandle(result) && (origStyle & WS_MAXIMIZE)) {
    HandleMessage(WM_MDIMAXIMIZE, TParam1(result));
    HandleMessage(WM_MDIREFRESHMENU);
  }

  return result;
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:37,代码来源:mdiclien.cpp


示例3: POPUPDlgProc

MRESULT EXPENTRY POPUPDlgProc(HWND hwndDlg, ULONG msg, MPARAM mp1, MPARAM mp2)
{
  HWND hwndFrame = hwndDlg;
 /* ##START Form.37 Top of window procedure */
 /* ##END Top of window procedure */
   switch (msg) {
   /* Form event Opened WM_INITDLG */
   case WM_INITDLG :
     HandleMessage(hwndFrame, hwndDlg, msg, mp1, mp2);
      WinAssociateHelpInstance(pMainFormInfo->hwndHelpInstance, hwndFrame);

      /* ##START Form.1  */
      /* ##END  */
      break;

   /* Form event Closed WM_CLOSE */
   case WM_CLOSE :
      /* ##START Form.2  */
      /* ##END  */
     HandleMessage(hwndFrame, hwndDlg, msg, mp1, mp2);
      break;

   /* Form event Destroyed WM_DESTROY */
   case WM_DESTROY :
      /* ##START Form.3  */
      /* ##END  */
     /* Remove help instance */
     WinAssociateHelpInstance((HWND) 0, hwndFrame);
     HandleMessage(hwndFrame, hwndDlg, msg, mp1, mp2);
      break;

   case WM_COMMAND :
      switch (SHORT1FROMMP(mp1)) {
      } /* end switch */
      break;

  /* Initialize sub menus, if any */
  case WM_INITMENU:
     switch (SHORT1FROMMP(mp1)) {
     } /* end switch */
  break;
 /* ##START Form.38 User defined messages */
 /* ##END User defined messages */
   default :
     HandleMessage(hwndFrame, hwndDlg, msg, mp1, mp2);
     return WinDefDlgProc(hwndDlg,msg,mp1,mp2);
   } /* end switch for main msg dispatch */
   return (MRESULT)FALSE;
} /* end dialog procedure */
开发者ID:OS2World,项目名称:UTIL-NET-Sticky2,代码行数:49,代码来源:POPUP.C


示例4: establishConnection

void* establishConnection(void* arg) 
{
    //Мы работаем с конкретным соединением
    int incomeSd = *((int*)arg);
            
    int userID = FindCell();

    MessageType *buf = (MessageType*) malloc (sizeof(MessageType));
    int resultOfHandlingMessage = 1;

    while (resultOfHandlingMessage) 
    {
        if (server_enabled)
        {
            getMessage(incomeSd, buf);
            resultOfHandlingMessage = HandleMessage(buf, incomeSd, userID);
        }
        else
        {
            char *str = "Server is turned off...";
            MessageType m = composeMessage(text, strlen(str), str);
            sendMessage(incomeSd, &m);
        }
    }   
    
    free(buf);
    return NULL;
}
开发者ID:DeSerg,项目名称:mipt-solutions,代码行数:28,代码来源:server.c


示例5: ProcessMessages

int ProcessMessages(bf_read&msgs)
{

	int processed = 0;
	while (true)
	{
		if (msgs.IsOverflowed())
		{
			return processed;
		}



		unsigned char type = msgs.ReadUBitLong(NETMSG_TYPE_BITS);

		bool handled = HandleMessage(msgs, type);

		if (!handled)
		{
			printf("Unhandled Message: %i\n", type);
			return processed;
		}

		processed++;

		if (msgs.GetNumBitsLeft() < NETMSG_TYPE_BITS)
		{
			return processed;
		}
	}


	return processed;
}
开发者ID:Python1320,项目名称:source1_client,代码行数:34,代码来源:leyfakeclient.cpp


示例6: HandleMessage

LRESULT CALLBACK AnimaMouseInteractor::MessageProcCallback(int nCode, WPARAM wParam, LPARAM lParam)
{
	MSG* pMessageProcStruct = reinterpret_cast<MSG*>(lParam);
	if (pMessageProcStruct == nullptr)
		return 0;

	auto pair = _installedInteractors.find((long)pMessageProcStruct->hwnd);
	if (pair == _installedInteractors.end())
		return 0;

	AnimaMouseInteractor* pMouseInteractor = pair->second;
	if (pMouseInteractor == nullptr)
		return 0;

	if (nCode == HC_ACTION)
	{
		HWND wndProcWnd = pMessageProcStruct->hwnd;
		AUint wndProcMessage = pMessageProcStruct->message;
		WPARAM wndProcWparam = pMessageProcStruct->wParam;
		WPARAM wndProcLparam = pMessageProcStruct->lParam;

		HandleMessage(wndProcWnd, wndProcMessage, wndProcWparam, wndProcLparam, pMouseInteractor);
	}

	return CallNextHookEx(pMouseInteractor->_windowsProcHook, nCode, wParam, lParam);
}
开发者ID:zillemarco,项目名称:Anima_Old,代码行数:26,代码来源:AnimaMouseInteractor.cpp


示例7: M0CORE_IRQHandler

void M0CORE_IRQHandler(void)
{
    // Clear event flag
    LPC_CREG->M0TXEVENT = 0x00000000;
    // Handle message
    HandleMessage();
}
开发者ID:Andriiy,项目名称:Circuit-Boards,代码行数:7,代码来源:main_m4.c


示例8: THandle

//
/// Use the Windows message to get the active mdi child, and then down cast
/// to our MDI child derived class before returning it.
//
TMDIChild*
TMDIClient::GetActiveMDIChild()
{
  THandle hWnd = THandle(HandleMessage(WM_MDIGETACTIVE));

  return TYPESAFE_DOWNCAST(GetWindowPtr(hWnd), TMDIChild);
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:11,代码来源:mdiclien.cpp


示例9: UpdateTrack

void CD3DScrollBar::SetScrollPos(int ScrollPos,bool SendMsg)
{
	m_CurScrollPos=ScrollPos;
	UpdateTrack();
	if(SendMsg)
		HandleMessage(this,WM_D3DGUI_SCROLL_BAR_SCROLL,(WPARAM)GetID(),m_CurScrollPos);
}
开发者ID:EnoroF,项目名称:easygamelibs,代码行数:7,代码来源:D3DScrollBar.cpp


示例10: HandleMessage

    bool Client::Peek(EventMessage &msg)
    {
        message_queue* const mq = (message_queue*)this->privateQueue;

        // check local deque for message
        if(!this->storedMessages.empty())
        {
            // get first queued element and pop it
            msg = this->storedMessages.front();
            this->storedMessages.pop_front();
            return true;
        }

        std::stringbuf msgBuffer;

        char buff[MAX_MSG_SIZE];
        size_t recvd;
        unsigned int priority;

        if(mq->try_receive(buff, MAX_MSG_SIZE, recvd, priority))
        {
            msgBuffer.sputn(buff, recvd);
            msg.deserialize(msgBuffer);

            return HandleMessage(msg, priority);
        }
        else
            return false;
        return true;
    }
开发者ID:Frizi,项目名称:cs-ipc,代码行数:30,代码来源:Client.cpp


示例11: HandleMessageThread

/** A worker thread that handles messages from JavaScript.
 * @param[in] user_data Unused.
 * @return unused. */
void* HandleMessageThread(void* user_data) {
  while (1) {
    char* message = DequeueMessage();
    HandleMessage(message);
    free(message);
  }
}
开发者ID:01org,项目名称:pa-chromium,代码行数:10,代码来源:nacl_io_demo.c


示例12: GetMessageFilter

/*
 * GetMessageFilter - hook for get message
 */
LRESULT CALLBACK GetMessageFilter( int ncode, WPARAM wparam, LPARAM lparam )
{
    if( ncode >= 0 ) {
        HandleMessage( (LPMSG)lparam );
    }
    return( CallNextHookEx( getHookHandle, ncode, wparam, lparam ) );

} /* GetMessageFilter */
开发者ID:Azarien,项目名称:open-watcom-v2,代码行数:11,代码来源:spydll.c


示例13: OnReceiveMessage

		static void OnReceiveMessage(ZL_WebSocketConnection_Impl* impl, int32_t result)
		{
			//ZL_LOG("NACLWSC", "ONRECEIVE - WS: %d - RESULT: %d - READYSTATE: %d - BUFFER: %d", impl->websocket, result, (int32_t)ppb_websocket_interface->GetReadyState(impl->websocket), (int32_t)ppb_websocket_interface->GetBufferedAmount(impl->websocket));
			if (result < 0) { impl->Disconnect(PP_WEBSOCKETSTATUSCODE_ABNORMAL_CLOSURE, NULL, 0); return; }
			HandleMessage(impl);
			const PP_CompletionCallback cc = PP_MakeCompletionCallback((PP_CompletionCallback_Func)&OnReceiveMessage, (void*)impl);
			while (ppb_websocket_interface->ReceiveMessage(impl->websocket, &impl->data, cc) == PP_OK) HandleMessage(impl);
		}
开发者ID:schellingb,项目名称:ZillaLib,代码行数:8,代码来源:ZL_PlatformNACL.cpp


示例14: ForEach

//
/// Intercepts the WM_MDIDESTROY message.
///
/// Destroy an MDI child window. Must temporarily unhide any hidden children,
/// and then rehide them after the destruction. Otherwise Window's MDI client
/// gets confused
//
void
TMDIClient::EvMDIDestroy(THandle THandle)
{
  ForEach(sUnHide, (void*)THandle);
  DefaultProcessing();
  ForEach(sReHide);
  HandleMessage(WM_MDIREFRESHMENU);
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:15,代码来源:mdiclien.cpp


示例15: while

int _0xCC::WindowManager::DoMessageLoop(){
	while (HandleMessage()) {
		for (auto v : wins) {
			v->RenderEvent();
		}
	}
	return 0;
}
开发者ID:Yangff,项目名称:0xcc,代码行数:8,代码来源:WindowManager.cpp


示例16: while

/**
 * A worker thread that handles messages from JavaScript.
 * @param[in] user_data Unused.
 * @return unused.
 */
void *HandleMessageThread(void *user_data)
{
    while ( 1 )
    {
        struct PP_Var message = DequeueMessage();
        HandleMessage(message);
        g_ppb_var->Release(message);
    }
}
开发者ID:ceda018,项目名称:iguana_dev,代码行数:14,代码来源:main.c


示例17: while

void tTVPApplication::Run() {
	TVPTerminateCode = 0;

	// メイン メッセージ ループ:
	while( windows_list_.size() > 0 && tarminate_ == false ) {
		HandleMessage();
	}
	tarminate_ = true;
}
开发者ID:DollStudio,项目名称:krkrz,代码行数:9,代码来源:Application.cpp


示例18: HandleMessage

	bool PubSubManager::handleStanza (const QDomElement& elem)
	{
		if (elem.tagName () == "message")
			return HandleMessage (elem);
		else if (elem.tagName () == "iq")
			return HandleIq (elem);
		else
			return false;
	}
开发者ID:Kalarel,项目名称:leechcraft,代码行数:9,代码来源:pubsubmanager.cpp


示例19:

int _0xCC::WindowManager::SingleMessageLoop(){
	if (HandleMessage()) {
		for (auto v : wins) {
			v->RenderEvent();
		}
		return 1;
	}
	return 0;
}
开发者ID:Yangff,项目名称:0xcc,代码行数:9,代码来源:WindowManager.cpp


示例20: while

void Server::UpdateRecv(){
	while (isServerRunning){
		if ((nbytes = recvfrom(sockfd, buf, MAXDATASIZE-1 , 0,
				(struct sockaddr *)&remoteaddr, &remoteaddrlen)) == -1) {
					return;
		}
		if (nbytes > 0){
			HandleMessage();
		}
	}
}
开发者ID:Coteh,项目名称:simple-udp-chat,代码行数:11,代码来源:Server.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HandleMoveWorldportAckOpcode函数代码示例发布时间:2022-05-30
下一篇:
C++ HandleException函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap