Click here to Skip to main content
15,892,809 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: How to get HBITMAP from BitMap Pin
Mark Salsbery16-Nov-09 7:53
Mark Salsbery16-Nov-09 7:53 
QuestionCLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory Pin
akira3212-Nov-09 19:10
akira3212-Nov-09 19:10 
AnswerRe: CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory Pin
N a v a n e e t h12-Nov-09 19:53
N a v a n e e t h12-Nov-09 19:53 
AnswerRe: CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory Pin
Mark Salsbery15-Nov-09 5:52
Mark Salsbery15-Nov-09 5:52 
GeneralRe: CLR,How to set RootFolder of FodlerBrowserDialog to be Current Working Directory Pin
akira3216-Nov-09 20:07
akira3216-Nov-09 20:07 
QuestionHow to render DirectX9 on my CLR customed control? Pin
akira3211-Nov-09 4:58
akira3211-Nov-09 4:58 
AnswerRe: How to render DirectX9 on my CLR customed control? Pin
akira3212-Nov-09 7:02
akira3212-Nov-09 7:02 
GeneralRe: How to render DirectX9 on my CLR customed control? Pin
akira3212-Nov-09 7:03
akira3212-Nov-09 7:03 
That is my partial source code:

public ref class PreviewView : public System::Windows::Forms::UserControl
{

LPDIRECT3DDEVICE9 d3ddev;

private: void initD3D(HWND hHandle)
{
d3d = Direct3DCreate9(D3D_SDK_VERSION); // create the Direct3D interface
ZeroMemory(pd3dpp, sizeof(*pd3dpp)); // clear out the struct for use
pd3dpp->Windowed = true; // program windowed, not fullscreen
pd3dpp->SwapEffect = D3DSWAPEFFECT_DISCARD; // discard old frames
pd3dpp->hDeviceWindow = hHandle; // set the window to be used by Direct3D

LPDIRECT3DDEVICE9 d3ddevTmp;

// create a device class using this information and information from the d3dpp stuct
d3d->CreateDevice(D3DADAPTER_DEFAULT,
D3DDEVTYPE_HAL,
hHandle,
D3DCREATE_SOFTWARE_VERTEXPROCESSING,
pd3dpp,
&d3ddevTmp);

d3ddev=d3ddevTmp;
}

When I create device, I must use another variable d3ddevTmp to return the D3DDevice and then set to d3ddev member variable. If I use d3ddev to create device, it will appear the error message as below:

Error 1 error C2664: 'IDirect3D9::CreateDevice' : cannot convert parameter 6 from 'cli::interior_ptr<Type>' to 'IDirect3DDevice9 **' d:\svn\......\PreviewView.h 121

Could somebody tell me how to solve this problem?
GeneralRe: How to render DirectX9 on my CLR customed control? Pin
Lutosław13-Nov-09 7:11
Lutosław13-Nov-09 7:11 
GeneralRe: How to render DirectX9 on my CLR customed control? Pin
akira3216-Nov-09 20:07
akira3216-Nov-09 20:07 
QuestionHow to redirect and log the output of the VC++ console to a file? Pin
santoshkaif5-Nov-09 2:47
santoshkaif5-Nov-09 2:47 
AnswerRe: How to redirect and log the output of the VC++ console to a file? Pin
Richard MacCutchan6-Nov-09 3:44
mveRichard MacCutchan6-Nov-09 3:44 
GeneralRe: How to redirect and log the output of the VC++ console to a file? Pin
santoshkaif7-Nov-09 19:31
santoshkaif7-Nov-09 19:31 
GeneralRe: How to redirect and log the output of the VC++ console to a file? Pin
Richard MacCutchan7-Nov-09 21:17
mveRichard MacCutchan7-Nov-09 21:17 
QuestionHow to test on a pushed button in the leave event of a textfield Pin
cad-JC5-Nov-09 0:03
cad-JC5-Nov-09 0:03 
AnswerRe: How to test on a pushed button in the leave event of a textfield Pin
Luc Pattyn5-Nov-09 0:44
sitebuilderLuc Pattyn5-Nov-09 0:44 
QuestionRe: How to test on a pushed button in the leave event of a textfield [modified] Pin
cad-JC5-Nov-09 1:06
cad-JC5-Nov-09 1:06 
GeneralRe: How to test on a pushed button in the leave event of a textfield Pin
Luc Pattyn5-Nov-09 1:20
sitebuilderLuc Pattyn5-Nov-09 1:20 
QuestionRe: How to test on a pushed button in the leave event of a textfield [modified] Pin
cad-JC5-Nov-09 1:57
cad-JC5-Nov-09 1:57 
AnswerRe: How to test on a pushed button in the leave event of a textfield Pin
Luc Pattyn5-Nov-09 2:20
sitebuilderLuc Pattyn5-Nov-09 2:20 
GeneralRe: How to test on a pushed button in the leave event of a textfield Pin
cad-JC5-Nov-09 2:38
cad-JC5-Nov-09 2:38 
QuestionRe: How to test on a pushed button in the leave event of a textfield Pin
cad-JC8-Nov-09 22:29
cad-JC8-Nov-09 22:29 
QuestionDelegate with a cli::array as a parameter (Error Reentrancy was Detected) [modified] Pin
Greggor014-Nov-09 10:31
Greggor014-Nov-09 10:31 
AnswerRe: Delegate with a cli::array as a parameter (Error Reentrancy was Detected) Pin
Dave Doknjas4-Nov-09 10:58
Dave Doknjas4-Nov-09 10:58 
GeneralRe: Delegate with a cli::array as a parameter (Error Reentrancy was Detected) Pin
Greggor016-Nov-09 2:36
Greggor016-Nov-09 2:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.