Click here to Skip to main content
15,867,686 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: typedef Handle [modified] Pin
Viorel.29-Jun-06 4:34
Viorel.29-Jun-06 4:34 
GeneralRe: typedef Handle Pin
Jay0329-Jun-06 4:40
Jay0329-Jun-06 4:40 
GeneralRe: typedef Handle Pin
Viorel.29-Jun-06 4:48
Viorel.29-Jun-06 4:48 
QuestionRe: typedef Handle Pin
ovidiucucu29-Jun-06 4:59
ovidiucucu29-Jun-06 4:59 
AnswerRe: typedef Handle Pin
Viorel.29-Jun-06 5:15
Viorel.29-Jun-06 5:15 
AnswerRe: typedef Handle Pin
Zac Howland29-Jun-06 4:45
Zac Howland29-Jun-06 4:45 
GeneralRe: typedef Handle Pin
ovidiucucu29-Jun-06 5:04
ovidiucucu29-Jun-06 5:04 
Questionabout button OwnerDraw [modified] Pin
HOW WHAT29-Jun-06 3:54
HOW WHAT29-Jun-06 3:54 
void CMyButton::PreSubclassWindow()
{
UINT nBS;

nBS = GetButtonStyle(); // GetStyle & 0xFF == all bs_* OR operator ?

m_nTypeStyle = nBS & BS_TYPEMASK; // GetStyle & 0xFF & 0xF ==? == all bs_* OR operator ?

if (nBS & BS_CHECKBOX)
m_bIsCheckBox = TRUE;

if (m_nTypeStyle == BS_DEFPUSHBUTTON) // why not use m_nTypeStyle & BS_DEFPUSHBUTTON
{
m_bIsDefault = TRUE;
}

ASSERT(m_nTypeStyle != BS_OWNERDRAW);// why not use !(m_nTypeStyle & BS_OWNERDRAW)

ModifyStyle(BS_TYPEMASK, BS_OWNERDRAW, SWP_FRAMECHANGED);

CButton::PreSubclassWindow();
}



LRESULT CMyButton::OnSetStyle(WPARAM wParam, LPARAM lParam)
{
UINT nNewType = (UINT)(wParam & BS_TYPEMASK); // why not use GetButtonStyle() & BS_TYPEMASK -> wParam & 0xFF & 0xF?

if (nNewType == BS_PUSHBUTTON) // why not use nNewType & BS_PUSHBUTTON? (if SetButtonStyle(BS_OWNERDRAW | BS_PUSHBUTTON)
{
m_bIsDefault = FALSE;
}

return DefWindowProc(BM_SETSTYLE,
(wParam & ~BS_TYPEMASK) | BS_OWNERDRAW, lParam); // why in here remove BS_TYPEMASK style?
}

thanks.

AnswerRe: about button OwnerDraw Pin
Sarath C29-Jun-06 3:58
Sarath C29-Jun-06 3:58 
JokeRe: about button OwnerDraw Pin
ovidiucucu29-Jun-06 4:13
ovidiucucu29-Jun-06 4:13 
GeneralRe: about button OwnerDraw Pin
HOW WHAT29-Jun-06 4:56
HOW WHAT29-Jun-06 4:56 
QuestionProblems including previously done class Pin
RedSpyder29-Jun-06 3:03
RedSpyder29-Jun-06 3:03 
AnswerRe: Problems including previously done class Pin
Jun Du29-Jun-06 3:26
Jun Du29-Jun-06 3:26 
QuestionHow to write content of file in to a structure Pin
birajendu29-Jun-06 2:55
birajendu29-Jun-06 2:55 
AnswerRe: How to write content of file in to a structure Pin
Cedric Moonen29-Jun-06 2:58
Cedric Moonen29-Jun-06 2:58 
GeneralRe: How to write content of file in to a structure Pin
birajendu29-Jun-06 3:46
birajendu29-Jun-06 3:46 
GeneralRe: How to write content of file in to a structure Pin
Cedric Moonen29-Jun-06 3:48
Cedric Moonen29-Jun-06 3:48 
GeneralRe: How to write content of file in to a structure Pin
birajendu29-Jun-06 3:55
birajendu29-Jun-06 3:55 
GeneralRe: How to write content of file in to a structure Pin
Cedric Moonen29-Jun-06 3:58
Cedric Moonen29-Jun-06 3:58 
GeneralRe: Pin
birajendu29-Jun-06 3:56
birajendu29-Jun-06 3:56 
AnswerRe: How to write content of file in to a structure Pin
Jun Du29-Jun-06 3:49
Jun Du29-Jun-06 3:49 
QuestionMemory leak [modified] Pin
pierre_ribery29-Jun-06 2:48
pierre_ribery29-Jun-06 2:48 
AnswerRe: Memory leak Pin
Zac Howland29-Jun-06 3:56
Zac Howland29-Jun-06 3:56 
GeneralRe: Memory leak Pin
pierre_ribery29-Jun-06 4:07
pierre_ribery29-Jun-06 4:07 
GeneralRe: Memory leak Pin
Zac Howland29-Jun-06 5:11
Zac Howland29-Jun-06 5:11 

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.