Click here to Skip to main content
15,914,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCEvent Syncronization Class! Pin
MarkPQ12-Mar-02 13:58
MarkPQ12-Mar-02 13:58 
GeneralRe: CEvent Syncronization Class! Pin
Serge Krynine12-Mar-02 14:16
Serge Krynine12-Mar-02 14:16 
GeneralCreating Styles... Pin
CDuddley12-Mar-02 13:49
CDuddley12-Mar-02 13:49 
GeneralRe: Creating Styles... Pin
Maximilien12-Mar-02 15:20
Maximilien12-Mar-02 15:20 
GeneralRe: Creating Styles... Pin
alex.barylski12-Mar-02 15:49
alex.barylski12-Mar-02 15:49 
GeneralRe: Creating Styles... Pin
CDuddley12-Mar-02 16:27
CDuddley12-Mar-02 16:27 
GeneralRe: Creating Styles... Pin
Serge Krynine12-Mar-02 17:02
Serge Krynine12-Mar-02 17:02 
GeneralRe: Creating Styles... Pin
alex.barylski12-Mar-02 19:29
alex.barylski12-Mar-02 19:29 
#define CWS_3DBORDER  0x01  //First bit of DWORD style is now used by child window style (CWS)

//Create custom control window with custom style
m_wndChild.Create(this, WS_CHILD | WS_VISIBLE | CWS_3DBORDER);

//Custom control overloaded Create function
CCustom::Create(CWnd* pParent, DWORD nStyle)
{
  m_b3DBorder = nStyle & MASK;
}

//CCustom control OnPaint handler
CCustom::OnPaint()
{
  CPaintDC dc(this);
  if(m_b3DBorder)
    //Draw 3d border cuz it was specified in style flag

  //Continue with normal drawing code
}


You may have to give the and operation the once over
I dunno how accurate my attempt at masking bits is in the above...but you should figure it out easily. I did try and give a solid example of how I would use custom flags.

Cheers!

"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
GeneralCPP question Pin
alex.barylski12-Mar-02 13:01
alex.barylski12-Mar-02 13:01 
GeneralRe: CPP question Pin
Rick York12-Mar-02 14:59
mveRick York12-Mar-02 14:59 
GeneralRe: CPP question Pin
alex.barylski12-Mar-02 15:37
alex.barylski12-Mar-02 15:37 
GeneralRe: CPP question Pin
Jon Hulatt12-Mar-02 22:25
Jon Hulatt12-Mar-02 22:25 
GeneralRe: CPP question Pin
Tomasz Sowinski12-Mar-02 23:17
Tomasz Sowinski12-Mar-02 23:17 
GeneralTools for detecting memory leaks Pin
Rad12-Mar-02 12:24
Rad12-Mar-02 12:24 
GeneralRe: Tools for detecting memory leaks Pin
Tim Smith12-Mar-02 12:35
Tim Smith12-Mar-02 12:35 
GeneralRe: Tools for detecting memory leaks Pin
Rick York12-Mar-02 14:51
mveRick York12-Mar-02 14:51 
GeneralRe: Tools for detecting memory leaks Pin
Nish Nishant12-Mar-02 16:14
sitebuilderNish Nishant12-Mar-02 16:14 
Generallistboxes Pin
12-Mar-02 11:55
suss12-Mar-02 11:55 
GeneralRe: listboxes Pin
Ravi Bhavnani12-Mar-02 11:59
professionalRavi Bhavnani12-Mar-02 11:59 
GeneralRe: How can I get the item text from other ListView Pin
Tim Smith12-Mar-02 10:33
Tim Smith12-Mar-02 10:33 
Generalequal_range Pin
12-Mar-02 9:50
suss12-Mar-02 9:50 
GeneralRe: equal_range Pin
Joaquín M López Muñoz12-Mar-02 9:52
Joaquín M López Muñoz12-Mar-02 9:52 
QuestionFindResourceEx not working ??????? Pin
Wolfram Steinke12-Mar-02 9:33
Wolfram Steinke12-Mar-02 9:33 
AnswerRe: FindResourceEx not working ??????? Pin
Joaquín M López Muñoz12-Mar-02 9:50
Joaquín M López Muñoz12-Mar-02 9:50 
GeneralRe: FindResourceEx not working ??????? Pin
Wolfram Steinke12-Mar-02 10:15
Wolfram Steinke12-Mar-02 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.