[Matroska-general] Re: [Matroska-users] mkvtoolnix 1.0.1 is out

Liisachan Liisachan at faireal.net
Sat Dec 18 01:33:49 CET 2004


Hi,

Moritz Bunkus <moritz at bunkus.org> wrote:

> > If this were just an Win app, then you could just disable 
> > all the editboxes, buttons etc while muxing by calling
> > EnableWindow()
> 
> Doesn't help (I've tried that) because this also disables its minimize
> box... (I can try again, maybe I've done something wrong)

You disabled the whole window (hWnd), right?
What I meant was, disabling each editboxes etc...
A checkbox, a editbox, a slidebar etc etc are all 'window's

// in main
EnableWindow( hEdit1, FALSE );
EnableWindow( hEdit2, FALSE );
...
EnableWindow( hBtn1, FALSE );
EnableWindow( hBtn2, FALSE );
...
EnableMenuItem( GetMenu( hWnd ), ID_MUX, MF_BYCOMMAND | 
MF_GRAYED );
...
// in dlg
EnableWindow( GetDlgItem( hDlg, iCtrlId ), FALSE );
...

Or something like this should work too:

// Don't mess with me while I'm muxing
while( flag_now_muxing )
{
  return DefWindowProc(hWnd, message, wParam, lParam);
}

> The dialog is created, it does all kinds of stuff inside its constructor
> and the makes itself modal with "ShowModal()". That's probably not how
> such a dialog is supposed to be implemented, though.

Maybe you had to do that so that the code would be 
cross-platform. If it were an ordinary Win app,
DialogBox() would make a modal dialog which would be
destroyed by EndDialog(),
while CreateDialog() would create a modeless dialog,
which would be destroyed by DestroyWindow().


> > Besides, a minimized window can be always restored by Explorer.
> > ???
> 
> Nope. I don't know why but right-clicking on the task bar entry didn't
> even show the context menu in that case.

Widnows is weird...altho there should be some good reasons.
Maybe you should make it modeless and use if(IsDialogMessage())
in the msg loop so that the both the main and the dlg can get 
its own messages.

Liisachan




More information about the Matroska-general mailing list