openDecal/Native/DecalControls/IconColumn.cpp
erik d1442e3747 Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild:

Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil)
Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs
  - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters
  - Decal.Core, DecalControls, DecalRender, D3DService
Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL
Phase 4: DenAgent WinForms tray application
Phase 5: WiX installer and build script

25 C# projects building with 0 errors.
Native C++ projects require VS 2022 + Windows SDK (x86).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:27:56 +01:00

95 lines
1.7 KiB
C++

// IconColumn.cpp : Implementation of cIconColumn
#include "stdafx.h"
#include "DecalControls.h"
#include "IconColumn.h"
/////////////////////////////////////////////////////////////////////////////
// cIconColumn
STDMETHODIMP cIconColumn::get_FixedWidth(VARIANT_BOOL *pVal)
{
*pVal = VARIANT_TRUE;
return S_OK;
}
STDMETHODIMP cIconColumn::get_Width(long *pVal)
{
*pVal = 20;
return S_OK;
}
STDMETHODIMP cIconColumn::put_Width(long newVal)
{
//m_Width = newVal;
return S_OK;
}
STDMETHODIMP cIconColumn::Render(ICanvas *pCanvas, LPPOINT ptCell, long nColor)
{
_variant_t vIconLib, vIcon;
m_pList->get_Data( ptCell->x, ptCell->y, 0, &vIconLib );
m_pList->get_Data( ptCell->x, ptCell->y, 1, &vIcon );
// Converted nicely now ...
// Find our checked and unchecked images
CComPtr< IIconCache > pIcons;
SIZE sz = { 16, 16 };
m_pSite->GetIconCache( &sz, &pIcons );
POINT pt = { 2, 2 };
pIcons->DrawIcon( &pt, static_cast< long >( vIcon ), static_cast< long >( vIconLib ), pCanvas );
return S_OK;
}
STDMETHODIMP cIconColumn::get_DataColumns(long *pVal)
{
*pVal = 2;
return S_OK;
}
STDMETHODIMP cIconColumn::Initialize(IList *newVal, IPluginSite *pSite)
{
m_pList = newVal;
m_pSite = pSite;
return S_OK;
}
STDMETHODIMP cIconColumn::SchemaLoad(IUnknown *pSchema)
{
// TODO: Add your implementation code here
return S_OK;
}
STDMETHODIMP cIconColumn::get_Height(long *pVal)
{
*pVal = 20;
return S_OK;
}
STDMETHODIMP cIconColumn::Activate(LPPOINT ptCell)
{
// TODO: Add your implementation code here
return S_OK;
}
STDMETHODIMP cIconColumn::get_Color(long nRow, long *pVal)
{
return S_OK;
}
STDMETHODIMP cIconColumn::put_Color(long nRow, long newVal)
{
return S_OK;
}