顯示具有 visual studio 標籤的文章。 顯示所有文章
顯示具有 visual studio 標籤的文章。 顯示所有文章

2016年8月17日 星期三

[VC++] Visual Studio 2005 搭配win7 相容性錯誤的解決方法

已知VS2005安裝在win7會有相容性問題,該怎麼解決網路上也有各種說法

但最後解決的辦法是看到stackoverflow上面的這篇文章:

http://stackoverflow.com/questions/1901492/windows-7-visual-studio-2005-compatibility




I had a similar problem when I was installing Visual Studio 2005 Professional on a Windows 7 machine. But here is what I did to fix the problem:
  1. Install Visual Studio 2005 Professional During the install, a window popped up saying that VS2005 might not be compatible with Windows 7. Ignore this warning and continue.
  2. Install Microsoft® Visual Studio® 2005 Team Suite Service Pack 1 VS80sp1-KB926601-X86-ENU.exe Link: Microsoft® Visual Studio® 2005 Team Suite Service Pack 1
  3. Install Visual Studio 2005 Service Pack 1 Update for Windows Vista VS80sp1-KB932232-X86-ENU.exe Link: Visual Studio 2005 Service Pack 1 Update for Windows Vista
Note: If you try and install #3 before #2, you will end up with a message that says : "The upgrade patch cannot be installed by the Windows Installer service because the program to be upgraded may be missing, or the upgrade patch may update a different version of the program. Verify that the program to be upgraded exists on your computer and that you have the correct upgrade patch."
Hope it helps.


看看這邊的回應,他是說先安裝VS2005 然後安裝team suite 最後才安裝SP1 update(順序不要搞混)

不然會出現已經安裝新版本之類的錯誤訊息


附上兩個連結 ,就這樣! end

2016年4月26日 星期二

[C++] Messagebox with int/long value , or text 如何顯示?

Debug時候,有時需要使用Messagebox,

但是要加入特定文字,或是變數該怎麼讓他顯示呢?

先從文字開始:

MessageBox(HWND hwnd, LPCWSTR lpText,LPCWSTR lpCation , UINT uType);

hwnd因為不需要特別設定 = 0

LPCWSTR  lpText是Box內想說的話 --->    _T("我想說的話")

LPCWSTR  lpCation是Box的標題 --->    _T("我的標題")

UINT uType 就是可以讓他選OK cancel等按鈕,這邊是填入MB_OK(可以自行調整)





我要填入ulong / int  怎麼辦??

CString msg;
msg.Format(_T("%d").變數名稱);
AfxMessageBox(msg);


這樣就可以囉!


END