"the type or name space name 'HWND' couldnot be found.are you missing a using directive or assembly reference".i got this error message when i run below code in c#.

        {
          LRESULT CALLBACK NewListViewWndProc(HWND hwnd, UINT uiMsg, WPARAM wParam, LPARAM lParam)

                    switch (uiMsg)
                    {
                        case WM_CONTEXTMENU:    // trying to create a context menu?
                            {
                                return 0;       // eat this message, prevent context menu
                            }

                            break;
                    }


        }

how can i solve it????????????

This is C++ code and won't work in C# unless you import the relevent Windows API DLLs.

See pinvoke.net for more information on how to do that and what is available to you.

You can obtain a HWND in C# here