So I don't know why I keep getting this error. Here's the relevant code:
//////////////////////// In resource.h ///////////////////////////
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Freestyle.rc
//
#define IDB_BITMAP1 101
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
//////////////////////// In the resource file ////////////////////
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
.
.
.
/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//
IDB_BITMAP1 BITMAP "NOP.bmp"
//////////////////////// In DllMain: /////////////////////////////
// Save the global module we're attached to other files can access it.
g_hLocalModule = hModule;
UnsafePrintToLog(SIMPLE_FORMAT_STRING, "Starting session...");
// Display the splash screen.
CSplash splashScreen(IDB_BITMAP1);
//////////////In CSplash::CSplash(WORD resourceID) //////////////
BitmapSplash = LoadBitmap((HINSTANCE)g_hLocalModule, MAKEINTRESOURCE(resourceID));
if(BitmapSplash == NULL)
{
volatile int temp = GetLastError();
Exit("Could not load the splash screen bitmap.");
}