Thursday 30 May 2013

Visual Studio 2012 - "Project file '' has been renamed or is no longer in the solution"

Sometimes when messing about with projects, this unhelpful popup will plague you.

To get some more info about the actual cause..

1. Build this - https://github.com/CoherentLabs/DumpReferencesAddIn

2. Create C:\Users\\Documents\Visual Studio 2012\Addins 

3. Copy in there DumpReferencesAddIn.dll which you built and DumpReferencesAddIn.AddIn which you didn't. 

4. Restart VS2012, load your troublesome solution. 

5. Right click on the solution and select "Dump References". 

6. Enjoy.

Saturday 18 May 2013

Use a custom icon in a dialog box in windows

When creating a windows dialog, the icon in the top left corner is the dull standard one. Add your own funky alternative by adding this code! SendMessage(mainDialog,WM_SETICON,ICON_BIG,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON))); SendMessage(mainDialog,WM_SETICON,ICON_SMALL,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON))); SendMessage(mainDialog,WM_SETICON,ICON_SMALL2,(LPARAM)::LoadIcon(hInstance, MAKEINTRESOURCE(IDI_YOURICON)));