You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.3 KiB
49 lines
1.3 KiB
///////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (c) Microsoft Corporation
|
|
//
|
|
// SYNOPSIS
|
|
//
|
|
// Declares the class HiddenDialogWithWorker.
|
|
//
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
#ifndef HIDDENWORKER_H
|
|
#define HIDDENWORKER_H
|
|
#pragma once
|
|
|
|
class HiddenDialogWithWorker : public CDialog
|
|
{
|
|
public:
|
|
HiddenDialogWithWorker();
|
|
virtual ~HiddenDialogWithWorker() throw ();
|
|
|
|
// Start the worker thread.
|
|
void Start();
|
|
|
|
private:
|
|
// Invoked in the worker thread.
|
|
virtual LPARAM DoWork() throw () = 0;
|
|
// Invoked in the dialog thread after the worker completes.
|
|
virtual void OnComplete(LPARAM result) throw () = 0;
|
|
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg LRESULT OnThreadMessage(WPARAM wParam, LPARAM lParam);
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
// Message signaling that the thread is complete.
|
|
static const UINT threadMessage = WM_USER + 1;
|
|
|
|
// Start routine for the worker thread.
|
|
static DWORD WINAPI StartRoutine(void* arg) throw ();
|
|
|
|
// Handle to the worker thread.
|
|
HANDLE worker;
|
|
|
|
// Not implemented.
|
|
HiddenDialogWithWorker(const HiddenDialogWithWorker&);
|
|
HiddenDialogWithWorker& operator=(const HiddenDialogWithWorker&);
|
|
};
|
|
|
|
#endif // HIDDENWORKER_H
|