   [D3D] No window appears
  Kay, I'm a newb at DirectX and I'm trying to learn DirectX9 programming. Unfortunately any of my Win32 applications are compiling and running, but nothing shows up./************************************//*  CRYSTAL BOND*//*************  ***********//*  DirectX game built by *//**Glitch Softwares Studios   **//************************************///Include important files#include <windows.h>#include <windowsx.h>#include <d3d9.h>#include "functions.h"//Include Direct3D Library#pragma comment (lib, "d3d9.lib")//Include files specifically for this game#include "functions.h"//Prototype of CALLBACKLRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);// the entry point for any Windows programint WINAPI WinMain(HINSTANCE hInstance,    HINSTANCE hPrevInstance,    LPSTR lpCmdLine,    int nCmdShow){HWND hWnd;WNDCLASSEX wc;//Clear windows for useZeroMemory(&wc, sizeof(WNDCLASSEX));//Build structure with informationwc.cbSize = sizeof(WNDCLASSEX);wc.style = CS_HREDRAW | CS_VREDRAW;wc.lpfnWndProc = WindowProc;    wc.hInstance = hInstance;    wc.hCursor = LoadCursor(NULL, IDC_ARROW);    wc.hbrBackground = (HBRUSH)COLOR_WINDOW;    wc.lpszClassName = L"WindowClass";//Make the Windows ProgramhWnd = CreateWindowEx(NULL,L"WindowClass",//Class nameL"Crystal Bond",//Window CaptionWS_OVERLAPPEDWINDOW,//Style5,//X Start5,//Y Start645,//Width485,//HeightNULL,//Parent WindowNULL,//MenushInstance,//Application handleNULL);//Use with multiple windows//Make window visibleShowWindow(hWnd, nCmdShow);initD3D(hWnd);MSG resp;//Create the structure to communicate the user inputwhile(GetMessage(&resp,NULL,0,0)){TranslateMessage(&resp);//Translate input to machine's languageDispatchMessage(&resp);//Send message to be processed.}return resp.wParam;while(true){// Check to see if any messages are waiting in the queuewhile(PeekMessage(&resp, NULL, 0, 0, PM_REMOVE)){// Translate the message and dispatch it to WindowProc()TranslateMessage(&resp);DispatchMessage(&resp);}// If the message is WM_QUIT, exit the while loopif(resp.message == WM_QUIT)break;renderFrame();}cleanD3D();}LRESULT CALLBACK WindowProc(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam){//Look for what to do at message recievedswitch(message){//Message says: Close the program and windowcase WM_DESTROY:{PostQuitMessage(0);return 0;}break;}//Else, and nothing was supported in SWITCHreturn DefWindowProc(hWnd, message, wParam, lParam);}As I said, I'm new to the DirectX world, don't worry about things like cleanD3D(), as those are declared in one of my headers.Thanks in advanced. It'd be nice to get something of my own to work -_-'   
  You seem to have two message loops, and a return at the end of the first one, and in the first message loop you never call renderFrame() so nothing will be drawn.I wrote a few D3D tutorials myself, This one may be of use to you, and Part 2 is here.   