Click here to Skip to main content
15,911,360 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: VC++ Code to check whether an excel file is already open or not Pin
Abraham Betty13-May-09 6:52
Abraham Betty13-May-09 6:52 
GeneralRe: VC++ Code to check whether an excel file is already open or not Pin
Madhu Nair13-May-09 19:35
Madhu Nair13-May-09 19:35 
QuestionRe: VC++ Code to check whether an excel file is already open or not Pin
David Crow11-May-09 9:20
David Crow11-May-09 9:20 
QuestionMAPIFindNext return 16 but there are email in Windows Mail. Pin
SNArruda11-May-09 4:42
SNArruda11-May-09 4:42 
QuestionHi Pin
Mohammadj11-May-09 3:39
Mohammadj11-May-09 3:39 
QuestionRe: Hi Pin
David Crow11-May-09 4:32
David Crow11-May-09 4:32 
AnswerRe: Hi Pin
Mohammadj11-May-09 9:06
Mohammadj11-May-09 9:06 
GeneralRe: Hi Pin
David Crow11-May-09 9:09
David Crow11-May-09 9:09 
GeneralRe: Hi Pin
Mohammadj11-May-09 9:15
Mohammadj11-May-09 9:15 
GeneralRe: Hi Pin
David Crow11-May-09 9:19
David Crow11-May-09 9:19 
GeneralRe: Hi Pin
Mohammadj11-May-09 9:21
Mohammadj11-May-09 9:21 
QuestionRe: Hi Pin
David Crow11-May-09 9:27
David Crow11-May-09 9:27 
AnswerRe: Hi Pin
Mohammadj11-May-09 9:28
Mohammadj11-May-09 9:28 
GeneralRe: Hi Pin
Mohammadj11-May-09 20:27
Mohammadj11-May-09 20:27 
GeneralRe: Hi Pin
Mohammadj11-May-09 23:54
Mohammadj11-May-09 23:54 
AnswerRe: Hi Pin
Mohammadj16-May-09 22:19
Mohammadj16-May-09 22:19 
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 

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.