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

Managed C++/CLI

 
QuestionHow to write a application for auto detect new HDD on windows 10 Pin
unitedcamau201915-Jul-19 17:23
unitedcamau201915-Jul-19 17:23 
AnswerRe: How to write a application for auto detect new HDD on windows 10 Pin
Richard MacCutchan15-Jul-19 21:12
mveRichard MacCutchan15-Jul-19 21:12 
QuestionI have 3rd party .OCX file. and i need to create wrapper to make it usable in C# Pin
Gaurav__Kapoor26-May-19 22:11
Gaurav__Kapoor26-May-19 22:11 
AnswerRe: I have 3rd party .OCX file. and i need to create wrapper to make it usable in C# Pin
phil.o26-May-19 22:22
professionalphil.o26-May-19 22:22 
AnswerRe: I have 3rd party .OCX file. and i need to create wrapper to make it usable in C# Pin
Richard MacCutchan26-May-19 22:36
mveRichard MacCutchan26-May-19 22:36 
QuestionData Shifting on Some Computers Pin
Erich Ruth3-May-19 6:18
Erich Ruth3-May-19 6:18 
QuestionHandle leak in application complied with CLR option. Pin
atm.menon2-May-19 0:15
atm.menon2-May-19 0:15 
QuestionGeneric List Template, Function Parameter Pin
Brennan Salibrici24-Apr-19 1:09
Brennan Salibrici24-Apr-19 1:09 
Hello All.

I'm trying to create a function that can loop through a list of Windows::Forms::Controls (I know there's no loop below, I'm just keeping it simple for sake of testing) and perform a task. Right now I have a function which works properly:
C++
 void mCtrlWrap::IsVisible(bool TF, List<Windows::Forms::TextBox^>^ list)

{
	if (TF == true)
	{
		list[0]->Visible = true;
		list[0]->BackColor = Color::Azure;
	}
	else if (TF != true)
	{
		list[0]->Visible = false;
	}

}


but i want to make the List parameter a template so that it take List<windows::forms::combobox^>^ as a parameter or List<windows::forms::label^>^, etc.

I've tried

C++
template<typename T>
 void mCtrlWrap::IsVisible(bool TF, System::Collections::Generic::List<T>^ list)

{
	if (TF == true)
	{
		list[0]->Visible = true;
		list[0]->BackColor = Color::Azure;
	}
	else if (TF != true)
	{
		list[0]->Visible = false;
	}

}




which compiles just fine but i get linking errors:
1>MainScreen.obj : error LNK2020: unresolved token (06000001) mCtrlWrap::IsVisible<system::windows::forms::textbox ^="">

can someone please help me figure out what I'm doing wrong?

Thanks

Brennan
AnswerRe: Generic List Template, Function Parameter Pin
Richard MacCutchan24-Apr-19 1:56
mveRichard MacCutchan24-Apr-19 1:56 
AnswerRe: Generic List Template, Function Parameter Pin
11917640 Member 2-May-19 3:44
11917640 Member 2-May-19 3:44 
QuestionLocationApi.dll having issue while trying to fetch location. Pin
Anurag__4-Mar-19 19:29
Anurag__4-Mar-19 19:29 
QuestionRe: LocationApi.dll having issue while trying to fetch location. Pin
Richard MacCutchan4-Mar-19 21:51
mveRichard MacCutchan4-Mar-19 21:51 
AnswerRe: LocationApi.dll having issue while trying to fetch location. Pin
Anurag__12-Mar-19 20:45
Anurag__12-Mar-19 20:45 
GeneralRe: LocationApi.dll having issue while trying to fetch location. Pin
Richard MacCutchan12-Mar-19 22:20
mveRichard MacCutchan12-Mar-19 22:20 
GeneralRe: LocationApi.dll having issue while trying to fetch location. Pin
Anurag__14-Mar-19 21:13
Anurag__14-Mar-19 21:13 
GeneralRe: LocationApi.dll having issue while trying to fetch location. Pin
Richard MacCutchan14-Mar-19 23:05
mveRichard MacCutchan14-Mar-19 23:05 
GeneralRe: LocationApi.dll having issue while trying to fetch location. Pin
Anurag__14-Mar-19 23:26
Anurag__14-Mar-19 23:26 
NewsC++/CLI + /std:c++latest is broken in VS 2017 15.9.6 Pin
John Schroedl14-Feb-19 4:22
professionalJohn Schroedl14-Feb-19 4:22 
Questionwhere to include new class in c# , windows forms, visual studio Pin
Member 1412466126-Jan-19 5:50
Member 1412466126-Jan-19 5:50 
AnswerRe: where to include new class in c# , windows forms, visual studio Pin
Richard MacCutchan8-Feb-19 3:03
mveRichard MacCutchan8-Feb-19 3:03 
SuggestionRe: where to include new class in c# , windows forms, visual studio Pin
Richard Deeming8-Feb-19 6:15
mveRichard Deeming8-Feb-19 6:15 
GeneralRe: where to include new class in c# , windows forms, visual studio Pin
Richard MacCutchan8-Feb-19 22:40
mveRichard MacCutchan8-Feb-19 22:40 
QuestionHow to format DATETIME Pin
Member 1412466121-Jan-19 0:56
Member 1412466121-Jan-19 0:56 
AnswerRe: How to format DATETIME Pin
Richard MacCutchan21-Jan-19 1:57
mveRichard MacCutchan21-Jan-19 1:57 
GeneralRe: How to format DATETIME Pin
Member 1412466121-Jan-19 2:42
Member 1412466121-Jan-19 2:42 

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.