Click here to Skip to main content
15,915,093 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to use SetItem() and GetItem() for ListCtrl having JPEG images? Pin
Atul233-Sep-07 1:55
Atul233-Sep-07 1:55 
GeneralRe: How to use SetItem() and GetItem() for ListCtrl having JPEG images? Pin
Nishad S3-Sep-07 2:44
Nishad S3-Sep-07 2:44 
QuestionImport dll to vc++ Pin
shakumar_222-Sep-07 23:56
shakumar_222-Sep-07 23:56 
AnswerRe: Import dll to vc++ Pin
chandu0043-Sep-07 0:01
chandu0043-Sep-07 0:01 
GeneralRe: Import dll to vc++ Pin
shakumar_223-Sep-07 0:56
shakumar_223-Sep-07 0:56 
AnswerRe: Import dll to vc++ Pin
Hamid_RT3-Sep-07 0:05
Hamid_RT3-Sep-07 0:05 
Questionhi Pin
Lakshmi_p2-Sep-07 23:47
Lakshmi_p2-Sep-07 23:47 
AnswerRe: hi Pin
baerten2-Sep-07 23:53
baerten2-Sep-07 23:53 
GeneralRe: hi Pin
Rajesh R Subramanian2-Sep-07 23:59
professionalRajesh R Subramanian2-Sep-07 23:59 
GeneralRe: hi Pin
Lakshmi_p3-Sep-07 0:37
Lakshmi_p3-Sep-07 0:37 
AnswerRe: hi Pin
Rajesh R Subramanian3-Sep-07 0:08
professionalRajesh R Subramanian3-Sep-07 0:08 
Questionabout HKEY_CLASSES_ROOT TypeLib Pin
George_George2-Sep-07 23:27
George_George2-Sep-07 23:27 
QuestionStack overflow while reading bamp image Pin
Maynka2-Sep-07 23:26
Maynka2-Sep-07 23:26 
AnswerRe: Stack overflow while reading bamp image Pin
chandu0042-Sep-07 23:48
chandu0042-Sep-07 23:48 
AnswerRe: Stack overflow while reading bamp image Pin
Russell'2-Sep-07 23:55
Russell'2-Sep-07 23:55 
AnswerRe: Stack overflow while reading bamp image Pin
Mark Salsbery3-Sep-07 9:05
Mark Salsbery3-Sep-07 9:05 
GeneralRe: Stack overflow while reading bamp image Pin
Maynka3-Sep-07 18:45
Maynka3-Sep-07 18:45 
GeneralRe: Stack overflow while reading bamp image Pin
Mark Salsbery3-Sep-07 20:31
Mark Salsbery3-Sep-07 20:31 
QuestionPicture Control / Client Rectangle Pin
TheShihan2-Sep-07 23:22
TheShihan2-Sep-07 23:22 
Hi,

I'm currently trying to implement a pan function for panning images which are displayed in a picture control area (drawing with GDI+).

I've managed to change the mouse cursor, it should be a hand when the cursor is over the picture control and an arrow everywhere else. A part of that seems to work. I check if the mouse position is inside the area of the picture control but somehow the area "thinks" it's startpoint (upper left) is located @ x: 0 y: 0; in fact it is placed somewhere in the middle of the dialog box.

Here is the snippet:
/**************************************************************************************/
void CTrackAndTraceDlg::OnMouseMove(UINT nFlags, CPoint point)
/**************************************************************************************/
{
	HCURSOR hcur = NULL;

	CRect rc;
	m_pictureControl.GetClientRect(&rc);
	rc.NormalizeRect();

	//Get current mouse position
	POINT MousePosition = point;

	BOOL isOnPictureControl = PtInRect(&rc, MousePosition);

	if(isOnPictureControl && m_bPicLoaded && hcur == NULL)
	{
			// mouse is over the picture control AND a picture is loaded
			hcur = LoadCursor(AfxGetApp()->m_hInstance,(LPCTSTR)IDC_CUR_PAN);	
			SetCursor(hcur);
	}
	else
	{
			SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
			hcur = NULL;
	}

	CDialog::OnMouseMove(nFlags, point);
}


As you see I get the rectangle from the m_pictureControl (which is a var for the Picture Control on the dialog). But why it gives back the wrong x,y -> the rc.Width and rc.Height are correct.

Any ideas?

Thx, Shi
GeneralRe: Picture Control / Client Rectangle Pin
chandu0042-Sep-07 23:46
chandu0042-Sep-07 23:46 
GeneralRe: Picture Control / Client Rectangle Pin
TheShihan3-Sep-07 0:02
TheShihan3-Sep-07 0:02 
GeneralRe: Picture Control / Client Rectangle Pin
chandu0043-Sep-07 0:13
chandu0043-Sep-07 0:13 
Questionmsi.lib Pin
himanshu p taunk2-Sep-07 22:58
himanshu p taunk2-Sep-07 22:58 
AnswerRe: msi.lib Pin
Hamid_RT3-Sep-07 0:07
Hamid_RT3-Sep-07 0:07 
QuestionCan anyone tell me whats wrong with this mime format Pin
monsieur_jj2-Sep-07 21:17
monsieur_jj2-Sep-07 21:17 

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.