ホーム » 2013 » 5月

月別アーカイブ: 5月 2013

2013年5月
 1234
567891011
12131415161718
19202122232425
262728293031  

カテゴリー

アーカイブ

ブログ統計情報

  • 79,653 アクセス



MetaFile と MemoryDC

ODMMeta.cxx , ODrawDcM.hxx
    pDC->IntersectClipRect(imgRect) ;
    MetaFile mf ;
    mf.SetFileName(imgN) ;
  // mf.Draw(pDC,imgRect) ;
    {
      MemoryDC memDC ;
      CRect mRect(CPoint(0,0),imgRect.Size()) ;
      memDC.Init(CRect(mRect).Size()) ;
      {
        int colIndex = COLOR_3DFACE ;
        COLORREF clrC = ::GetSysColor(colIndex) ;
        CDC* mdc = memDC.GetMemoryDC() ;
        CRect clrR = mRect ;
        mdc->FillSolidRect(clrR,clrC) ;
        mf.Draw(mdc,mRect) ;
        }
      memDC.Draw(pDC,imgRect) ;
      memDC.Term() ;
      }

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

ZipFold と WinXP での zip

zae などの様に,zip 内のファイル名に 5c などの文字を含まない様にしている場合は OK .
つまり,zip のファイル名として 5c が含まれていても問題ない?
 → ZipFold が MBCS のためか? 単なるバグか?
     → CharFile.hxx GetFileAttribute の “\” 削除部分のバグ.


上は GetFileAttribute のバグが原因.
Shell を使用した zip クラスの動作では,5c が含まれていてもそれなりに動作する.
UNICODE 文字はうまくなさそう.


あるフォルダ以下の圧縮で,フォルダ名が 5c 文字で終わっている場合,
MFC 6 MBCS では,CFileFind::GetFilePath の影響を受ける.
::FolderF_EnumFiles 以下の部分で,新しく定義した iFileFind を使用する様に変更.


i_Tools

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.

VC 7 で error C2664 std::vector

VC 6 では通っていたが,VC 7 でエラーとなってそのままだったコード.
std::vector <void*> voidPtrs(1024,NULL) ;


c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(124) : error C2664:
‘std::vector >::_Construct_n’ : 2 番目の引数を ‘int’ から ‘void *const & ‘ に変換できません。
理由: ‘int’ から ‘void *const ‘ へは変換できません。
整数型からポインタ型への変換には reinterpret_cast、C スタイル キャストまたは関数スタイル キャストが必要です。
c:\Program Files\Microsoft Visual Studio .NET\Vc7\include\vector(109) :
コンパイルされたクラスのテンプレートのインスタンス化 ‘void std::vector<_Ty,_Ax>::_Construct(_Iter,int,std::_Int_iterator_tag)’ の参照を確認してください
with
[
_Ty=void *,
_Ax=std::allocator,
_Iter=int
]
c:\~\~.cpp(206) : コンパイルされたクラスのテンプレートのインスタンス化
‘std::vector<_Ty,_Ax>::vector(_Iter,int)’ の参照を確認してください
with
[
_Ty=void *,
_Ax=std::allocator,
_Iter=int
]


(void*) とすることで通るみたい.
std::vector <void*> voidPtrs(1024,(void*)NULL) ;

Is this 投稿 useful? Useful Useless 0 of 0 people say this 投稿 is useful.