Initial commit: ROW Client source code
Game client codebase including: - CharacterActionControl: Character and creature management - GlobalScript: Network, items, skills, quests, utilities - RYLClient: Main client application with GUI and event handlers - Engine: 3D rendering engine (RYLGL) - MemoryManager: Custom memory allocation - Library: Third-party dependencies (DirectX, boost, etc.) - Tools: Development utilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -0,0 +1,555 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// File: FullScreenDialog.cpp
|
||||
//
|
||||
// Desc: This sample demonstrates how to bring up a dialog box, or any other
|
||||
// type of window while running in DirectDraw full-screen exclusive mode.
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//-----------------------------------------------------------------------------
|
||||
#define STRICT
|
||||
#include <windows.h>
|
||||
#include <basetsd.h>
|
||||
#include <ddraw.h>
|
||||
#include <mmsystem.h>
|
||||
#include "resource.h"
|
||||
#include "ddutil.h"
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Defines, constants, and global variables
|
||||
//-----------------------------------------------------------------------------
|
||||
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
|
||||
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
|
||||
|
||||
#define SCREEN_WIDTH 640
|
||||
#define SCREEN_HEIGHT 480
|
||||
#define SCREEN_BPP 16
|
||||
|
||||
#define SPRITE_DIAMETER 48
|
||||
#define NUM_SPRITES 25
|
||||
|
||||
#define HELPTEXT TEXT("Press Escape to quit. Press F1 to bring up the dialog.")
|
||||
|
||||
struct SPRITE_STRUCT
|
||||
{
|
||||
FLOAT fPosX;
|
||||
FLOAT fPosY;
|
||||
FLOAT fVelX;
|
||||
FLOAT fVelY;
|
||||
};
|
||||
|
||||
CDisplay* g_pDisplay = NULL;
|
||||
CSurface* g_pLogoSurface = NULL;
|
||||
CSurface* g_pTextSurface = NULL;
|
||||
BOOL g_bActive = FALSE;
|
||||
DWORD g_dwLastTick;
|
||||
SPRITE_STRUCT g_Sprite[NUM_SPRITES];
|
||||
HWND g_hWndDlg = NULL;
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Function-prototypes
|
||||
//-----------------------------------------------------------------------------
|
||||
LRESULT CALLBACK MainWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
INT_PTR CALLBACK SampleDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
HRESULT WinInit( HINSTANCE hInst, int nCmdShow, HWND* phWnd, HACCEL* phAccel );
|
||||
HRESULT InitDirectDraw( HWND hWnd );
|
||||
VOID FreeDirectDraw();
|
||||
HRESULT ProcessNextFrame();
|
||||
VOID UpdateSprite( SPRITE_STRUCT* pSprite, FLOAT fTimeDelta );
|
||||
HRESULT DisplayFrame();
|
||||
HRESULT RestoreSurfaces();
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: WinMain()
|
||||
// Desc: Entry point to the program. Initializes everything and calls
|
||||
// UpdateFrame() when idle from the message pump.
|
||||
//-----------------------------------------------------------------------------
|
||||
int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR pCmdLine, int nCmdShow )
|
||||
{
|
||||
MSG msg;
|
||||
HWND hWnd;
|
||||
HACCEL hAccel;
|
||||
|
||||
ZeroMemory( &g_Sprite, sizeof(SPRITE_STRUCT) * NUM_SPRITES );
|
||||
srand( GetTickCount() );
|
||||
|
||||
if( FAILED( WinInit( hInst, nCmdShow, &hWnd, &hAccel ) ) )
|
||||
return FALSE;
|
||||
|
||||
if( FAILED( InitDirectDraw( hWnd ) ) )
|
||||
{
|
||||
MessageBox( hWnd, TEXT("DirectDraw init failed. ")
|
||||
TEXT("The sample will now exit. "), TEXT("DirectDraw Sample"),
|
||||
MB_ICONERROR | MB_OK );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Show the dialog immediately
|
||||
g_hWndDlg = CreateDialog( hInst, MAKEINTRESOURCE(IDD_DIALOG_SAMPLE),
|
||||
hWnd, (DLGPROC) SampleDlgProc );
|
||||
ShowWindow( g_hWndDlg, SW_SHOWNORMAL );
|
||||
|
||||
g_dwLastTick = timeGetTime();
|
||||
|
||||
while( TRUE )
|
||||
{
|
||||
// Look for messages, if none are found then
|
||||
// update the state and display it
|
||||
if( PeekMessage( &msg, NULL, 0, 0, PM_NOREMOVE ) )
|
||||
{
|
||||
if( 0 == GetMessage(&msg, NULL, 0, 0 ) )
|
||||
{
|
||||
// WM_QUIT was posted, so exit
|
||||
return (int)msg.wParam;
|
||||
}
|
||||
|
||||
// Translate and dispatch the message. If the dialog is showing,
|
||||
// translate messages for it since it's a modeless dialog.
|
||||
if( g_hWndDlg == NULL || !IsDialogMessage( g_hWndDlg, &msg ) )
|
||||
{
|
||||
if( 0 == TranslateAccelerator( hWnd, hAccel, &msg ) )
|
||||
{
|
||||
TranslateMessage( &msg );
|
||||
DispatchMessage( &msg );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( g_bActive )
|
||||
{
|
||||
// Move the sprites, blt them to the back buffer, then
|
||||
// flip or blt the back buffer to the primary buffer
|
||||
if( FAILED( ProcessNextFrame() ) )
|
||||
{
|
||||
SAFE_DELETE( g_pDisplay );
|
||||
|
||||
MessageBox( hWnd, TEXT("Displaying the next frame failed. ")
|
||||
TEXT("The sample will now exit. "), TEXT("DirectDraw Sample"),
|
||||
MB_ICONERROR | MB_OK );
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure we go to sleep if we have nothing else to do
|
||||
WaitMessage();
|
||||
|
||||
// Ignore time spent inactive
|
||||
g_dwLastTick = timeGetTime();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: WinInit()
|
||||
// Desc: Init the window
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT WinInit( HINSTANCE hInst, int nCmdShow, HWND* phWnd, HACCEL* phAccel )
|
||||
{
|
||||
WNDCLASS wc;
|
||||
HWND hWnd;
|
||||
HACCEL hAccel;
|
||||
|
||||
// Register the Window Class
|
||||
wc.lpszClassName = TEXT("FullScreenDialog");
|
||||
wc.lpfnWndProc = MainWndProc;
|
||||
wc.style = CS_VREDRAW | CS_HREDRAW;
|
||||
wc.hInstance = hInst;
|
||||
wc.hIcon = LoadIcon( hInst, MAKEINTRESOURCE(IDI_MAIN) );
|
||||
wc.hCursor = LoadCursor( NULL, IDC_ARROW );
|
||||
wc.hbrBackground = (HBRUSH) (COLOR_WINDOW + 1);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
|
||||
if( RegisterClass( &wc ) == 0 )
|
||||
return E_FAIL;
|
||||
|
||||
// Load keyboard accelerators
|
||||
hAccel = LoadAccelerators( hInst, MAKEINTRESOURCE(IDR_MAIN_ACCEL) );
|
||||
|
||||
// Create and show the main window
|
||||
hWnd = CreateWindowEx( 0, TEXT("FullScreenDialog"), TEXT("DirectDraw FullScreenDialog Sample"),
|
||||
WS_POPUP, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||
CW_USEDEFAULT, CW_USEDEFAULT, NULL, NULL, hInst, NULL );
|
||||
if( hWnd == NULL )
|
||||
return E_FAIL;
|
||||
|
||||
ShowWindow( hWnd, nCmdShow );
|
||||
UpdateWindow( hWnd );
|
||||
|
||||
*phWnd = hWnd;
|
||||
*phAccel = hAccel;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: InitDirectDraw()
|
||||
// Desc: Create the DirectDraw object, and init the surfaces
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT InitDirectDraw( HWND hWnd )
|
||||
{
|
||||
HRESULT hr;
|
||||
int iSprite;
|
||||
|
||||
g_pDisplay = new CDisplay();
|
||||
if( FAILED( hr = g_pDisplay->CreateFullScreenDisplay( hWnd, SCREEN_WIDTH,
|
||||
SCREEN_HEIGHT, SCREEN_BPP ) ) )
|
||||
{
|
||||
MessageBox( hWnd, TEXT("This display card does not support 640x480x8. "),
|
||||
TEXT("DirectDraw Sample"), MB_ICONERROR | MB_OK );
|
||||
return hr;
|
||||
}
|
||||
|
||||
// Check if the device supports DDCAPS2_CANRENDERWINDOWED.
|
||||
// If it does, then it supports GDI writing directly to the primary surface
|
||||
// Otherwise, to do GDI displaying on these cards, you you must create a
|
||||
// bitmap of the GDI window and BitBlt the bitmap to the backbuffer
|
||||
// then flip as normal. However, this sample does not show this.
|
||||
DDCAPS ddcaps;
|
||||
ZeroMemory( &ddcaps, sizeof(ddcaps) );
|
||||
ddcaps.dwSize = sizeof(ddcaps);
|
||||
g_pDisplay->GetDirectDraw()->GetCaps( &ddcaps, NULL );
|
||||
if( (ddcaps.dwCaps2 & DDCAPS2_CANRENDERWINDOWED) == 0 )
|
||||
{
|
||||
MessageBox( hWnd, TEXT("This display card can not render GDI."),
|
||||
TEXT("DirectDraw Sample"), MB_ICONERROR | MB_OK );
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
// Create a clipper so DirectDraw will not blt over the GDI dialog
|
||||
if( FAILED( hr = g_pDisplay->InitClipper() ) )
|
||||
return hr;
|
||||
|
||||
// Create a surface, and draw text to it.
|
||||
if( FAILED( hr = g_pDisplay->CreateSurfaceFromText( &g_pTextSurface, NULL, HELPTEXT,
|
||||
RGB(0,0,0), RGB(255, 255, 0) ) ) )
|
||||
return hr;
|
||||
|
||||
// Create a surface, and draw a bitmap resource on it.
|
||||
if( FAILED( hr = g_pDisplay->CreateSurfaceFromBitmap( &g_pLogoSurface, MAKEINTRESOURCE( IDB_DIRECTX ),
|
||||
SPRITE_DIAMETER, SPRITE_DIAMETER ) ) )
|
||||
return hr;
|
||||
|
||||
// Set the color key for the logo sprite to black
|
||||
if( FAILED( hr = g_pLogoSurface->SetColorKey( 0 ) ) )
|
||||
return hr;
|
||||
|
||||
// Init all the sprites. All of these sprites look the same,
|
||||
// using the g_pDDSLogo surface.
|
||||
for( iSprite = 0; iSprite < NUM_SPRITES; iSprite++ )
|
||||
{
|
||||
// Set the sprite's position and velocity
|
||||
g_Sprite[iSprite].fPosX = (float) (rand() % SCREEN_WIDTH);
|
||||
g_Sprite[iSprite].fPosY = (float) (rand() % SCREEN_HEIGHT);
|
||||
|
||||
g_Sprite[iSprite].fVelX = 500.0f * rand() / RAND_MAX - 250.0f;
|
||||
g_Sprite[iSprite].fVelY = 500.0f * rand() / RAND_MAX - 250.0f;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: FreeDirectDraw()
|
||||
// Desc: Release all the DirectDraw objects
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID FreeDirectDraw()
|
||||
{
|
||||
SAFE_DELETE( g_pLogoSurface );
|
||||
SAFE_DELETE( g_pTextSurface );
|
||||
SAFE_DELETE( g_pDisplay );
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: MainWndProc()
|
||||
// Desc: The main window procedure
|
||||
//-----------------------------------------------------------------------------
|
||||
LRESULT CALLBACK MainWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
switch (msg)
|
||||
{
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD(wParam) )
|
||||
{
|
||||
case IDM_EXIT:
|
||||
// Received key/menu command to exit app
|
||||
PostMessage( hWnd, WM_CLOSE, 0, 0 );
|
||||
return 0L;
|
||||
|
||||
case IDM_SHOW_DIALOG:
|
||||
{
|
||||
HINSTANCE hInst;
|
||||
#ifdef _WIN64
|
||||
hInst = (HINSTANCE) GetWindowLongPtr( hWnd, GWLP_HINSTANCE );
|
||||
#else
|
||||
hInst = (HINSTANCE) GetWindowLong( hWnd, GWL_HINSTANCE );
|
||||
#endif
|
||||
g_hWndDlg = CreateDialog( hInst, MAKEINTRESOURCE(IDD_DIALOG_SAMPLE),
|
||||
hWnd, (DLGPROC) SampleDlgProc );
|
||||
ShowWindow( g_hWndDlg, SW_SHOWNORMAL );
|
||||
}
|
||||
break;
|
||||
}
|
||||
break; // Continue with default processing
|
||||
|
||||
case WM_SIZE:
|
||||
// Check to see if we are losing our window...
|
||||
if( SIZE_MAXHIDE==wParam || SIZE_MINIMIZED==wParam )
|
||||
g_bActive = FALSE;
|
||||
else
|
||||
g_bActive = TRUE;
|
||||
break;
|
||||
|
||||
case WM_EXITMENULOOP:
|
||||
// Ignore time spent in menu
|
||||
g_dwLastTick = timeGetTime();
|
||||
break;
|
||||
|
||||
case WM_EXITSIZEMOVE:
|
||||
// Ignore time spent resizing
|
||||
g_dwLastTick = timeGetTime();
|
||||
break;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
// Prevent moving/sizing and power loss in fullscreen mode
|
||||
switch( wParam )
|
||||
{
|
||||
case SC_MOVE:
|
||||
case SC_SIZE:
|
||||
case SC_MAXIMIZE:
|
||||
case SC_MONITORPOWER:
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
// Cleanup and close the app
|
||||
FreeDirectDraw();
|
||||
PostQuitMessage( 0 );
|
||||
return 0L;
|
||||
}
|
||||
|
||||
return DefWindowProc(hWnd, msg, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: SampleDlgProc()
|
||||
// Desc: A simple dialog that has some standard controls, so you can see that
|
||||
// they update properly.
|
||||
//-----------------------------------------------------------------------------
|
||||
INT_PTR CALLBACK SampleDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
static TCHAR* pszCombo[] = {"One","Two","Three","Four","Five","Six"};
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case WM_INITDIALOG:
|
||||
{
|
||||
for( int i = 0; i < 6; i++ )
|
||||
SendDlgItemMessage( hDlg, IDC_COMBO1, CB_ADDSTRING,
|
||||
0, (LPARAM) pszCombo[i] );
|
||||
|
||||
SendDlgItemMessage( hDlg, IDC_COMBO1, CB_SETCURSEL, 0, 0 );
|
||||
CheckDlgButton( hDlg, IDC_RADIO1, BST_CHECKED );
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case WM_COMMAND:
|
||||
switch( LOWORD(wParam) )
|
||||
{
|
||||
case IDCANCEL:
|
||||
case IDOK:
|
||||
EndDialog( hDlg, TRUE );
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_MOVE:
|
||||
// The window is moving around, so re-draw the backbuffer
|
||||
DisplayFrame();
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
g_hWndDlg = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: ProcessNextFrame()
|
||||
// Desc: Move the sprites, blt them to the back buffer, then
|
||||
// flips the back buffer to the primary buffer
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT ProcessNextFrame()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// Figure how much time has passed since the last time
|
||||
DWORD dwCurrTick = timeGetTime();
|
||||
DWORD dwTickDiff = dwCurrTick - g_dwLastTick;
|
||||
|
||||
// Don't update if no time has passed
|
||||
if( dwTickDiff == 0 )
|
||||
return S_OK;
|
||||
|
||||
g_dwLastTick = dwCurrTick;
|
||||
|
||||
// Move the sprites according to how much time has passed
|
||||
for( int iSprite = 0; iSprite < NUM_SPRITES; iSprite++ )
|
||||
UpdateSprite( &g_Sprite[ iSprite ], dwTickDiff / 1000.0f );
|
||||
|
||||
// Display the sprites on the screen
|
||||
if( FAILED( hr = DisplayFrame() ) )
|
||||
{
|
||||
if( hr != DDERR_SURFACELOST )
|
||||
return hr;
|
||||
|
||||
// The surfaces were lost so restore them
|
||||
RestoreSurfaces();
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: UpdateSprite()
|
||||
// Desc: Move the sprite around and make it bounce based on how much time
|
||||
// has passed
|
||||
//-----------------------------------------------------------------------------
|
||||
VOID UpdateSprite( SPRITE_STRUCT* pSprite, FLOAT fTimeDelta )
|
||||
{
|
||||
// Update the sprite position
|
||||
pSprite->fPosX += pSprite->fVelX * fTimeDelta;
|
||||
pSprite->fPosY += pSprite->fVelY * fTimeDelta;
|
||||
|
||||
// Clip the position, and bounce if it hits the edge
|
||||
if( pSprite->fPosX < 0.0f )
|
||||
{
|
||||
pSprite->fPosX = 0;
|
||||
pSprite->fVelX = -pSprite->fVelX;
|
||||
}
|
||||
|
||||
if( pSprite->fPosX >= SCREEN_WIDTH - SPRITE_DIAMETER )
|
||||
{
|
||||
pSprite->fPosX = SCREEN_WIDTH - 1 - SPRITE_DIAMETER;
|
||||
pSprite->fVelX = -pSprite->fVelX;
|
||||
}
|
||||
|
||||
if( pSprite->fPosY < 0 )
|
||||
{
|
||||
pSprite->fPosY = 0;
|
||||
pSprite->fVelY = -pSprite->fVelY;
|
||||
}
|
||||
|
||||
if( pSprite->fPosY > SCREEN_HEIGHT - SPRITE_DIAMETER )
|
||||
{
|
||||
pSprite->fPosY = SCREEN_HEIGHT - 1 - SPRITE_DIAMETER;
|
||||
pSprite->fVelY = -pSprite->fVelY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: DisplayFrame()
|
||||
// Desc: Blts a the sprites to the back buffer, then flips the
|
||||
// back buffer onto the primary buffer.
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT DisplayFrame()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
// Fill the back buffer with black, ignoring errors until the flip
|
||||
g_pDisplay->Clear( 0 );
|
||||
|
||||
// Blt the help text on the backbuffer, ignoring errors until the flip
|
||||
g_pDisplay->Blt( 10, 10, g_pTextSurface, NULL );
|
||||
|
||||
// Blt all the sprites onto the back buffer using color keying,
|
||||
// ignoring errors until the last call. Note that all of these sprites
|
||||
// use the same DirectDraw surface.
|
||||
for( int iSprite = 0; iSprite < NUM_SPRITES; iSprite++ )
|
||||
{
|
||||
g_pDisplay->Blt( (DWORD)g_Sprite[iSprite].fPosX,
|
||||
(DWORD)g_Sprite[iSprite].fPosY,
|
||||
g_pLogoSurface, NULL );
|
||||
}
|
||||
|
||||
// Updating the primary buffer with a blt
|
||||
LPDIRECTDRAWSURFACE7 pddsFrontBuffer = g_pDisplay->GetFrontBuffer();
|
||||
LPDIRECTDRAWSURFACE7 pddsBackBuffer = g_pDisplay->GetBackBuffer();
|
||||
|
||||
if( FAILED( hr = pddsFrontBuffer->Blt( NULL, pddsBackBuffer, NULL,
|
||||
DDBLT_WAIT, NULL ) ) )
|
||||
return hr;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Name: RestoreSurfaces()
|
||||
// Desc: Restore all the surfaces, and redraw the sprite surfaces.
|
||||
//-----------------------------------------------------------------------------
|
||||
HRESULT RestoreSurfaces()
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
if( FAILED( hr = g_pDisplay->GetDirectDraw()->RestoreAllSurfaces() ) )
|
||||
return hr;
|
||||
|
||||
// No need to re-create the surface, just re-draw it.
|
||||
if( FAILED( hr = g_pTextSurface->DrawText( NULL, HELPTEXT,
|
||||
0, 0, RGB(0,0,0), RGB(255, 255, 0) ) ) )
|
||||
return hr;
|
||||
|
||||
// No need to re-create the surface, just re-draw it.
|
||||
if( FAILED( hr = g_pLogoSurface->DrawBitmap( MAKEINTRESOURCE( IDB_DIRECTX ),
|
||||
SPRITE_DIAMETER, SPRITE_DIAMETER ) ) )
|
||||
return hr;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
# Microsoft Developer Studio Project File - Name="FullScreenDialog" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=FullScreenDialog - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fullscreendialog.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fullscreendialog.mak" CFG="FullScreenDialog - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "FullScreenDialog - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "FullScreenDialog - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "FullScreenDialog - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir ".\Release"
|
||||
# PROP BASE Intermediate_Dir ".\Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir ".\Release"
|
||||
# PROP Intermediate_Dir ".\Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 winmm.lib dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ELSEIF "$(CFG)" == "FullScreenDialog - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir ".\Debug"
|
||||
# PROP BASE Intermediate_Dir ".\Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir ".\Debug"
|
||||
# PROP Intermediate_Dir ".\Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c
|
||||
# ADD CPP /nologo /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 winmm.lib dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /debug /machine:I386 /stack:0x200000,0x200000
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "FullScreenDialog - Win32 Release"
|
||||
# Name "FullScreenDialog - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FullScreenDialog.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\directx.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\DirectX.ico
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\FullScreenDialog.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\resource.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Common"
|
||||
|
||||
# PROP Default_Filter ""
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\ddutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\ddutil.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\..\common\include\dxutil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\readme.txt
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
@@ -0,0 +1,29 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 6.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "FullScreenDialog"=.\fullscreendialog.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
# Microsoft Developer Studio Generated NMAKE File, Based on fullscreendialog.dsp
|
||||
!IF "$(CFG)" == ""
|
||||
CFG=FullScreenDialog - Win32 Release
|
||||
!MESSAGE No configuration specified. Defaulting to FullScreenDialog - Win32 Release.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" != "FullScreenDialog - Win32 Release" && "$(CFG)" != "FullScreenDialog - Win32 Debug"
|
||||
!MESSAGE Invalid configuration "$(CFG)" specified.
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "fullscreendialog.mak" CFG="FullScreenDialog - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "FullScreenDialog - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "FullScreenDialog - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
!ERROR An invalid configuration is specified.
|
||||
!ENDIF
|
||||
|
||||
!IF "$(OS)" == "Windows_NT"
|
||||
NULL=
|
||||
!ELSE
|
||||
NULL=nul
|
||||
!ENDIF
|
||||
|
||||
!IF "$(CFG)" == "FullScreenDialog - Win32 Release"
|
||||
|
||||
OUTDIR=.\Release
|
||||
INTDIR=.\Release
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Release
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\fullscreendialog.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\ddutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\FullScreenDialog.obj"
|
||||
-@erase "$(INTDIR)\FullScreenDialog.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(OUTDIR)\fullscreendialog.exe"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\..\common\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\fullscreendialog.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\FullScreenDialog.res" /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\fullscreendialog.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=winmm.lib dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /incremental:no /pdb:"$(OUTDIR)\fullscreendialog.pdb" /machine:I386 /out:"$(OUTDIR)\fullscreendialog.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\FullScreenDialog.obj" \
|
||||
"$(INTDIR)\ddutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\FullScreenDialog.res"
|
||||
|
||||
"$(OUTDIR)\fullscreendialog.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ELSEIF "$(CFG)" == "FullScreenDialog - Win32 Debug"
|
||||
|
||||
OUTDIR=.\Debug
|
||||
INTDIR=.\Debug
|
||||
# Begin Custom Macros
|
||||
OutDir=.\Debug
|
||||
# End Custom Macros
|
||||
|
||||
ALL : "$(OUTDIR)\fullscreendialog.exe"
|
||||
|
||||
|
||||
CLEAN :
|
||||
-@erase "$(INTDIR)\ddutil.obj"
|
||||
-@erase "$(INTDIR)\dxutil.obj"
|
||||
-@erase "$(INTDIR)\FullScreenDialog.obj"
|
||||
-@erase "$(INTDIR)\FullScreenDialog.res"
|
||||
-@erase "$(INTDIR)\vc60.idb"
|
||||
-@erase "$(INTDIR)\vc60.pdb"
|
||||
-@erase "$(OUTDIR)\fullscreendialog.exe"
|
||||
-@erase "$(OUTDIR)\fullscreendialog.ilk"
|
||||
-@erase "$(OUTDIR)\fullscreendialog.pdb"
|
||||
|
||||
"$(OUTDIR)" :
|
||||
if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
|
||||
|
||||
CPP=cl.exe
|
||||
CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Od /I "..\..\common\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\fullscreendialog.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
|
||||
|
||||
.c{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.obj::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.c{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cpp{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
.cxx{$(INTDIR)}.sbr::
|
||||
$(CPP) @<<
|
||||
$(CPP_PROJ) $<
|
||||
<<
|
||||
|
||||
MTL=midl.exe
|
||||
MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
RSC=rc.exe
|
||||
RSC_PROJ=/l 0x409 /fo"$(INTDIR)\FullScreenDialog.res" /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
BSC32_FLAGS=/nologo /o"$(OUTDIR)\fullscreendialog.bsc"
|
||||
BSC32_SBRS= \
|
||||
|
||||
LINK32=link.exe
|
||||
LINK32_FLAGS=winmm.lib dxguid.lib dxerr8.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /incremental:yes /pdb:"$(OUTDIR)\fullscreendialog.pdb" /debug /machine:I386 /out:"$(OUTDIR)\fullscreendialog.exe" /stack:0x200000,0x200000
|
||||
LINK32_OBJS= \
|
||||
"$(INTDIR)\FullScreenDialog.obj" \
|
||||
"$(INTDIR)\ddutil.obj" \
|
||||
"$(INTDIR)\dxutil.obj" \
|
||||
"$(INTDIR)\FullScreenDialog.res"
|
||||
|
||||
"$(OUTDIR)\fullscreendialog.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
|
||||
$(LINK32) @<<
|
||||
$(LINK32_FLAGS) $(LINK32_OBJS)
|
||||
<<
|
||||
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(NO_EXTERNAL_DEPS)" != "1"
|
||||
!IF EXISTS("fullscreendialog.dep")
|
||||
!INCLUDE "fullscreendialog.dep"
|
||||
!ELSE
|
||||
!MESSAGE Warning: cannot find "fullscreendialog.dep"
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
|
||||
!IF "$(CFG)" == "FullScreenDialog - Win32 Release" || "$(CFG)" == "FullScreenDialog - Win32 Debug"
|
||||
SOURCE=.\FullScreenDialog.cpp
|
||||
|
||||
"$(INTDIR)\FullScreenDialog.obj" : $(SOURCE) "$(INTDIR)"
|
||||
|
||||
|
||||
SOURCE=.\FullScreenDialog.rc
|
||||
|
||||
"$(INTDIR)\FullScreenDialog.res" : $(SOURCE) "$(INTDIR)"
|
||||
$(RSC) $(RSC_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\ddutil.cpp
|
||||
|
||||
"$(INTDIR)\ddutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
SOURCE=..\..\common\src\dxutil.cpp
|
||||
|
||||
"$(INTDIR)\dxutil.obj" : $(SOURCE) "$(INTDIR)"
|
||||
$(CPP) $(CPP_PROJ) $(SOURCE)
|
||||
|
||||
|
||||
|
||||
!ENDIF
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
//Microsoft Developer Studio generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include <windows.h>
|
||||
#include <afxres.h>
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (U.S.) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
#endif //_WIN32
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDI_MAIN ICON DISCARDABLE "DirectX.ico"
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"#include <windows.h>\r\n"
|
||||
"#include <afxres.h>\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE DISCARDABLE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accelerator
|
||||
//
|
||||
|
||||
IDR_MAIN_ACCEL ACCELERATORS DISCARDABLE
|
||||
BEGIN
|
||||
VK_ESCAPE, IDM_EXIT, VIRTKEY, NOINVERT
|
||||
VK_F1, IDM_SHOW_DIALOG, VIRTKEY, NOINVERT
|
||||
"X", IDM_EXIT, VIRTKEY, ALT, NOINVERT
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Bitmap
|
||||
//
|
||||
|
||||
IDB_DIRECTX BITMAP DISCARDABLE "directx.bmp"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_DIALOG_SAMPLE DIALOG DISCARDABLE 0, 0, 165, 145
|
||||
STYLE DS_MODALFRAME | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Sample Dialog"
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,51,124,50,14
|
||||
PUSHBUTTON "Cancel",IDCANCEL,108,124,50,14
|
||||
CONTROL "Radio 1",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,15,50,
|
||||
40,10
|
||||
CONTROL "Radio 2",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,15,65,
|
||||
40,10
|
||||
CONTROL "Radio 3",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,15,80,
|
||||
40,10
|
||||
LTEXT "This dialog has a few types of controls to show that everything can work on a non-GDI display as it does with a GDI based display.",
|
||||
IDC_STATIC,5,5,160,25
|
||||
EDITTEXT IDC_EDIT1,5,105,155,14,ES_AUTOHSCROLL
|
||||
COMBOBOX IDC_COMBO1,110,40,50,60,CBS_DROPDOWN | WS_VSCROLL |
|
||||
WS_TABSTOP
|
||||
GROUPBOX "A Group of Radio Buttons",IDC_STATIC,5,35,100,65
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO DISCARDABLE
|
||||
BEGIN
|
||||
IDD_DIALOG_SAMPLE, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 158
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 138
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (U.S.) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Sample Name: FullScreenDialog Sample
|
||||
//
|
||||
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
Description
|
||||
===========
|
||||
FullScreenDialog demonstrates how to display a GDI dialog while using DirectDraw
|
||||
in full-screen exclusive mode.
|
||||
|
||||
Path
|
||||
====
|
||||
Source: DXSDK\Samples\Multimedia\DDraw\FullScreenDialog
|
||||
|
||||
Executable: DXSDK\Samples\Multimedia\DDraw\Bin
|
||||
|
||||
User's Guide
|
||||
============
|
||||
FullScreenDialog requires no user input. Press the ESC key to quit the program.
|
||||
|
||||
Programming Notes
|
||||
=================
|
||||
For details on how to setup a full-screen DirectDraw app, see the FullScreenMode
|
||||
sample.
|
||||
|
||||
If the display device supports DDCAPS2_CANRENDERWINDOWED then to make GDI write to
|
||||
a DirectDraw surface, call IDirectDraw::FlipToGDISurface, then create a clipper object
|
||||
which GDI uses when drawing. To display a dialog, then simply create and show it
|
||||
as normal.
|
||||
|
||||
If the display device does not support DDCAPS2_CANRENDERWINDOWED (some secondary
|
||||
graphics cards are like this) then the card does not support FlipToGDISurface.
|
||||
So it is necessary instead to have GDI make a bitmap of the dialog to be drawn,
|
||||
then blt this bitmap to the back buffer. However, this sample does not show how to
|
||||
do this technique,
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Developer Studio generated include file.
|
||||
// Used by FullScreenDialog.rc
|
||||
//
|
||||
#define IDI_MAIN 101
|
||||
#define IDR_MAIN_ACCEL 103
|
||||
#define IDD_DIALOG_SAMPLE 106
|
||||
#define IDB_DIRECTX 107
|
||||
#define IDM_EXIT 1001
|
||||
#define IDC_RADIO1 1003
|
||||
#define IDC_RADIO2 1004
|
||||
#define IDC_RADIO3 1005
|
||||
#define IDC_EDIT1 1006
|
||||
#define IDC_COMBO1 1007
|
||||
#define IDM_SHOW_DIALOG 40001
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NO_MFC 1
|
||||
#define _APS_NEXT_RESOURCE_VALUE 108
|
||||
#define _APS_NEXT_COMMAND_VALUE 40002
|
||||
#define _APS_NEXT_CONTROL_VALUE 1003
|
||||
#define _APS_NEXT_SYMED_VALUE 104
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user