cancel
Showing results for 
Search instead for 
Did you mean: 

STemWin switch between windows

totti001
Associate II
Posted on June 24, 2014 at 16:36

Hello everybody.

I have a problem with emWin library. I created 2 windows. At the first windows I have a button to switch to the another window. I use WM_SetFocus(win2) to switch. It working well. But when I want to switch back, it doesn'-t work. The display show the second window always.
2 REPLIES 2
rigomate2
Associate III
Posted on June 26, 2014 at 15:26

What do you call to switch it back?

If you call WM_SetFocus(win1), are you sure the win1 holds the correct handle?

totti001
Associate II
Posted on June 26, 2014 at 22:40

I checked and the handle is wrong.

So the program. I create 2 window with GUI builder, so the 2 window is a Dialog. A call CreateWin1 and I get the handler number 3 back. When I call WM_GetFocussed or WM_GetActiveWindow function, they return with handler number 2. I dont know why. So this was the problem.