Click here to Skip to main content
16,011,120 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 5:47
youpiyoyo6-Jul-04 5:47 
AnswerRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 6:07
palbano6-Jul-04 6:07 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 6:10
youpiyoyo6-Jul-04 6:10 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 6:29
palbano6-Jul-04 6:29 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo6-Jul-04 11:42
youpiyoyo6-Jul-04 11:42 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
palbano6-Jul-04 15:54
palbano6-Jul-04 15:54 
GeneralRe: how can I catch WM_DROPFILES from a list view control's in api win32 Pin
youpiyoyo7-Jul-04 5:55
youpiyoyo7-Jul-04 5:55 
GeneralMoveWindow problem Pin
BlackDice6-Jul-04 5:31
BlackDice6-Jul-04 5:31 
I have a dialog with a picture box control on it. Within the picturebox I dynamically draw a CListCtrl object at a random position when the user clicks a button. Now I'm using a CRectTracker object to allow the user to resize and/or move the control. The problem is that when it gets the rect of the control, it gets it relative to the control itself, but when I call the control's MoveWindow function using those coordinates, it moves it relative to the parent window's coordinates, so that if I only move it over to the right one pixel, it moves it to the left coordinate of 1 for the parent window. I've tried using ScreenToClient, ClientToScreen, and I can't seem to get this to work right. Any help would be greatly appreciated.

Here's what I have so far in my control's OnLbuttonDown MessageHandler:

if (m_tracker)
	{
		m_tracker->Track(this, point, FALSE,(CWnd*)&m_pDlg->m_picWindow  );
		Invalidate(FALSE);		
		CDC* pDC = GetDC();
		m_tracker->Draw(pDC);

		LPRECT rect = new RECT;
		CWnd* wnd = (CWnd*)this;
		rect = LPRECT(m_tracker->m_rect); 
        LPRECT rect2 = new RECT;
        LPRECT rect3 = new RECT;
        m_pDlg->m_picWindow.GetWindowRect(rect3);
        this->GetWindowRect(rect2);
       
		wnd->MoveWindow(rect,TRUE) ;
		delete rect;
		rect = NULL;	
        
	}
    CListCtrl::OnLButtonDown(nFlags, point);


If it's broken, I probably did it

bdiamond
GeneralRe: MoveWindow problem Pin
0v3rloader6-Jul-04 5:44
0v3rloader6-Jul-04 5:44 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 6:01
BlackDice6-Jul-04 6:01 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 6:24
palbano6-Jul-04 6:24 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 6:31
BlackDice6-Jul-04 6:31 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 6:45
palbano6-Jul-04 6:45 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 7:04
BlackDice6-Jul-04 7:04 
GeneralRe: MoveWindow problem Pin
palbano6-Jul-04 9:52
palbano6-Jul-04 9:52 
GeneralRe: MoveWindow problem Pin
BlackDice6-Jul-04 10:16
BlackDice6-Jul-04 10:16 
GeneralService pack 6 and serialization Pin
Salvador Dali6-Jul-04 5:16
Salvador Dali6-Jul-04 5:16 
GeneralRe: Service pack 6 and serialization Pin
Navin6-Jul-04 7:04
Navin6-Jul-04 7:04 
GeneralRe: Service pack 6 and serialization Pin
Ravi Bhavnani6-Jul-04 10:52
professionalRavi Bhavnani6-Jul-04 10:52 
GeneralIHTMLTxtRange::moveToBookmark Pin
*Dreamz6-Jul-04 4:59
*Dreamz6-Jul-04 4:59 
Generalcrystal reports 10 in unmanaged c++ in vs.net 2003 Pin
Irish_GUI6-Jul-04 4:18
Irish_GUI6-Jul-04 4:18 
GeneralRe: crystal reports 10 in unmanaged c++ in vs.net 2003 Pin
Antony M Kancidrowski6-Jul-04 4:49
Antony M Kancidrowski6-Jul-04 4:49 
GeneralRe: crystal reports 10 in unmanaged c++ in vs.net 2003 Pin
Michael P Butler6-Jul-04 8:38
Michael P Butler6-Jul-04 8:38 
GeneralMRU Files in Dialog Program Pin
sweep1236-Jul-04 3:41
sweep1236-Jul-04 3:41 
GeneralMRU Files for MFC Dialog Program Pin
sweep1236-Jul-04 3:39
sweep1236-Jul-04 3:39 

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.