do you have to use createwindow to create the main directx window? or does the directx api have its own way?

i am starting to look at directx ,
do i have to use createwindow to make the window or does directx api come with its own way to create a window ,,




Answer this question

do you have to use createwindow to create the main directx window? or does the directx api have its own way?

  • Yvon Turcotte

    Pieter Germishuys wrote:
    Yep, You have to create a window and then pass it's handle to the method that will create the device.
    In c++ it will look something like this
    pDirect3d->CreateDevice(...Window->hWnd...)
    In Managed DirectX you pass the handle to the constructor of the device.
    Device device = new Device(... Window.Handle...)

    The reason for this is in the flexibility it provides when you want to render to other controls such as Panels for creating tools and you want to see the effects of it in your engine.

    I hope this helps.
    Take care.

    And for me use WindowsForms, I instance igual Using C++ and Forms, create a window igual And to instance the window at grounpbox How Ido

    Samples please....



  • DOrsborne

    Nope that's correct.



  • Jeff Solomon

    most examples ive seen , use the HWND handle to using createwindow
    is this the woong way


  • skyshock21

    Yep, You have to create a window and then pass it's handle to the method that will create the device.
    In c++ it will look something like this
    pDirect3d->CreateDevice(...Window->hWnd...)
    In Managed DirectX you pass the handle to the constructor of the device.
    Device device = new Device(... Window.Handle...)

    The reason for this is in the flexibility it provides when you want to render to other controls such as Panels for creating tools and you want to see the effects of it in your engine.

    I hope this helps.
    Take care.


  • do you have to use createwindow to create the main directx window? or does the directx api have its own way?