06-17-2010 04:52 PM
Hello everyone,
I want to move a panel using a thread created with CmtScheduleThreadPoolFunction().
The panel was created in main() function and when start my thread I got this message:
NON-FATAL RUN-TIME ERROR: "OnePanel.c", line 157, col 9, thread id 0x0000085C, function id 1: Library function error (return value == -129 [0xffffff7f]). This panel operation can be performed (if a top-level panel) only in the thread in which the panel was created, or (if a child panel) only in the thread in which the top-level parent panel was created.
I can't create my panel from my thread. Another solution?
Thanks
Daniele
06-17-2010 05:01 PM
06-18-2010 04:12 AM
Additionally, to move a panel you can use a single SetPanelPos instead of setting left and top attributes in 2 different instructions.
06-22-2010 01:41 AM
Grazie Roberto.
05-11-2015 08:53 PM
Can you expand on the solution?
I'm having the the same error message when trying to move a panel with SetPanelPos() from one monitor to other (in extended desktop configuration ).
It seems the problem is caused when I select as the front window one from another program (through ALT+TAB) before the SetPanelPos function is called.
I tried to google on the difference between a functiona nd a thread, but it will take a while to understand.
Please explain me why that simple, harmless function call may fatally fail like in my unresolved case.
Can this happen if the second monitor (where the pixel position given to the function as attributes is located) is not powered or something like that?
05-12-2015 01:37 AM - edited 05-12-2015 01:48 AM
Hello Sincrono,
your question seems totally unrelated with the original one. The poster opened this discussion about a very specific error in a multithreaded scenario, while from one of your sentences you seem unaware of multithreading issues.
I suggest you open a new thread instead, where you can give us some informations more about your problem so that somebody can share his experience:
- expected vs. actual behavior
- boundary conditions
- errors received, if any ('cause you are trapping UI errors, aren't you?)
- the relevant code you are using
- execution scenario (your note about dual-monitor environment can be crucial)
08-25-2015 02:19 PM