Click here to Skip to main content
15,886,199 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Redimension CComboBox Pin
mesajflaviu30-Sep-10 20:09
mesajflaviu30-Sep-10 20:09 
QuestionWindows Service cannot access mapped network drive Pin
Ranojay28-Sep-10 21:43
Ranojay28-Sep-10 21:43 
AnswerRe: Windows Service cannot access mapped network drive Pin
Sauro Viti28-Sep-10 21:53
professionalSauro Viti28-Sep-10 21:53 
GeneralRe: Windows Service cannot access mapped network drive Pin
Ranojay28-Sep-10 22:31
Ranojay28-Sep-10 22:31 
AnswerRe: Windows Service cannot access mapped network drive Pin
Kushagra Tiwari29-Sep-10 1:45
Kushagra Tiwari29-Sep-10 1:45 
GeneralRe: Windows Service cannot access mapped network drive Pin
Ranojay29-Sep-10 2:11
Ranojay29-Sep-10 2:11 
AnswerRe: Windows Service cannot access mapped network drive [modified] Pin
Kushagra Tiwari29-Sep-10 3:01
Kushagra Tiwari29-Sep-10 3:01 
QuestionHow to get the co-ordinates of rectangle Pin
raju_shiva28-Sep-10 21:10
raju_shiva28-Sep-10 21:10 
Hi all,
I dnt know whether its a right forum for this question.If any one can help me it will be helpful to me.

I am drawing a rectangle using LeadTools.

Here is the code :
void CImageViewerView::OnAnnotationRectanle()
{
  m_ImageViewer.SetAction(CONTAINER_ACTION_ANNOTATION_RECTANGLE,CONTAINER_MOUSE_BUTTON_LEFT,FALSE);
m_ImageViewer.EnableActionCallBack(TRUE);
	   m_ImageViewer.SetAction(110, CONTAINER_MOUSE_BUTTON_RIGHT, DCACTION_ACTIVEONLY);
}

How can i get the co-ordinates
1) m_ImageViewer.SetAction : Sets the rectangle for left mouse button.
2)m_ImageViewer.EnableActionCallBack: Returns if the rectangle is drawn.
3)I want to use GetAnnotationContainer() for returning the co-ordinates.

m_ImageViewer.SetAction(110, CONTAINER_MOUSE_BUTTON_RIGHT, DCACTION_ACTIVEONLY);


This is working fine for me,I am changing the rectangle action to Right Mouse button
Here is the API :
   L_INT GetAnnotationContainer(L_INT nCellIndex,L_INT nSubCellIndex,HANNOBJECT * PhAnnContainer,L_UINT uFlags);

I have this in .h file

typedef struct tagDISPCONTAINERCELLINFO
{
   L_UINT uStructSize;
   L_HDC  hDC;
   L_INT  nCellIndex;
   L_INT  nSubCellIndex;
   RECT   rcRect;
   RECT   rcBitmapRect;
   L_INT  nX;
   L_INT  nY;
}
DISPCONTAINERCELLINFO, * pDISPCONTAINERCELLINFO;


When i am trying to use the same

pDISPCONTAINERCELLINFO pCellInfo;

void CImageViewerView::OnAnnotationRectanle()
{
  m_ImageViewer.SetAction(CONTAINER_ACTION_ANNOTATION_RECTANGLE,CONTAINER_MOUSE_BUTTON_LEFT,FALSE);
m_ImageViewer.EnableActionCallBack(TRUE);
	   m_ImageViewer.SetAction(110, CONTAINER_MOUSE_BUTTON_RIGHT, DCACTION_ACTIVEONLY);
 m_ImageViewer.GetAnnotationContainer(pCellInfo->nCellIndex, pCellInfo->nSubCellIndex, &PhAnnContainer, CONTAINER_ACTION_ANNOTATION_RECTANGLE);
}



But i am getting memory cannot read for pCellInfo->nCellIndex (Run Time error)

If any one knows what i am doing wrong,please help me

Thanks
raj
AnswerRe: How to get the co-ordinates of rectangle Pin
Stephen Hewitt28-Sep-10 21:17
Stephen Hewitt28-Sep-10 21:17 
GeneralRe: How to get the co-ordinates of rectangle Pin
raju_shiva28-Sep-10 23:14
raju_shiva28-Sep-10 23:14 
GeneralRe: How to get the co-ordinates of rectangle Pin
Stephen Hewitt29-Sep-10 0:25
Stephen Hewitt29-Sep-10 0:25 
QuestionOutlook bar with variable number of controls fails to draw Pin
old_hacker28-Sep-10 17:48
old_hacker28-Sep-10 17:48 
QuestionHow to get control of another code's dialog box Pin
largenqcd28-Sep-10 16:17
largenqcd28-Sep-10 16:17 
AnswerRe: How to get control of another code's dialog box [modified] Pin
Luc Pattyn28-Sep-10 16:35
sitebuilderLuc Pattyn28-Sep-10 16:35 
GeneralRe: How to get control of another code's dialog box Pin
largenqcd29-Sep-10 13:11
largenqcd29-Sep-10 13:11 
QuestionHow to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
ns28-Sep-10 10:13
ns28-Sep-10 10:13 
AnswerRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Aescleal28-Sep-10 10:39
Aescleal28-Sep-10 10:39 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
ns28-Sep-10 10:51
ns28-Sep-10 10:51 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Eugen Podsypalnikov28-Sep-10 11:57
Eugen Podsypalnikov28-Sep-10 11:57 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Tim Craig28-Sep-10 15:05
Tim Craig28-Sep-10 15:05 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Eugen Podsypalnikov28-Sep-10 20:41
Eugen Podsypalnikov28-Sep-10 20:41 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
ns29-Sep-10 4:31
ns29-Sep-10 4:31 
AnswerRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Luc Pattyn28-Sep-10 11:10
sitebuilderLuc Pattyn28-Sep-10 11:10 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
ns29-Sep-10 4:35
ns29-Sep-10 4:35 
GeneralRe: How to make the release version of a visual studio 2008 c++ project so i can step in and debug? Pin
Luc Pattyn29-Sep-10 4:47
sitebuilderLuc Pattyn29-Sep-10 4:47 

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.