"WxWidgets"의 두 판 사이의 차이

jjuiddong
이동: 둘러보기, 찾기
6번째 줄: 6번째 줄:
 
* Drag and Drop
 
* Drag and Drop
 
** http://forums.wxwidgets.org/viewtopic.php?f=1&t=34546
 
** http://forums.wxwidgets.org/viewtopic.php?f=1&t=34546
 +
** 어플리케이션에서 밖으로 드래그앤 드롭
 +
*** http://blog.davenicholas.me.uk/2013/04/wxwidgets-drag-and-drop-tutorial.html
 
  DragAcceptFiles(true);
 
  DragAcceptFiles(true);
 
  Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MyFrame::OnDropFiles), NULL, this);
 
  Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MyFrame::OnDropFiles), NULL, this);
30번째 줄: 32번째 줄:
 
  }
 
  }
 
  }
 
  }
 +
 
* [[Html 파싱]]
 
* [[Html 파싱]]
 
* [[wxWidgets 실행인자값 가져오기]]
 
* [[wxWidgets 실행인자값 가져오기]]

2014년 5월 25일 (일) 21:32 판

DragAcceptFiles(true);
Connect(wxEVT_DROP_FILES, wxDropFilesEventHandler(MyFrame::OnDropFiles), NULL, this);
void MyFrame::OnDropFiles(wxDropFilesEvent& event)    
{
	if (event.GetNumberOfFiles() > 0) 
	{
		wxString* dropped = event.GetFiles();
		wxASSERT(dropped);

		wxBusyCursor busyCursor;
		wxWindowDisabler disabler;      
		wxBusyInfo busyInfo(_("Adding files, wait please..."));

		wxString name;
		wxArrayString files;
		for (int i = 0; i < event.GetNumberOfFiles(); i++) {
			name = dropped[i];
			if (wxFileExists(name))
				files.push_back(name);
			else if (wxDirExists(name))
				wxDir::GetAllFiles(name, &files);                                    
		}
	}
}
개인 도구
이름공간

변수
행위
둘러보기
도구모음