Example #1
0
BOOL CALLBACK MainBoxCallback(HWND window,
                              UINT msg,
                              WPARAM param,
                              LPARAM param2) {
  switch(msg) {
    case WM_INITDIALOG:
      mainboxwindow = window;
      MainBoxDisplay(); // In this case, final touches to this window.
      ProgressBoxDisplay(); // Create the Progress Box at this time.
      return(FALSE); // And let Windows display this window.
      break;

    case WM_CLOSE: // The "X" in the upper right corner was hit.
      MainBoxCancelEvent();
      return(TRUE);
      break;

    case WM_COMMAND:
      // Do we wish to capture 'ENTER/RETURN' and/or 'ESC' here?

      switch(LOWORD(param)) {
        case IDC_0202: // Filename Edit Box
          MainBoxFileEvent(); // Describe the File's type...
          return(FALSE); // Let Windows handle the actual 'edit' processing...
          break;

        case IDC_0203: // "Browse" Button
          MainBoxBrowseEvent();
          return(TRUE);
          break;

        case IDC_0205: // "Ok" Button
          MainBoxOKEvent();
          return(TRUE);
          break;

        case IDC_0206: // "Get from Disc" Button
          MainBoxDeviceEvent();
          return(TRUE);
          break;

        case IDC_0207: // "Convert" Button
          MainBoxConversionEvent();
          return(TRUE);
          break;

        case IDC_0208: // "Cancel" Button
          MainBoxCancelEvent();
          return(TRUE);
          break;
      } // ENDSWITCH param- Which object got the message?
  } // ENDSWITCH msg- what message has been sent to this window?

  return(FALSE); // Not a recognized message? Tell Windows to handle it.
} // END MainBoxEventLoop()
Example #2
0
void MainBoxRefocus() {
  MainBoxFileEvent();

  // gtk_widget_set_sensitive(mainbox.file, TRUE);
  // gtk_widget_set_sensitive(mainbox.selectbutton, TRUE);
  // gtk_widget_set_sensitive(mainbox.okbutton, TRUE);
  // gtk_widget_set_sensitive(mainbox.devbutton, TRUE);
  // gtk_widget_set_sensitive(mainbox.convbutton, TRUE);
  // gtk_window_set_focus(GTK_WINDOW(mainbox.window), mainbox.file);
  // ShowWindow(mainboxwindow, SW_RESTORE); // and/or, SW_SHOW? SW_SHOWNORMAL?
  ShowWindow(mainboxwindow, SW_SHOW);
  SetActiveWindow(mainboxwindow);
} // END MainBoxRefocus()
Example #3
0
void MainBoxRefocus()
{
    GdkEvent event;

    MainBoxFileEvent(NULL, event, NULL);

    gtk_widget_set_sensitive(mainbox.file, TRUE);
    gtk_widget_set_sensitive(mainbox.selectbutton, TRUE);
    gtk_widget_set_sensitive(mainbox.startcheck, TRUE);
    gtk_widget_set_sensitive(mainbox.restartcheck, TRUE);
    gtk_widget_set_sensitive(mainbox.okbutton, TRUE);
    gtk_widget_set_sensitive(mainbox.devbutton, TRUE);
    gtk_widget_set_sensitive(mainbox.convbutton, TRUE);
    gtk_window_set_focus(GTK_WINDOW(mainbox.window), mainbox.file);
    gtk_window_deiconify(GTK_WINDOW(mainbox.window));
} // END MainBoxRefocus()