Click here to Skip to main content
15,881,172 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Hi Pin
David Crow18-May-09 3:25
David Crow18-May-09 3:25 
AnswerRe: Hi Pin
Mohammadj18-May-09 5:07
Mohammadj18-May-09 5:07 
GeneralRe: Hi Pin
David Crow18-May-09 5:10
David Crow18-May-09 5:10 
GeneralRe: Hi Pin
Mohammadj18-May-09 9:11
Mohammadj18-May-09 9:11 
GeneralRe: Hi Pin
David Crow18-May-09 9:22
David Crow18-May-09 9:22 
GeneralRe: Hi Pin
Mohammadj18-May-09 22:01
Mohammadj18-May-09 22:01 
QuestionRe: Hi Pin
David Crow19-May-09 2:40
David Crow19-May-09 2:40 
AnswerRe: Hi Pin
Mohammadj20-May-09 22:24
Mohammadj20-May-09 22:24 
Hi
I made this on OnClicked ( the derived custom button)

void C_Double_Task::OnClicked()
{

DWORD dwpos = GetMessagePos() ;
CPoint pt ;
pt.x = LOWORD(dwpos );
pt.y = HIWORD(dwpos) ;
CRect client_rectangle ;
GetClientRect( client_rectangle) ;
CRect leftRect ;
leftRect = client_rectangle ;

leftRect.right = client_rectangle .left +client_rectangle.Width()/2;
IsRight = TRUE ;
if(leftRect.PtInRect(pt))

IsRight = FALSE ;


GetParent()->SendMessage(UDM_REGION_CLICKED, 12);


}


all what do is to set flag if on the right half or left half


LRESULT CHashiDlg::OnRegionClicked( WPARAM wParam, LPARAM lparan12 )
{
UpdateData();



double num1 , num2 , result ;
num1 = atof(m_strNum1);
num2 = atof( m_strNum2);

result = num1 + num2 ;
if (m_two_actions_botn.OnRight() )
result = num1 - num2 ;

m_str_Result.Format("%3.2" ,result);

UpdateData(FALSE);
return (0);

The OnRegionClicked check the flag throught fubction onRight and perform addition or subtraction depending on the value of IsRight ''

it also did not succeed loll
QuestionRe: Hi Pin
David Crow21-May-09 2:50
David Crow21-May-09 2:50 
QuestionBigNum Pin
AndreFratelli11-May-09 2:51
AndreFratelli11-May-09 2:51 
QuestionRe: BigNum Pin
Divyang Mithaiwala11-May-09 3:35
Divyang Mithaiwala11-May-09 3:35 
AnswerRe: BigNum Pin
harold aptroot11-May-09 4:05
harold aptroot11-May-09 4:05 
QuestionRe: BigNum Pin
David Crow11-May-09 4:39
David Crow11-May-09 4:39 
QuestionRe: BigNum Pin
CPallini11-May-09 5:13
mveCPallini11-May-09 5:13 
QuestionUnable to Install Plateform SDK Pin
pandit8411-May-09 2:20
pandit8411-May-09 2:20 
AnswerRe: Unable to Install Plateform SDK Pin
Naveen11-May-09 2:25
Naveen11-May-09 2:25 
GeneralRe: Unable to Install Plateform SDK Pin
pandit8411-May-09 3:45
pandit8411-May-09 3:45 
GeneralRe: Unable to Install Plateform SDK Pin
Naveen11-May-09 3:51
Naveen11-May-09 3:51 
Questionwmi problem Pin
Mogaambo11-May-09 2:19
Mogaambo11-May-09 2:19 
AnswerRe: wmi problem Pin
«_Superman_»11-May-09 2:35
professional«_Superman_»11-May-09 2:35 
Questionbuild errors Pin
josip cagalj11-May-09 1:36
josip cagalj11-May-09 1:36 
AnswerRe: build errors Pin
josip cagalj11-May-09 2:26
josip cagalj11-May-09 2:26 
QuestionHow to compress an image? Pin
kapardhi11-May-09 1:30
kapardhi11-May-09 1:30 
AnswerRe: How to compress an image? Pin
CPallini11-May-09 1:41
mveCPallini11-May-09 1:41 
AnswerRe: How to compress an image? Pin
Stuart Dootson11-May-09 6:00
professionalStuart Dootson11-May-09 6:00 

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.