You're asking 3 different things
I'll explain how to change the application window's icon.
(I'm not used to working with MFC, so i'll use some API)
Load the icon from your resource using
HICON icn = ::LoadIcon(::GetModuleHandle(NULL),MAKEINTRESOURCE(IDI_ICONx))
You may set the icon using SetClassLong
::SetClassLong(hWnd,GCL_HICON,(LONG)icn);
You must use the Shell Links api to set your desktop shortcut's icon. Check msdn for some examples
To set your application's documents' icons, modify the registry
(assuming your document's extension is .abc)
Set icons in this path
HKEY_CLASSES_ROOT\.abc\DefaultIcon
The value will be the path to your executable file, followed by a number
Eg: C:\YourApp.exe,0
where the number 0 (or 1,2) is the order number of the icon resources in your executable.
Just check out some registry keys to understand