"WxWidgets"의 두 판 사이의 차이

jjuiddong
이동: 둘러보기, 찾기
(새 문서: * 이벤트 핸들링 (Event Handling) ** bind를 통해서도 이벤트를 핸들링 할 수 있다. ** wxMemMonitor 소스에서도 이 방식을 사용하고 있다. ** http://doc...)
 
 
(한 사용자의 중간의 편집 22개 숨겨짐)
1번째 줄: 1번째 줄:
 
+
* 프로젝트 속성창 등록
 +
** include directories (순서 중요)
 +
*** C:\wxWidgets-3.1.1\include
 +
*** C:\wxWidgets-3.1.1\include\msvc
 +
** library directories
 +
*** C:\wxWidgets-3.1.1\lib\vc_lib
 
* 이벤트 핸들링 (Event Handling)
 
* 이벤트 핸들링 (Event Handling)
 
** bind를 통해서도 이벤트를 핸들링 할 수 있다.
 
** bind를 통해서도 이벤트를 핸들링 할 수 있다.
 
** wxMemMonitor 소스에서도 이 방식을 사용하고 있다.
 
** wxMemMonitor 소스에서도 이 방식을 사용하고 있다.
 
** http://docs.wxwidgets.org/trunk/overview_events.html#overview_events_bind
 
** http://docs.wxwidgets.org/trunk/overview_events.html#overview_events_bind
 +
* Drag and Drop
 +
** http://forums.wxwidgets.org/viewtopic.php?f=1&t=34546
 +
** 어플리케이션에서 밖으로 드래그앤 드롭
 +
*** #include <wx/dnd.h> 해주자.
 +
*** http://blog.davenicholas.me.uk/2013/04/wxwidgets-drag-and-drop-tutorial.html
 +
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);                                   
 +
}
 +
}
 +
}
 +
 +
* [[Html 파싱]]
 +
* [[wxWidgets 실행인자값 가져오기]]
 +
* [[타이머 설정]]
 +
* [[wxListCtrl item select]]
 +
* [[클립보드 복사]]
 +
* [[윈도우 크기 조정]]
 +
* [[GDI 그래픽 출력]]
 +
* [[AUI]]
 +
* [[OpenGL 사용하기]]
 +
* [[wxWidgets TopMost 윈도우]]
 +
* [[wxWidgets Bitmap 출력]]
 +
* main link error
 +
** main() 함수가 없다고 링크에러가 뜨면 subsystem:console -> subsystem::windows 로 바꿔보자.
 +
* [[Ubuntu with wxWidgets]]
 +
* Event 발생시키는 법
 +
** http://stackoverflow.com/questions/3365269/method-to-quickly-set-up-event-forward-in-wxwidgets
 +
canvas->ProcessEvent(aEvent);
 +
* Ubuntu 에서 GetTickCount() 함수
 +
** http://stackoverflow.com/questions/2958291/equivalent-to-gettickcount-on-linux

2018년 9월 24일 (월) 11:57 기준 최신판

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);
개인 도구
이름공간

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