mirror of https://github.com/OpenVPN/openvpn-gui
Add a BMP image for PLAP tile and use it
parent
a500b9553e
commit
70610afc2f
|
@ -26,6 +26,7 @@
|
||||||
#include <winresrc.h>
|
#include <winresrc.h>
|
||||||
#include <richedit.h>
|
#include <richedit.h>
|
||||||
#include "../openvpn-gui-res.h"
|
#include "../openvpn-gui-res.h"
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
/* Language resource files are UTF-8 encoded */
|
/* Language resource files are UTF-8 encoded */
|
||||||
#pragma code_page(65001)
|
#pragma code_page(65001)
|
||||||
|
@ -39,6 +40,8 @@ ID_ICO_CONNECTED ICON DISCARDABLE "../res/connected.ico"
|
||||||
ID_ICO_CONNECTING ICON DISCARDABLE "../res/connecting.ico"
|
ID_ICO_CONNECTING ICON DISCARDABLE "../res/connecting.ico"
|
||||||
ID_ICO_DISCONNECTED ICON DISCARDABLE "../res/disconnected.ico"
|
ID_ICO_DISCONNECTED ICON DISCARDABLE "../res/disconnected.ico"
|
||||||
|
|
||||||
|
IDB_TILE_IMAGE BITMAP DISCARDABLE "../res/tileimage.bmp"
|
||||||
|
|
||||||
#ifdef ENABLE_OVPN3
|
#ifdef ENABLE_OVPN3
|
||||||
#define ADVANCED_DIALOG_HEIGHT 320
|
#define ADVANCED_DIALOG_HEIGHT 320
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
#include "plap_connection.h"
|
#include "plap_connection.h"
|
||||||
#include "plap_dll.h"
|
#include "plap_dll.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include "resource.h"
|
||||||
|
|
||||||
/* A "class" that implements IConnectableCredentialProviderCredential */
|
/* A "class" that implements IConnectableCredentialProviderCredential */
|
||||||
|
|
||||||
|
@ -343,9 +344,30 @@ GetStringValue(ICCPC *this, DWORD index, WCHAR **ws)
|
||||||
static HRESULT WINAPI
|
static HRESULT WINAPI
|
||||||
GetBitmapValue(UNUSED ICCPC *this, DWORD field, HBITMAP *bmp)
|
GetBitmapValue(UNUSED ICCPC *this, DWORD field, HBITMAP *bmp)
|
||||||
{
|
{
|
||||||
|
HRESULT hr = S_OK;
|
||||||
|
|
||||||
dmsg(L"field = %lu ", field);
|
dmsg(L"field = %lu ", field);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
if (field_desc[field].cpft == CPFT_TILE_IMAGE && bmp)
|
||||||
|
{
|
||||||
|
HBITMAP tmp = LoadBitmapW(hinst_global, MAKEINTRESOURCE(IDB_TILE_IMAGE));
|
||||||
|
if (tmp)
|
||||||
|
{
|
||||||
|
*bmp = tmp; /* The caller takes ownership of this memory */
|
||||||
|
dmsg(L"Returning a bitmap for PLAP tile %lu", field);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hr = HRESULT_FROM_WIN32(GetLastError());
|
||||||
|
dmsg(L"LoadBitmap failed with error = 0x%08x", hr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hr = E_INVALIDARG;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#define IDB_TILE_IMAGE 101
|
Binary file not shown.
After Width: | Height: | Size: 108 KiB |
Loading…
Reference in New Issue