   DirectX 9.0 Fullscreen Problem
  Here is a party of my program for init direct3d:bool CDisplay::InitD3D(HWND hWnd){D3DDISPLAYMODEd3ddm;D3DPRESENT_PARAMETERS   d3dpp;if ((m_d3d = Direct3DCreate9(D3D_SDK_VERSION)) == NULL)return false;//m_d3d->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm );d3ddm.Width = 800;d3ddm.Height = 600;d3ddm.RefreshRate = 0;    d3ddm.Format = D3DFMT_A8R8G8B8;    ZeroMemory(&d3dpp, sizeof(D3DPRESENT_PARAMETERS));    d3dpp.Windowed = FALSE;    d3dpp.BackBufferWidth  = d3ddm.Width;    d3dpp.BackBufferHeight = d3ddm.Height;    d3dpp.SwapEffect = D3DSWAPEFFECT_FLIP;    d3dpp.FullScreen_RefreshRateInHz = D3DPRESENT_RATE_DEFAULT;    d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;    d3dpp.BackBufferFormat = d3ddm.Format;    if (FAILED(m_d3d->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,   hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING,  &d3dpp, &m_d3dd))){MessageBox(hWnd, "Hello", "Hello", MB_OK); return false;} return true;}I have several questions:1. Is any direct3d progam necessary to call GetDisplayMode()? As my code, I can assign the values of width, height, refreshrate and format in D3DDISPLAYMODE, therfore, shall I need to use GetDisplayMode()?2. In my situation, I am using LCD mode with 1024 X 768 X 32BIT.When I set the width and height is 1024 X 768 or 640 X 480 for dd3dm, it is ok and work, but if I set the 800 X 600, it will show the "System Title Bar" of windows when you start to create the window in winmain, I don''t know why?Pls help me and thx 
  I''m a relative Newbie to DirectX Programming, so you might not want to take my word for it, but I don''t believe that youo need to call GetDisplayMode.  You would use that call if you were making a program in a window, rather than fullscreen.  All that does is gets the current display mode (format, and such) that the computer is using, so that your window can be displayed as well as other running windows, from other programs.  Since you are going into Fullscreen Mode, I dont think that you need to.As to your second question, I have no clue.    ;  As of Direct3D9, you don''t need to set the d3dpp.Format variable. In windowed mode, you just set it to D3DFMT_UNKNOWN and it takes on the current format. And why would u need to get the current desktop resolution? You can just set your own.2) I have no idea. ;  In some case, some game can allow user to choose what resolution for display such as 800X600X16, 1024X768X24, .... and so on.... Therefore, I want to allow my program for display in directX using different resolution. So, in my idea, GetDisplayModel become is no use becuase it just can get the current situation in the resolution of the monitor. Am I correct ? ;  You don''t NEED to call get display mode, however if you plan on giving the program to other users i highly recommend it. It seems you have a fairly advanced computer but not everyone can use the 32-bit format A8R8G8B8, in fact i have to emulate it on mine. And why is the refresh rate set to 0?Why are you using D3DSWAPEFFECT_FLIP instead of D3DSWAPEFFECT_DISCARD 