This runs fine in that the red dot is drawn at (10, 10) but it's slooooow. As it is loaded up you can see it appearing in the start bar really slowly and if I move the window it leaves copies all over the place.

Code:
#include <SDL/SDL.h>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>

bool SDLInitialise();
void RenderFrame();
void DrawPixel(int x, int y, unsigned int color);

SDL_Surface *sdlsBackBuffer = NULL;
unsigned int *BBWrite = NULL;

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
    SDL_Event sdlEvent;
    bool bDone = false;

    SDLInitialise();

    while (! bDone)
    {
        RenderFrame();

        while (SDL_PollEvent(&sdlEvent))
        {
            switch (sdlEvent.type)
            {
            case SDL_KEYUP:
                if (sdlEvent.key.keysym.sym == SDLK_ESCAPE)
                    bDone = true;

            case SDL_QUIT:
                bDone = true;
            }
        }
    }

    return 0;
}

// SDLInitialise
//
bool SDLInitialise()
{
    if (SDL_Init(SDL_INIT_VIDEO) != 0)
        return false;

    atexit(SDL_Quit);

    sdlsBackBuffer = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE);
    if (sdlsBackBuffer == NULL)
        return false;

    BBWrite = static_cast<unsigned int *> (sdlsBackBuffer->pixels);
    return true;
}

// RenderFrame
//
void RenderFrame()
{
    if (SDL_MUSTLOCK(sdlsBackBuffer))
        if (SDL_LockSurface(sdlsBackBuffer) < 0)
            return;

    DrawPixel(10, 10, 0xff0000);

    if (SDL_MUSTLOCK(sdlsBackBuffer))
        SDL_UnlockSurface(sdlsBackBuffer);
    SDL_UpdateRect(sdlsBackBuffer, 0, 0, 800, 600);
}

// DrawPixel
//
void DrawPixel(int x, int y, unsigned int color)
{
    unsigned ofs = y * (sdlsBackBuffer->pitch / 4);
    *(BBWrite + ofs + x) = color;
}
Is there anything drastically wrong here or does it always do this?