# how to use vtk in a mfc dll

**URL:** https://discourse.vtk.org/t/how-to-use-vtk-in-a-mfc-dll/1201
**Category:** Support
**Created:** [June 24, 2019, 8:09am UTC](https://discourse.vtk.org/t/how-to-use-vtk-in-a-mfc-dll/1201 "2019-06-24T08:09:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pingdan](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/p/22d042/32.png) [@pingdan](https://discourse.vtk.org/u/pingdan)
#### Post date: [June 24, 2019, 8:09am UTC](https://discourse.vtk.org/t/how-to-use-vtk-in-a-mfc-dll/1201/1 "2019-06-24T08:09:08Z")

</div>

with vs2013, vtk8.1, I create a mfc dll with a mfc dialog, in this dialog, there is a static control which is parent of vtkrenderwindow.The dialog create as a modaless dialog,when the main exe load the dll,it will create the modaless dialog,or close the modaless dialog,when the main exe send close the modaless dialog command,vs2013 will show error : vtkRenderingCore-8.1.dll occur conflict ,and at the same time,vs2013 will go to vtkTextRender::SetInstance() function and point to the line vtkTextRenderer::Instance-\>Delete()

the question is very important, I wish someone can help me to solve the question.
