static void show_usage(std::string name) { DisplayCopyright(); std::cerr << "\n\nReads and parses ASTERIX data from stdin, file or network multicast stream\nand prints it in textual presentation on standard output.\n\n" << "Usage:\n" << name << " [-h] [-v] [-L] [-o] [-s] [-P|-O|-R|-F|-H] [-l|-x|-j|-jh] [-d filename] [-LF filename] -f filename|-i (mcastaddress:ipaddress:port[:srcaddress]@)+" << "\n\nOptions:" << "\n\t-h,--help\tShow this help message." << "\n\t-v,--verbose\tShow more information during program execution." << "\n\t-d,--def\tXML protocol definitions filenames are listed in specified filename. By default are listed in config/asterix.ini" << "\n\t-L,--list\tList all configured ASTERIX items. Mark which items are filtered." << "\n\t-LF,--filter\tPrintout only items listed in configured file." << "\n\t-o,--loop\tLoop the input file. Only relevant when file is data source." << "\n\t-s,--sync\tOutput will be printed synchronously with input file (with time delays between packets). This parameter is used only if input is from file." << "\n\nInput format" << "\n------------" << "\n\t-P,--pcap\tInput is from PCAP file." << "\n\t-R,--oradispcap\tInput is from PCAP file and Asterix packet is encapsulated in ORADIS packet." << "\n\t-O,--oradis\tAsterix packet is encapsulated in ORADIS packet." << "\n\t-F,--final\tAsterix packet is encapsulated in FINAL packet." << "\n\t-H,--hdlc\tAsterix packet is encapsulated in HDLC packet." << "\n\nOutput format" << "\n------------" << "\n\t-l,--line\tOutput will be printed as one line per item. This format is suitable for parsing." << "\n\t-x,--xml\tOutput will be printed in XML format." << "\n\t-j,--json\tOutput will be printed in compact JSON format (one object per line)." << "\n\t-jh,--jsonh\tOutput will be printed in human readable JSON format (one item per line)." << "\n\nData source" << "\n------------" << "\n\t-f filename\tFile generated from libpcap (tcpdump or Wireshark) or file in FINAL or HDLC format.\n\t\t\tFor example: -f filename.pcap" << "\n\t-i m:i:p[:s]\tMulticast UDP/IP address:Interface address:Port[:Source address].\n\t\t\tFor example: 232.1.1.12:10.17.58.37:21112:10.17.22.23\n\t\t\tMore than one multicast group could be defined, use @ as separator.\n\t\t\tFor example: 232.1.1.13:10.17.58.37:21112:[email protected]:10.17.58.37:21112:10.17.22.23" << std::endl; }
void CBigIcon::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { CDC* pDC = CDC::FromHandle(lpDrawItemStruct->hDC); ASSERT(pDC != NULL); HPALETTE hPalette = WFE_GetUIPalette(NULL); HPALETTE hOldPalette = ::SelectPalette(lpDrawItemStruct->hDC, hPalette, FALSE); ::RealizePalette(lpDrawItemStruct->hDC); CRect rect; GetClientRect(rect); int cxClient = rect.Width(); int cyClient = rect.Height(); // draw the bitmap contents CDC dcMem; if (!dcMem.CreateCompatibleDC(pDC)) return; HBITMAP hOldBitmap = (HBITMAP)::SelectObject(dcMem.m_hDC, m_hBitmap); if (hOldBitmap == NULL) return; pDC->BitBlt(0, 0, m_sizeBitmap.cx, m_sizeBitmap.cy, &dcMem, 0, 0, SRCCOPY); ::SelectObject(dcMem.m_hDC, hOldBitmap); DisplayCopyright(); ::SelectPalette(lpDrawItemStruct->hDC, hOldPalette, TRUE); ReleaseDC(pDC); }