mfc_tips


FrontPage

mfc_tips


CString変換

CStringとstd::string

- CString → std:string
  CString cs;
  string s;
  s = (LPCTSTR)cs;
- std::string → CString
  cs = s.c_str();

UNICODE対応

TCHAR

プロジェクトの文字コード設定により以下のように定義される。

- [MBCS] char (1byte)
- [UNICODE] WCHAR = wchar_t (2byte)

[例]

sprintf_s,sprintf_s → _stprintf_s

_T()

詳細はTCHAR.hを参照。

- [MBCS] 影響なし(プリプロセッサによって削除)。
- [UNICODE] 後続文字をワイド文字に変換。

プロジェクトの設定

ディレクトリ指定マクロの使い方

例:

$(ProjectDir)

その他

処理中にカーソルを砂時計にする

処理の前に、CWaitCursor?クラスのインスタンスを作成。

いらない生成ファイル等

*.ncb *.ilk *.pdb *.aps *.user *.suo *.msi

クリーンできていない場合は、以下のファイルも残っている。

*.obj *.pch *.idb

doxygen生成結果が残っている場合は、以下のファイルがある。

doxygen.css

最新の20件

2009-01-03 2008-06-21 2008-05-11 2008-04-28 2008-04-23 2008-04-19 2008-03-23 2008-03-14
  • mfc_tips
2008-03-01 2008-02-03 2008-01-29 2008-01-27 2007-10-21 2007-08-05 2007-03-18

今日の3件

  • counter: 154
  • today: 1
  • yesterday: 0
  • online: 1