viewing paste Unknown #14393 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#include <windows.h>
#include "Resource.h"
//---------------------------------------------------------------------------
LRESULT CALLBACK DlgProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
//---------------------------------------------------------------------------
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD reason, LPVOID reservedstuff)
{
        switch(reason) {
          case DLL_PROCESS_ATTACH:
                DialogBox(hInstance, MAKEINTRESOURCE(IDD_DLGFIRST),
                  NULL, reinterpret_cast<DLGPROC>(DlgProc));
        }
        return TRUE;
}
//---------------------------------------------------------------------------
LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
        switch(Msg)
        {
        case WM_INITDIALOG:
                return TRUE;
 
        case WM_COMMAND:
                switch(wParam)
                {
                case IDOK:
                        EndDialog(hWndDlg, 0);
                        return TRUE;
                }
                break;
        }
 
        return FALSE;
}
//---------------------------------------------------------------------------
Viewed 244 times, submitted by unknown.