If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
-
xpz
- Earned a small fee

- Posts: 10
- Joined: Sun Sep 23, 2007 10:51 pm
Post
by xpz » Sat Feb 21, 2009 6:33 am
Whether there is a way to make the application with higher priority.
The thread has wxThread::SetPriority(). How to do it for an application through wxWidget function?
If use windows function SetPriorityClass(), it need "HANDLE hProcess", how to get it in wxWidgets?
-
Romas
- I live to help wx-kind

- Posts: 176
- Joined: Mon Jun 16, 2008 11:07 am
- Location: Kaunas
Post
by Romas » Sat Feb 21, 2009 8:41 am
Hey,
If you use SetPriorityClass (which is part of WinAPI), then you might want to use GetCurrentProccess

-
venkat_sp
- Earned a small fee

- Posts: 16
- Joined: Mon Sep 08, 2008 2:20 pm
Post
by venkat_sp » Mon Feb 23, 2009 9:59 am
You can use GetCurrentProcess() which will return the handle.
-
computerquip
- Experienced Solver

- Posts: 72
- Joined: Fri Feb 20, 2009 7:13 pm
- Location: $(#wx)\src
Post
by computerquip » Mon Feb 23, 2009 1:07 pm
-jsmith
If you are using Linuxthreads (pthreads, ie, not NPTL) then you could exploit the non-POSIX compliance of the library by calling sched_setscheduler() or setpriority()
(man 2 sched_setscheduler or man 2 setpriority).