Internet request progress dialog class. More...
#include <CCPrintProgressDlg.h>
Inherits CCPrintDlg, and ProgressInterface.
Public Member Functions | |
CCPrintProgressDlg () | |
Constructor. | |
~CCPrintProgressDlg () | |
Destructor. | |
bool | DoRequest (HWND hParent, InternetRequest &request, const std::tstring &sRequest, LPCTSTR lpServer=NULL, LPCSTR lpOptional=NULL, LPCTSTR lpHeaders=NULL) |
Runs an internet request (displaying the dialog); this is a blocking function (will only return when the request is finished). | |
virtual bool | GetCancel () |
Called to test if the operation is to be canceled. | |
virtual void | OnFinished (bool bSuccess) |
Called when the operation is finished. | |
Public Attributes | |
InternetRequestBuffer | m_buffer |
Buffer to fill with the request results. | |
Protected Member Functions | |
virtual BOOL | PageProc (UINT uMsg, WPARAM wParam, LPARAM lParam) |
Called when a windows message is sent to the page. | |
Protected Attributes | |
bool | m_bCancel |
Cancel flag. | |
int | m_nStep |
Progresss data. | |
UINT | m_uTimer |
Timer. | |
bool | m_bSuccess |
true if the request succeeded, false if failed | |
InternetRequest * | m_pRequest |
Pointer to the internet request object. | |
std::tstring | m_sRequest |
The request itself. | |
LPCTSTR | m_lpServer |
Name of the server to connect to. | |
LPCSTR | m_lpOptional |
Additional data to request (ANSI only!). | |
LPCTSTR | m_lpHeaders |
Additional headers. |
Internet request progress dialog class.
Definition at line 40 of file CCPrintProgressDlg.h.
bool CCPrintProgressDlg::DoRequest | ( | HWND | hParent, | |
InternetRequest & | request, | |||
const std::tstring & | sRequest, | |||
LPCTSTR | lpServer = NULL , |
|||
LPCSTR | lpOptional = NULL , |
|||
LPCTSTR | lpHeaders = NULL | |||
) |
Runs an internet request (displaying the dialog); this is a blocking function (will only return when the request is finished).
hParent | Handle of parent window | |
request | Existing internet request object (to reduce opening connection overhead) | |
sRequest | The request to run | |
lpServer | The server to connect to (can be NULL to connect to use the open connection) | |
lpOptional | Optional headers for the request (can be NULL if none required) | |
lpHeaders | Headers for the request (can be NULL if no special headers needed) |
Definition at line 46 of file CCPrintProgressDlg.cpp.
References CCPrintDlg::DoModal(), m_bCancel, m_bSuccess, CCPrintDlg::m_hDlg, m_lpHeaders, m_lpOptional, m_lpServer, m_pRequest, and m_sRequest.
Referenced by LicenseInfoLoader::RequestLicenseType().
virtual bool CCPrintProgressDlg::GetCancel | ( | ) | [inline, virtual] |
Called to test if the operation is to be canceled.
Reimplemented from ProgressInterface.
Definition at line 97 of file CCPrintProgressDlg.h.
References m_bCancel.
Referenced by LicenseInfoLoader::RequestLicenseType().
void CCPrintProgressDlg::OnFinished | ( | bool | bSuccess | ) | [virtual] |
Called when the operation is finished.
bSuccess | true if finished successfully, false if failed (or canceled by the user) | |
bSuccess | true if finished successfully, false if failed |
Reimplemented from ProgressInterface.
Definition at line 141 of file CCPrintProgressDlg.cpp.
References m_bSuccess, and CCPrintDlg::m_hDlg.
BOOL CCPrintProgressDlg::PageProc | ( | UINT | uMsg, | |
WPARAM | wParam, | |||
LPARAM | lParam | |||
) | [protected, virtual] |
Called when a windows message is sent to the page.
uMsg | ID of the message | |
wParam | First parameter of the message | |
lParam | Second parameter of the message |
Reimplemented from CCPrintDlg.
Definition at line 79 of file CCPrintProgressDlg.cpp.
References InternetRequest::DoRequestThread(), CCPrintDlg::EnableDlgItem(), CCPrintDlg::GetDlgItem(), IDT_PROGRESS, m_bCancel, m_buffer, CCPrintDlg::m_hDlg, m_lpHeaders, m_lpOptional, m_lpServer, m_nStep, m_pRequest, m_sRequest, m_uTimer, and MAX_STEP.