개발메모(형식에 매이지 않는 짤막한 개발 낙서)

글 수 174
허창원 *.68.47.62
윈도를 옮기거나 크기를 변경해도 타이머 호출 유지하려면
즉, "event-blocking conditions" 에서도 타이머 콜백함수가 호출될 수 있도록 하는 것

    // "event-blocking conditions" 에서도 타이머 콜백함수가 호출될 수 있도록 하기 위해
        SetSystemAttribute (ATTR_ALLOW_UNSAFE_TIMER_EVENTS, TRUE);


이라고 해주면 되네요....

-----------------------------------------------
ATTR_ALLOW_UNSAFE_TIMER_EVENTS
Type: System attribute
Description: By default, timer control callbacks do not occur while you are moving or sizing a window, while the system menu is pulled down, or while the Alt-Tab key is pressed. (These are called "event-blocking conditions.") You can use this attribute to enable timer events under some, but not all, of the event-blocking conditions. If you set this attribute to TRUE, timer events are blocked only under the following conditions: (1) You have clicked on a window title bar, you are holding the mouse button down, but you are not moving the mouse. (2) You are moving or resizing a window, and the Windows "Show Window Contents While Dragging" option is disabled.

There are several limitations to this feature. One limitation is that while an event-blocking condition is in effect, timer callbacks are called no faster than once per 55 milliseconds.

Another limitation is that if a timer callback is called during an event-blocking condition and the callback causes events to be processed, mouse and keyboard input can behave erratically. Your program can cause this to happen in the following ways. (1) The timer callback function calls ProcessSystemEvents in a loop. (2) The timer callback function calls RunUserInterface, GetUserEvent, or a popup panel function such as MessagePopup or FileSelectPopup. (3) Program execution is suspended in the timer callback function because of a breakpoint or run-time error.

In either case, the system functions normally once the timer callback returns.

This problem is inherent to Windows and occurs regardless of the development environment.

You should not enable this attribute until the code in your timer callbacks has been thoroughly debugged. The behavior of the system is undefined if you hit a breakpoint or run-time error when an event-blocking condition is in effect.

0 = Do not allow unsafe timer events.

1 = Allow unsafe timer events.
Data Type: integer
Default Value: 0

Values
0 False
1 True

-----------------------------------------------



2009.6.11
허창원
List of Articles
번호 제목 글쓴이 날짜 조회 수
154 NI의 CVI 웹페이지 허창원 2009-10-01 5672
153 카운터에 대한 68핀 M 시리즈 신호연결 허창원 2009-09-12 4519
» 윈도를 옮기거나 크기를 변경해도 타이머 호출 유지하려면 허창원 2009-06-11 5003
151 그래프의 Y-Axis Activate 허창원 2009-04-14 4465
150 그래프 X축에 날짜, 시간 표시 file 허창원 2009-04-07 5597
149 그래프의 Zoom/Panning (LabWindows/CVI 8.5.1 현재) 허창원 2009-04-07 4788
148 [메모] VC++와 CVI의 RGB 핸들링 허창원 2009-04-02 4359
147 [팁] 테이블 추가후 특정 셀을 에디트 상태로 바로 전환 file 허창원 2009-01-20 5213
146 [팁링크] Enable CVI Warning When Executing in Release Configuration 허창원 2009-01-14 4977
145 [링크] Internet Library Error Conditions 허창원 2009-01-09 4135
144 텍스트 데이터를 불러오는 간단한 예 허창원 2009-01-09 4511
143 [링크] 다양한 다기능 DAQ 보드들에 대해서 최대 입력 범위들는 어떻게 됩니까? 허창원 2008-12-11 6213
142 C 구조체 내에서 멤버 함수를 사용할 때 this 포인터를 이용할 수 있는 방안 구현 가능성에 대해 [1] 허창원 2008-11-27 6184
141 [함수] Proc_DisplayPanel_During() 허창원 2008-11-08 4126
140 [메모] 문자열 대체 노가다 작업을 줄이기 위해... [1] 허창원 2008-08-06 4794
139 그래프에서 여러 선을 그릴 때 색깔 구분의 예(색상코드 메모) file 허창원 2008-08-03 3939
138 [메모] Dev1/ai0:8 이런 문자열에서 채널수를 뽑아내는 처리 허창원 2008-08-03 3408
137 [메모] 컨트롤마다 갱신되는데 걸리는 시간을 측정해보자, 나중에. 허창원 2008-08-02 2933
136 [예2] Panel을 띄울때 기준 Panel에 대해 가운데로 위치시키되 처음만... file 허창원 2008-08-02 3246
135 [예] Panel을 띄울때 기준 Panel에 대해 가운데로 위치시키되 처음만 file [1] 허창원 2008-08-02 2986