i have a main window with text output which does some things, and i need to display a dialog with progressbar indicating some process. well, i create the dialog with CreateDialogParam(), it goes well with one "but": i cannot set focus to this dialog. i tried everything i think: SetActiveWindow(), SetForegroundWindow(), SetFocus() -- nothing helps. the main window still has the focus, it is active and gets all keyboard input, and dialog box draws on top of the main window but is inactive until i implicitly bring it to focus (i.e. clicking on it). i'd like it to be other way around: the dialog to have focus and get all input. well, of course i can check this state in main window's message processing and shred all keyboard input but i think it will be a kludge. there got to be more elegant way. can anybody help me with this?