This method sets the priority level of the current thread within its priority class.
| Header file: | Afxwin.h |
| Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
| Windows CE versions: | 1.0 and later |
| Complete documentation: | Visual C++ documentation |
BOOL SetThreadPriority( int nPriority );
Windows CE does not support priority classes. The order in which threads are scheduled is determined only by their thread priorities. A thread can have one of the priority levels shown in the following table.
| Priority | Description |
|---|---|
| THREAD_PRIORITY_TIME_CRITICAL | 3 points above normal priority. |
| THREAD_PRIORITY_HIGHEST | 2 points above normal priority. |
| THREAD_PRIORITY_ABOVE_NORMAL | 1 point above normal priority. |
| THREAD_PRIORITY_NORMAL | Normal priority. |
| THREAD_PRIORITY_BELOW_NORMAL | 1 point below normal priority. |
| THREAD_PRIORITY_LOWEST | 2 points below normal priority. |
| THREAD_PRIORITY_ABOVE_IDLE | 3 points below normal priority. |
| THREAD_PRIORITY_IDLE | 4 points below normal priority. |
In Windows CE, a thread with a priority level of THREAD_PRIORITY_TIME_CRITICAL will execute until it explicitly yields processing to other threads. Processing of these threads is not yielded to other threads, even if another thread also has the THREAD_PRIORITY_TIME_CRITICAL priority level.