Home > Software engineering >  Reloading the shielding properties
Reloading the shielding properties

Time:09-25

CListCtrl provides us with SetExtendedStyle function can add CListCtrl many extended attributes, emphasize here LVS_EX_CHECKBOXES leads to ON_WM_MEASUREITEM_REFLECT message reflection is not receiving, LVS_EX_GRIDLINES can lead to inaccurate node rectangular, so we need to reload shielding these properties
 DWORD CSkinListCtrl: : SetExtendedStyle (DWORD dwNewStyle) 
{
If (dwNewStyle & amp; LVS_EX_CHECKBOXES)
{
DwNewStyle & amp;=~ LVS_EX_CHECKBOXES;
DwNewStyle & amp;=~ LVS_EX_GRIDLINES;
}
Return __super: : SetExtendedStyle (dwNewStyle);
}


I don't understand what is overloading, shielding properties, ask ace to give directions,

CodePudding user response:

Is to remove the attribute

DwNewStyle & amp;=~ LVS_EX_CHECKBOXES;//remove
DwNewStyle & amp;=~ LVS_EX_GRIDLINES;

CodePudding user response:

That the if (dwNewStyle & amp; LVS_EX_CHECKBOXES) this with the following two sentences
DwNewStyle & amp;=~ LVS_EX_CHECKBOXES;//remove
DwNewStyle & amp;=~ LVS_EX_GRIDLINES;
What is the relationship, give advice or comments please,

CodePudding user response:

refer to the second floor xixia07m response:
that the if (dwNewStyle & amp; LVS_EX_CHECKBOXES) this with the following two sentences
DwNewStyle & amp;=~ LVS_EX_CHECKBOXES;//remove
DwNewStyle & amp;=~ LVS_EX_GRIDLINES;
What is the relationship, give advice or comments please,


Suggest you to learn C language under first & amp; | ~ & amp; & | |! Basic knowledge of the operators such as

CodePudding user response:

# define LVS_EX_GRIDLINES 0 x00000001
# define LVS_EX_SUBITEMIMAGES 0 x00000002
# define LVS_EX_CHECKBOXES 0 x00000004
# define LVS_EX_TRACKSELECT 0 x00000008
# define LVS_EX_HEADERDRAGDROP 0 x00000010
# define LVS_EX_FULLROWSELECT 0 x00000020//applies to report mode only
# define LVS_EX_ONECLICKACTIVATE 0 x00000040
# define LVS_EX_TWOCLICKACTIVATE 0 x00000080
# if (_WIN32_IE & gt;=0 x0400)
# define LVS_EX_FLATSB 0 x00000100
# define LVS_EX_REGIONAL 0 x00000200
# define LVS_EX_INFOTIP 0 x00000400//listview does InfoTips for you
# define LVS_EX_UNDERLINEHOT 0 x00000800
# define LVS_EX_UNDERLINECOLD 0 x00001000
# define LVS_EX_MULTIWORKAREAS 0 x00002000
# endif
Note that each said a, so
DwNewStyle |=LVS_EX_CHECKBOXES;//is
DwNewStyle & amp;=~ LVS_EX_CHECKBOXES;//is minus

CodePudding user response:

Bit operation ~ ~ ~ ~ ~
  • Related