[2803] | 1 | /* $Id: winswitch.cpp,v 1.4 2000-02-16 14:28:28 sandervl Exp $ */
|
---|
[2469] | 2 | /*
|
---|
| 3 | * WinSwitch control
|
---|
| 4 | *
|
---|
| 5 | * Copyright 1999 Christoph Bratschi
|
---|
| 6 | *
|
---|
| 7 | * Project Odin Software License can be found in LICENSE.TXT
|
---|
| 8 | *
|
---|
| 9 | * Status: stub
|
---|
| 10 | * Version: stub
|
---|
| 11 | */
|
---|
| 12 | #include <stdlib.h>
|
---|
| 13 | #include <os2win.h>
|
---|
| 14 | #include "controls.h"
|
---|
| 15 | #include "winswitch.h"
|
---|
| 16 |
|
---|
[2803] | 17 | #define DBG_LOCALLOG DBG_winswitch
|
---|
| 18 | #include "dbglocal.h"
|
---|
| 19 |
|
---|
[2469] | 20 | LRESULT WINAPI WinSwitchWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam)
|
---|
| 21 | {
|
---|
| 22 | return DefWindowProcA(hwnd,message,wParam,lParam);
|
---|
| 23 | }
|
---|
| 24 | //******************************************************************************
|
---|
| 25 | //******************************************************************************
|
---|
| 26 | BOOL WINSWITCH_Register()
|
---|
| 27 | {
|
---|
| 28 | WNDCLASSA wndClass;
|
---|
| 29 |
|
---|
| 30 | //SvL: Don't check this now
|
---|
| 31 | // if (GlobalFindAtomA(WINSWITCHCLASSNAME)) return FALSE;
|
---|
| 32 |
|
---|
| 33 | ZeroMemory(&wndClass,sizeof(WNDCLASSA));
|
---|
| 34 | wndClass.style = CS_GLOBALCLASS;
|
---|
| 35 | wndClass.lpfnWndProc = (WNDPROC)WinSwitchWndProc;
|
---|
| 36 | wndClass.cbClsExtra = 0;
|
---|
| 37 | wndClass.cbWndExtra = sizeof(WINSWITCH_INFO);
|
---|
| 38 | wndClass.hCursor = LoadCursorA(0,IDC_ARROWA);
|
---|
| 39 | wndClass.hbrBackground = (HBRUSH)0;
|
---|
| 40 | wndClass.lpszClassName = WINSWITCHCLASSNAME;
|
---|
| 41 |
|
---|
| 42 | return RegisterClassA(&wndClass);
|
---|
| 43 | }
|
---|
| 44 | //******************************************************************************
|
---|
| 45 | //******************************************************************************
|
---|
| 46 | BOOL WINSWITCH_Unregister()
|
---|
| 47 | {
|
---|
| 48 | if (GlobalFindAtomA(WINSWITCHCLASSNAME))
|
---|
| 49 | return UnregisterClassA(WINSWITCHCLASSNAME,(HINSTANCE)NULL);
|
---|
| 50 | else return FALSE;
|
---|
| 51 | }
|
---|
| 52 | //******************************************************************************
|
---|
| 53 | //******************************************************************************
|
---|
| 54 |
|
---|