make a window view active

I need to make a view window active (by having the focus set to it).  I am using the following code but it won't activate the window:

mdlView_setFunction (UPDATE_POST, viewUpdate);

Private int viewUpdate()

{

MSWindow *current;

int activeView,myView;

current =mdlWindow_getInputFocus();

for (current = mdlWindow_getFirst(); current;

current = mdlWindow_getNext(current)) {

mdlWindow_isView(&activeView, current);

if (activeView == myView) {

mdlWindow_setInputFocus(current, TRUE, FALSE);

break;

}

 

The mdlWindow_setInputFocus doesn't set the focus to my window.  I know I have the right window because I can do

mdlWindow_hide and the right window will hide.  So how can I get focus to it?


Parents Reply Children