Recently in do one thing, that is, in an open source code always add some statements, a window will be displayed after the open source code to compile, inside the window is render data to a file, it USES a lot of opengl function, now, the teacher asked me to add a little ball in this window, then the ball position in the window through the hardware available, now that I've can get the position information of ball from the hardware, I think in this program in one thread, real-time acquisition and display to the position of the ball, there are a lot of people say, a multi-threaded with HDC and HRC, but as they say no, because the ball should be placed inside the main thread to create the window, so the child thread cannot build window, but not to create a window, the glutDisplayFunc (display); There is an error, you will be prompted: QSplatWin32. 0 x1000bbae place an unhandled exception in the exe: 0 xc0000005: when writing position 0 x000000a8 access conflict, asked master to a solution, with other methods, thank you,
CodePudding user response:
Estimates is the pointer to access illegal address ~ ~