1 | /* $Id: win32dlg.cpp,v 1.2 1999-08-30 11:59:53 sandervl Exp $ */
|
---|
2 | /*
|
---|
3 | * Win32 Dialog Code for OS/2
|
---|
4 | *
|
---|
5 | *
|
---|
6 | * Copyright 1998-1999 Sander van Leeuwen (sandervl@xs4all.nl)
|
---|
7 | *
|
---|
8 | *
|
---|
9 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
10 | *
|
---|
11 | */
|
---|
12 | #include <os2win.h>
|
---|
13 | #include <stdlib.h>
|
---|
14 | #include <string.h>
|
---|
15 | #include <misc.h>
|
---|
16 | #include <win32dlg.h>
|
---|
17 |
|
---|
18 | //******************************************************************************
|
---|
19 | //******************************************************************************
|
---|
20 | Win32Dialog::Win32Dialog() : Win32BaseWindow(OBJTYPE_DIALOG)
|
---|
21 | {
|
---|
22 | }
|
---|
23 | //******************************************************************************
|
---|
24 | //******************************************************************************
|
---|
25 | Win32Dialog::~Win32Dialog()
|
---|
26 | {
|
---|
27 |
|
---|
28 | }
|
---|
29 | //******************************************************************************
|
---|
30 | //******************************************************************************
|
---|
31 | ULONG Win32Dialog::MsgOS2Create(HWND hwndOS2, ULONG initParam)
|
---|
32 | {
|
---|
33 | OS2Hwnd = hwndOS2;
|
---|
34 | return win32wndproc(Win32Hwnd, WM_CREATE, 0, initParam);
|
---|
35 | }
|
---|
36 | //******************************************************************************
|
---|
37 | //******************************************************************************
|
---|
38 | LONG Win32Dialog::SetWindowLongA(int index, ULONG value)
|
---|
39 | {
|
---|
40 | LONG oldval;
|
---|
41 |
|
---|
42 | switch(index)
|
---|
43 | {
|
---|
44 | case DWL_DLGPROC:
|
---|
45 | oldval = (LONG)Win32DlgProc;
|
---|
46 | Win32DlgProc = (DLGPROC)index;
|
---|
47 | return oldval;
|
---|
48 | case DWL_MSGRESULT:
|
---|
49 | oldval = msgResult;
|
---|
50 | msgResult = value;
|
---|
51 | return oldval;
|
---|
52 | case DWL_USER:
|
---|
53 | oldval = userDlgData;
|
---|
54 | userDlgData = value;
|
---|
55 | return oldval;
|
---|
56 | default:
|
---|
57 | return Win32BaseWindow::SetWindowLongA(index, value);
|
---|
58 | }
|
---|
59 | }
|
---|
60 | //******************************************************************************
|
---|
61 | //******************************************************************************
|
---|
62 | ULONG Win32Dialog::GetWindowLongA(int index)
|
---|
63 | {
|
---|
64 | switch(index)
|
---|
65 | {
|
---|
66 | case DWL_DLGPROC:
|
---|
67 | return (ULONG)Win32DlgProc;
|
---|
68 | case DWL_MSGRESULT:
|
---|
69 | return msgResult;
|
---|
70 | case DWL_USER:
|
---|
71 | return userDlgData;
|
---|
72 | default:
|
---|
73 | return Win32BaseWindow::GetWindowLongA(index);
|
---|
74 | }
|
---|
75 | }
|
---|
76 | //******************************************************************************
|
---|
77 | //******************************************************************************
|
---|