# No instance of constructor

**URL:** <https://forums.unrealengine.com/t/no-instance-of-constructor/426636>\
**Category:** Pipeline & Plugins\
**Tags:** style, unreal-engine, editor, Visual-Studio, UE4, question\
**Created:** [June 4, 2018, 9:34am UTC](https://forums.unrealengine.com/t/no-instance-of-constructor/426636 "2018-06-04T09:34:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dazzlesoftware](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dazzlesoftware](https://forums.unrealengine.com/u/dazzlesoftware)\
**Post date:** [June 4, 2018, 9:34am UTC](https://forums.unrealengine.com/t/no-instance-of-constructor/426636/1 "2018-06-04T09:34:06Z")

</div>

Hello I having error with header file that seems to be showing error in visual studio.

The project does compile but the header itself is showing errors that is part of my editor style header

Visual Studio is showing the following error.

```
Severity	Code	Description	Project	File	Line	Suppression State
Error (active)	E0289	no instance of constructor "FSlateImageBrush::FSlateImageBrush" matches the argument list	UnrealPlugins	f:\Unreal Engine 4.19\UnrealPlugins\Plugins\TaskManagement\Source\TaskManagement\Private\TaskManagementEdModeStyles.cpp	41

```

The snippet of the code seems to be causing the error.

```
#define IMAGE_BRUSH( RelativePath, ... ) FSlateImageBrush( RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define BOX_BRUSH( RelativePath, ... ) FSlateBoxBrush( RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define BORDER_BRUSH( RelativePath, ... ) FSlateBorderBrush( RootToContentDir( RelativePath, TEXT(".png") ), __VA_ARGS__ )
#define DEFAULT_FONT(...) FCoreStyle::GetDefaultFontStyle( __VA_ARGS__ )

// This line is the error
	StyleInstance->Set( "LevelEditor.TaskManagementMode", new IMAGE_BRUSH( "Icons/icon_Mode_Foliage_40x", Icon40x40 ) );
	StyleInstance->Set( "LevelEditor.TaskManagementMode.Small", new IMAGE_BRUSH( "Icons/icon_Mode_Foliage_40x", Icon20x20 ) );
	StyleInstance->Set( "LevelEditor.TaskManagementMode.Selected", new IMAGE_BRUSH( "Icons/icon_Mode_Foliage_selected_40x", Icon40x40 ) );
	StyleInstance->Set( "LevelEditor.TaskManagementMode.Selected.Small", new IMAGE_BRUSH( "Icons/icon_Mode_Foliage_selected_40x", Icon20x20 ) );

#undef IMAGE_BRUSH
#undef BOX_BRUSH
#undef BORDER_BRUSH
#undef DEFAULT_FONT

```

As it seems where I using the define is causing the error but not sure what to include to fix the error.

---

<div class="post-metadata">

**Author:** ![Ali\_Akbar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ali_akbar/32/1008648_2.png) [@Ali\_Akbar](https://forums.unrealengine.com/u/Ali_Akbar)\
**Post date:** [June 4, 2018, 10:34am UTC](https://forums.unrealengine.com/t/no-instance-of-constructor/426636/2 "2018-06-04T10:34:14Z")

</div>

It can’t recognize the FSlateImageBrush constructor, which is part of the IMAGE\_BRUSH macro. Since the macro takes variable args, the issue is mostly with Icon40x40. Have you defined this in your file? If not, define it like this in same function somewhere above

```
const FVector2D Icon40x40(40.0f, 40.0f);
```
