b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

translatemessage_dispacthmessage函数_windows createfile(10)

电脑杂谈  发布时间:2017-05-28 09:01:44  来源:网络整理

return 1;

}

//start thread

hThread = (HANDLE)_beginthreadex( NULL, 0, &fun, NULL, 0, &nThreadID );

if(hThread == 0)

{

printf("start thread failed,errno:%d\n",::GetLastError());

CloseHandle(hStartEvent);

return 1;

}

//wait thread start event to avoid PostThreadMessage return errno:1444

::WaitForSingleObject(hStartEvent,INFINITE);

CloseHandle(hStartEvent);

int count = 0;

while(true)

{

char* pInfo = new char[MAX_INFO_SIZE]; //create dynamic msg

sprintf(pInfo,"msg_%d",count);

if(!PostThreadMessage(nThreadID,MY_MSG,(WPARAM)pInfo,0))//post thread msg

{

printf("post message failed,errno:%d\n",::GetLastError());

delete[] pInfo;

}

::Sleep(1000);

}

CloseHandle(hThread);

return 0;

}

PeekMessage

Windows CE 5.0

This function checks a thread message queue for a message and places the message (if any) in the specified structure.

BOOL PeekMessage(

LPMSG lpMsg,

HWND hWnd,

UINT wMsgFilterMin,

UINT wMsgFilterMax,

UINT wRemoveMsg

);

Parameters

lpMsg

[in] Pointer to an MSG structure that receives message information.


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-49688-10.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    • 李商隐
      李商隐

      也必须要留出公共空间以利大家通行的

    热点图片
    拼命载入中...