/* Window生成ルーチン */ BOOL THistDlg::Create(HINSTANCE hI) { if (!TDlg::Create(hI)) return FALSE; histListView.AttachWnd(GetDlgItem(HISTORY_LIST)); histListHeader.AttachWnd((HWND)histListView.SendMessage(LVM_GETHEADER, 0, 0)); SetFont(); SetHeader(); // dummy for reflect font SetAllData(); return TRUE; }
/* WM_COMMAND CallBack */ BOOL THistDlg::EvCommand(WORD wNotifyCode, WORD wID, LPARAM hWndCtl) { switch (wID) { case MISC_ACCEL: case HIDE_ACCEL: ::PostMessage(GetMainWnd(), WM_COMMAND, wID, 0); return TRUE; case IDOK: case IDCANCEL: EndDialog(FALSE); // ::PostMessage(GetMainWnd(), WM_MSGDLG_EXIT, (WPARAM)0, (LPARAM)this); return TRUE; case OPENED_CHECK: SaveColumnInfo(); openedMode = !openedMode; SetAllData(); return TRUE; case CLEAR_BUTTON: histListView.DeleteAllItems(); if (openedMode) { while (histHash.LruTop()) histHash.UnRegister(histHash.LruTop()); // !UnRegisterLRU() } else { for (HistObj *obj=histHash.Top(); obj; ) { HistObj *next = obj->next; if (!*obj->odate) histHash.UnRegister(obj); obj = next; } unOpenedNum = 0; } SetTitle(); return TRUE; } return FALSE; }
void VellemanOut::outputDMX(quint32 output, const QByteArray& universe) { if (output != 0) return; if (m_currentlyOpen == false) { StartDevice(); m_currentlyOpen = true; } int32_t channelCount = (int32_t) universe.size(); SetChannelCount(channelCount); int32_t values [512]; //Set up array to pass to SetAllData. for (int32_t channelLoop = 0; channelLoop < channelCount; channelLoop++) { //Write the value to our temporary array. values[channelLoop] = (quint32) universe[channelLoop]; } SetAllData(values); }