LoginSignup
0
0

More than 5 years have passed since last update.

Win64 における SetDIBits 関数の hdc パラメータについて

Posted at

Win64 における SetDIBits 関数の hdc パラメータについて

MSDN の SetDIBits function には以下の記述がある.

The device context identified by the hdc parameter is used only if the DIB_PAL_COLORS constant is set for the fuColorUse parameter; otherwise it is ignored.

DIB_PAL_COLORS ではない場合には hdc パラメータは無視される(is ignored)と書かれているが、実際には hdc を指定すると、6: ERROR_INVALID_HANDLE のエラーとなり、動作しない(Windows 10 April 2018 Update で確認). なので DIB_RGB_COLORS の場合には hdc に 0 を指定する必要がある.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0