Package org.eclipse.swt.internal.win32

Examples of org.eclipse.swt.internal.win32.MSG


   *         successful, the id doesn't equals 0.
   */
  public static int getDeviceID(String path)
  {
    MCI_OPEN_PARMS parms = null;
    TCHAR strDeviceType = new TCHAR(0, MCI_DEVTYPE_CD_AUDIO, true);
    TCHAR strElementName = new TCHAR(0, path, true);
    int hHeap = Extension.GetProcessHeap();
    int byteCount = strDeviceType.length() * TCHAR.sizeof;
    int lpstrDeviceType = Extension
        .HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
    Extension.MoveMemory(lpstrDeviceType, strDeviceType, byteCount);

    byteCount = strElementName.length() * TCHAR.sizeof;
    int lpstrElementName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY,
        byteCount);
    Extension.MoveMemory(lpstrElementName, strElementName, byteCount);

    if (Extension.IsUnicode)
View Full Code Here


   *            specified window's className.
   * @return specified window handle.
   */
  public static int findWindow(String className)
  {
    return Extension.FindWindow(new TCHAR(0, className, true), null);
  }
View Full Code Here

   * @param windowName
   * @return handle of the found window if succeeds.
   */
  public static int findWindow(String className, String windowName)
  {
    TCHAR CLASSNAME = null;
    TCHAR WINDOWNAME = null;
    if (className != null) CLASSNAME = new TCHAR(0, className, true);
    if (windowName != null) WINDOWNAME = new TCHAR(0, windowName, true);
    return Extension.FindWindow(CLASSNAME, WINDOWNAME);
  }
View Full Code Here

    int lpWindowName = 0;
    int hHeap = Extension.GetProcessHeap();

    if (className != null)
    {
      TCHAR buffer = new TCHAR(0, className, true);
      int byteCount = buffer.length() * TCHAR.sizeof;
      lpClassName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
      Extension.MoveMemory(lpClassName, buffer, byteCount);
    }
    if (windowName != null)
    {
      TCHAR buffer = new TCHAR(0, windowName, true);
      int byteCount = buffer.length() * TCHAR.sizeof;
      lpWindowName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
      Extension.MoveMemory(lpWindowName, buffer, byteCount);
    }

    try
View Full Code Here

    return Extension.FlashWindowEx(flashInfo);
  }

  public static String getClassName(int handle)
  {
    TCHAR buffer = new TCHAR(0, 128);
    Extension.GetClassName(handle, buffer, buffer.length());
    return buffer.toString(0, buffer.strlen());
  }
View Full Code Here

   *
   * @return window class name.
   */
  public static String getWindowClassName(int handle)
  {
    TCHAR buffer = new TCHAR(0, 128);
    Extension.GetClassName(handle, buffer, buffer.length());
    return buffer.toString(0, buffer.strlen());
  }
View Full Code Here

  public static String getWindowText(int handle)
  {
    int length = Extension.GetWindowTextLength(handle);
    if (length == 0) return "";
    /* Use the character encoding for the default locale */
    TCHAR buffer = new TCHAR(0, length + 1);
    Extension.GetWindowText(handle, buffer, length + 1);
    return buffer.toString(0, length);
  }
View Full Code Here

  public static boolean setWindowText(int handle, String text)
  {
    if (text == null) SWT.error(SWT.ERROR_NULL_ARGUMENT);
    /* Use the character encoding for the default locale */
    TCHAR buffer = new TCHAR(0, text, true);
    return Extension.SetWindowText(handle, buffer);
  }
View Full Code Here

  public static final native boolean InitiateShutdownW(char[] info, int time, boolean force,
      boolean reboot);

  public static boolean InitiateShutdown(String info, int time, boolean force, boolean reboot)
  {
    TCHAR lpszInfo = new TCHAR(0, info, true);
    if (IsUnicode)
    {
      return InitiateShutdownW(lpszInfo.chars, time, force, reboot);
    }
    else
View Full Code Here

  public static final native int ExtractAssociatedIconW(int hint, char[] info, int index);

  public static int ExtractAssociatedIcon(int hint, String iconPath, int index)
  {
    TCHAR lpszInfo = new TCHAR(0, iconPath, true);
    if (IsUnicode)
    {
      return ExtractAssociatedIconW(hint, lpszInfo.chars, index);
    }
    else
View Full Code Here

TOP

Related Classes of org.eclipse.swt.internal.win32.MSG

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.