"WxWidgets"의 두 판 사이의 차이

jjuiddong
이동: 둘러보기, 찾기
51번째 줄: 51번째 줄:
 
** http://stackoverflow.com/questions/3365269/method-to-quickly-set-up-event-forward-in-wxwidgets
 
** http://stackoverflow.com/questions/3365269/method-to-quickly-set-up-event-forward-in-wxwidgets
 
  canvas->ProcessEvent(aEvent);
 
  canvas->ProcessEvent(aEvent);
 +
* Ubuntu 에서 GetTickCount() 함수
 +
** http://stackoverflow.com/questions/2958291/equivalent-to-gettickcount-on-linux

2015년 4월 27일 (월) 20:56 판

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);                                    
		}
	}
}
canvas->ProcessEvent(aEvent);
개인 도구
이름공간

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