getDialogHandle

Syntax

int* getDialogHandle()

Returns

A handle to the main dialog window.

Description

Gets the window handle of the filter dialog window.

Example

// This code loads the user32.dll
// DLL included with Windows and
// uses it to hide and show the
// main filter window.
  
int* lib_user32;
int* functionPointer;
int* dialogHandle;
int returnval;

// Load the DLL library
lib_user32 = loadLib("user32");
if (lib_user32) {

  // Get the function in the DLL
  functionPointer = getLibFn(lib_user32, "ShowWindow");
  if (functionPointer) {

    // Get the handle of the dialog
    dialogHandle = getDialogHandle();

    // Call the function to hide the dialog window
    msgBox(MB_OK, "Hiding...", "About to hide main dialog window");
    returnval = callLib(functionPointer, dialogHandle, SW_HIDE);

    // Call the function to show the dialog window
    msgBox(MB_OK, "Showing...", "About to show dialog window again");
    returnval = callLib(functionPointer, dialogHandle, SW_SHOW);

  }
  else msgBox(MB_OK, "Error", "Function wasn't loaded");

  // Free the library DLL
  freeLib(lib_user32);

}
else msgBox(MB_OK, "Error", "DLL was not loaded");

See Also

getCtlHandle

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.