progresscallback.cpp
来自「把doc文档转成pdf后刻录成CD,用VC++开发,用了Nero的SDK和CXI」· C++ 代码 · 共 58 行
CPP
58 行
/******************************************************************************
|* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
|* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
|* PARTICULAR PURPOSE.
|*
|* Copyright 1995-2004 Ahead Software AG. All Rights Reserved.
|*-----------------------------------------------------------------------------
|* NeroSDK / NeroCmd
|*
|* PROGRAM: ProgressCallback.cpp
|*
|* PURPOSE: Callback for displaying progress on current operation
******************************************************************************/
#include "stdafx.h"
#include "BurnContext.h"
#include "../Scan2PDFDefs.h"
// This is a Nero callback responsible for showing progress of the
// current operation. Here we print the numerical percent and a
// simple progress meter.
BOOL NERO_CALLBACK_ATTR CBurnContext::ProgressCallback (void *pUserData, DWORD dwProgressInPercent)
{
// print the numerical value
::SendMessage(theConf.m_BurnWindow, WM_BURN_PROGRESS, 0, dwProgressInPercent);
printf ("%03d%% ", dwProgressInPercent);
// print the progress meter
int w = (74*dwProgressInPercent)/100;
for (int i = w; i > 0; i --)
{
printf ("#");
}
for (i = 74 - w; i > 0; i --)
{
printf (".");
}
// carriage return
printf ("\r");
fflush (stdout);
// We simply return the aborted flag
return s_bAborted;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?