source: trunk/src/user32/winicon.cpp@ 1036

Last change on this file since 1036 was 949, checked in by sandervl, 26 years ago

Moved new user32 here

File size: 3.4 KB
Line 
1/* $Id: winicon.cpp,v 1.1 1999-09-15 23:19:03 sandervl Exp $ */
2/*
3 * Win32 Icon Code for OS/2
4 *
5 *
6 * Copyright 1998 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 <winicon.h>
14
15//******************************************************************************
16//******************************************************************************
17HICON WIN32API CreateIcon( HINSTANCE arg1, INT arg2, INT arg3, BYTE arg4, BYTE arg5, LPCVOID arg6, LPCVOID arg7)
18{
19#ifdef DEBUG
20 WriteLog("USER32: CreateIcon\n");
21#endif
22 return O32_CreateIcon(arg1, arg2, arg3, arg4, arg5, (const BYTE *)arg6, (const BYTE *)arg7);
23}
24//******************************************************************************
25//ASSERT dwVer == win31 (ok according to SDK docs)
26//******************************************************************************
27HICON WIN32API CreateIconFromResource(PBYTE presbits, UINT dwResSize,
28 BOOL fIcon, DWORD dwVer)
29{
30 HICON hicon;
31 DWORD OS2ResSize = 0;
32 PBYTE OS2Icon = ConvertWin32Icon(presbits, dwResSize, &OS2ResSize);
33
34 hicon = O32_CreateIconFromResource(OS2Icon, OS2ResSize, fIcon, dwVer);
35#ifdef DEBUG
36 WriteLog("USER32: CreateIconFromResource returned %X (%X)\n", hicon, GetLastError());
37#endif
38 if(OS2Icon)
39 FreeIcon(OS2Icon);
40
41 return(hicon);
42}
43//******************************************************************************
44//******************************************************************************
45HICON WIN32API CreateIconFromResourceEx(PBYTE presbits, UINT dwResSize,
46 BOOL fIcon, DWORD dwVer,
47 int cxDesired, int cyDesired,
48 UINT Flags)
49{
50#ifdef DEBUG
51 WriteLog("USER32: CreateIconFromResourceEx %X %d %d %X %d %d %X, not completely supported!\n", presbits, dwResSize, fIcon, dwVer, cxDesired, cyDesired, Flags);
52#endif
53 return CreateIconFromResource(presbits, dwResSize, fIcon, dwVer);
54}
55//******************************************************************************
56//******************************************************************************
57HICON WIN32API CreateIconIndirect(LPICONINFO arg1)
58{
59#ifdef DEBUG
60 WriteLog("USER32: CreateIconIndirect\n");
61#endif
62 return O32_CreateIconIndirect(arg1);
63}
64//******************************************************************************
65//******************************************************************************
66BOOL WIN32API DestroyIcon( HICON arg1)
67{
68#ifdef DEBUG
69 WriteLog("USER32: DestroyIcon\n");
70#endif
71 return O32_DestroyIcon(arg1);
72}
73//******************************************************************************
74//******************************************************************************
75HICON WIN32API CopyIcon( HICON arg1)
76{
77#ifdef DEBUG
78 WriteLog("USER32: CopyIcon\n");
79#endif
80 return O32_CopyIcon(arg1);
81}
82//******************************************************************************
83//******************************************************************************
84BOOL WIN32API GetIconInfo( HICON arg1, LPICONINFO arg2)
85{
86#ifdef DEBUG
87 WriteLog("USER32: GetIconInfo\n");
88#endif
89 return O32_GetIconInfo(arg1, arg2);
90}
91//******************************************************************************
92//******************************************************************************
Note: See TracBrowser for help on using the repository browser.