004
23.06.2004, 12:22 Uhr
~Michael
Gast
|
Hier mein Code hoffe du kannst mir helfen.
C++: |
while (WaitForSingleObject(hFinish, 0) != WAIT_OBJECT_0) { WaitForSingleObject(hMutex, INFINITE); BYTE * lpEnd = lpCurrent[uiCurrent]; lpCurrent[uiCurrent] = lpCommBuffer[uiCurrent]; UINT uiLocalCurrent = uiCurrent; uiCurrent = (uiCurrent == 1) ? 0 : 1; BYTE *p = lpCommBuffer[uiLocalCurrent]; ReleaseMutex(hMutex);
CString cstrCaption = "", cstrTemp; CString cstrChange="", cstrBin; ((CTestDlg*)lpDlg)->m_Byte.InsertColumn( 0, "18 Byte", LVCFMT_CENTER, 50,1 ); const int LVS_EX_LABELTIP = 0x0000001; ((CTestDlg*)lpDlg)->m_Byte.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_LABELTIP); for (; p < lpEnd; p += 1) { cstrTemp.Format("%.2d", *p); cstrCaption += cstrTemp; ((CTestDlg*)lpDlg)->m_Byte.SetTextColor(200); ((CTestDlg*)lpDlg)->m_Byte.InsertItem(uiByte, cstrCaption);
Sleep(50); cstrCaption = "";
if (++uiByte >= 18) { ((CTestDlg*)lpDlg)->m_Byte.DeleteAllItems(); uiByte = 0; } } ReleaseMutex(hMutex); }
|
Die ganze Ausgabe mache ich in einem Thread.
MFG Michael |