Sorting Network Verify and Draw
Check Whether Comparator Networks Sort and Draw Them
Public Member Functions | Static Public Member Functions | Static Private Attributes | List of all members
CDialogBox Class Reference

Custom dialog box. More...

#include <DialogBox.h>

Public Member Functions

HRESULT GetNumInputs (HWND, UINT &)
 Get number of inputs. More...
 

Static Public Member Functions

static BOOL CALLBACK DlgProc (HWND, UINT, WPARAM, LPARAM)
 Dialog box procedure. More...
 

Static Private Attributes

static UINT m_nNumInputs = 0
 Number of inputs. More...
 

Detailed Description

Custom dialog box for getting the number of inputs from the user for a generated sorting network.

Definition at line 36 of file DialogBox.h.

Member Function Documentation

◆ DlgProc()

BOOL CALLBACK CDialogBox::DlgProc ( HWND  hDlg,
UINT  iMsg,
WPARAM  wp,
LPARAM  lp 
)
static

If the user clicks on the OK button, then m_nNumInputs is set to the value in the edit box. If anything goes wrong, m_nNumInputs is set to zero.

Parameters
hDlgDialog box handle.
iMsgMessage code.
wpParameter for message.
lpSecond parameter for message if needed.
Returns
TRUE If message is handled.

Definition at line 57 of file DialogBox.cpp.

◆ GetNumInputs()

HRESULT CDialogBox::GetNumInputs ( HWND  hwnd,
UINT &  n 
)

Pop up a custom modal dialog box and get an unsigned integer from an edit box. Fail if something goes wrong or the requested number of inputs is less than 2.

Parameters
hwndWindow handle.
n[OUT] Reference to result.
Returns
S_OK if successful, otherwise E_FAIL.

Definition at line 38 of file DialogBox.cpp.

Member Data Documentation

◆ m_nNumInputs

UINT CDialogBox::m_nNumInputs = 0
staticprivate

Definition at line 38 of file DialogBox.h.