Click here to Skip to main content
15,891,184 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to delete CStatic object. Pin
Niklas L2-Apr-09 3:38
Niklas L2-Apr-09 3:38 
GeneralRe: How to delete CStatic object. Pin
Code-o-mat2-Apr-09 4:03
Code-o-mat2-Apr-09 4:03 
QuestionCPoint's x and y has large value Pin
nayeemkhan1-Apr-09 20:38
nayeemkhan1-Apr-09 20:38 
AnswerRe: CPoint's x and y has large value Pin
Stuart Dootson1-Apr-09 21:52
professionalStuart Dootson1-Apr-09 21:52 
GeneralRe: CPoint's x and y has large value Pin
nayeemkhan1-Apr-09 22:03
nayeemkhan1-Apr-09 22:03 
GeneralRe: CPoint's x and y has large value Pin
Stuart Dootson1-Apr-09 22:06
professionalStuart Dootson1-Apr-09 22:06 
AnswerRe: CPoint's x and y has large value Pin
Cedric Moonen1-Apr-09 22:07
Cedric Moonen1-Apr-09 22:07 
GeneralRe: CPoint's x and y has large value Pin
nayeemkhan1-Apr-09 23:22
nayeemkhan1-Apr-09 23:22 
Hi Below is the part of code which gets the x and y values and converts it to a index variable called ListClick
I have commented the code where ever necessary


void CHierDispWnd::OnLButtonDown( UINT , CPoint Point  )//HERE point.x is 5882 and point.y is 1150
{
	
   int ListClick;
   long MemClick;
   int GapX,GapY;
   GapX = m_pStdProps->m_iGapX;//GapX = 16
   GapY = m_pStdProps->m_iGapY;//Gapy = 10
   int mem_wd,mem_ht;
   mem_wd = m_pStdProps->m_iMemWidth;//mem_wd =125
   mem_ht = m_pStdProps->m_iMemHeight;//mem_ht=18
   SetFocus();
   if ((Point.x < CXSCROLLBTN) || (Point.y < GapY))//CXSCROLLBTN = 16
      return;
   ListClick = (Point.x - CXSCROLLBTN) / (mem_wd + GapX);//HERE WE ARE CONVERTING point.x to ListClick
   if (!pMiddle->ListValid( ListClick))//CRASHES IN THIS FUNC...LISTCLICK is 41,which does not    
                                          //exists
          return;
}

GeneralRe: CPoint's x and y has large value Pin
Niklas L2-Apr-09 3:02
Niklas L2-Apr-09 3:02 
GeneralRe: CPoint's x and y has large value Pin
David Crow2-Apr-09 3:47
David Crow2-Apr-09 3:47 
AnswerRe: CPoint's x and y has large value Pin
Code-o-mat1-Apr-09 22:42
Code-o-mat1-Apr-09 22:42 
AnswerRe: CPoint's x and y has large value Pin
krmed2-Apr-09 0:43
krmed2-Apr-09 0:43 
QuestionRe: CPoint's x and y has large value Pin
David Crow2-Apr-09 3:45
David Crow2-Apr-09 3:45 
QuestionHow to create a secure database with the MS-Jet ODBC driver [modified] Pin
pani681-Apr-09 20:35
pani681-Apr-09 20:35 
AnswerRe: How to create a secure database with the MS-Jet ODBC driver [modified] Pin
Stuart Dootson1-Apr-09 22:43
professionalStuart Dootson1-Apr-09 22:43 
GeneralRe: How to create a secure database with the MS-Jet ODBC driver Pin
pani682-Apr-09 2:20
pani682-Apr-09 2:20 
GeneralRe: How to create a secure database with the MS-Jet ODBC driver Pin
Stuart Dootson2-Apr-09 2:22
professionalStuart Dootson2-Apr-09 2:22 
QuestionHow to convert const void* to CString? Pin
g_satish1-Apr-09 20:26
g_satish1-Apr-09 20:26 
AnswerRe: How to convert const void* to CString? Pin
«_Superman_»1-Apr-09 20:30
professional«_Superman_»1-Apr-09 20:30 
AnswerRe: How to convert const void* to CString? Pin
Stuart Dootson1-Apr-09 21:56
professionalStuart Dootson1-Apr-09 21:56 
QuestionHow to capture "Enter Key"? Pin
gothic_coder1-Apr-09 20:25
gothic_coder1-Apr-09 20:25 
AnswerRe: How to capture "Enter Key"? Pin
«_Superman_»1-Apr-09 20:32
professional«_Superman_»1-Apr-09 20:32 
GeneralRe: How to capture "Enter Key"? Pin
gothic_coder1-Apr-09 20:36
gothic_coder1-Apr-09 20:36 
AnswerRe: How to capture "Enter Key"? Pin
Code-o-mat1-Apr-09 22:32
Code-o-mat1-Apr-09 22:32 
GeneralRe: How to capture "Enter Key"? Pin
gothic_coder1-Apr-09 23:29
gothic_coder1-Apr-09 23:29 

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.