- Main Page
- Packages
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# smjg.libs.sdwf.application.Application Class Reference

The smjg.libs.sdwf.application.Application class represents the SDWF application as a whole. More...

List of all members.

## Public Member Functions
| this ()
| Constructs the Application object.
| this (HINSTANCE h)
| Constructs an Application object to refer to another application instance by handle.
int | run ()
| Runs the application.
HICON | icon (uint id)
| Loads a specified icon resource.
HICON | icon (string name)
| Loads a specified icon resource.
HCURSOR | cursor (uint id)
| Loads a specified mouse cursor resource.
HCURSOR | cursor (string name)
| Loads a specified mouse cursor resource.
char[] | stringTable (uint id)
| Loads a string from a string table resource.
Properties
final uint | toHash ()
| Returns the hash value of this Application.
HINSTANCE | handle ()
| The Windows handle to the application instance represented by this Application object.
WindowBase | mainWindow ()
| The application's main window.
WindowBase | mainWindow (WindowBase w)
| The application's main window.
Operators
final int | opEquals (Object o)
final int | opEquals (Application a)

## Detailed Description

The smjg.libs.sdwf.application.Application class represents the SDWF application as a whole.

## Constructor & Destructor Documentation

smjg.libs.sdwf.application.Application.this | ( |  | ) |

Constructs the Application object.

The correct instance handle for the process is automagically set.

Status:
  done

smjg.libs.sdwf.application.Application.this | ( | HINSTANCE | h | ) |

Constructs an Application object to refer to another application instance by handle.

Parameters:

  | h | handle of the application instance.

## Member Function Documentation

final uint smjg.libs.sdwf.application.Application.toHash | ( |  | ) |

Returns the hash value of this Application.

Returns:
  the hash value, defined as the application's instance handle.

Since:
  0.4

HINSTANCE smjg.libs.sdwf.application.Application.handle | ( |  | ) |

The Windows handle to the application instance represented by this Application object.

You would use this property if you need to call a Windows API function directly on the application instance.

Status:
  done

WindowBase smjg.libs.sdwf.application.Application.mainWindow | ( |  | ) |

The application's main window.

Status:
  done

WindowBase smjg.libs.sdwf.application.Application.mainWindow | ( | WindowBase | w | ) |

The application's main window.

This property must be set before running the application.

Precondition:
  It is illegal to set `mainWindow` more than once.

Status:
  done

final int smjg.libs.sdwf.application.Application.opEquals | ( | Object | o | ) |

Determines whether this Application is equal to another object.

Since:
  0.4

final int smjg.libs.sdwf.application.Application.opEquals | ( | Application | a | ) |

Determines whether this Application is equal to another Application. Two Application objects are equal iff they have the same handle, i.e. they interface the same application instance.

Since:
  0.4

int smjg.libs.sdwf.application.Application.run | ( |  | ) |

Runs the application.

Displays the application's main window, and runs the message loop. Blocks until the application is finished.

Precondition:
  the Application.mainWindow property must have been set.

Returns:
  the application's exit code. This exit code is seldom meaningful, but should be returned ultimately from WinMain.

Status:
  done

HICON smjg.libs.sdwf.application.Application.icon | ( | uint | id | ) |

Loads a specified icon resource.

Parameters:

  | id | numeric ID of the icon resource.

Returns:
  a handle to the loaded icon.

HICON smjg.libs.sdwf.application.Application.icon | ( | string | name | ) |

Loads a specified icon resource.

Parameters:

  | name | name of the icon resource.

Returns:
  a handle to the loaded icon.

HCURSOR smjg.libs.sdwf.application.Application.cursor | ( | uint | id | ) |

Loads a specified mouse cursor resource.

Parameters:

  | id | numeric ID of the cursor resource.

Returns:
  a handle to the loaded cursor.

HCURSOR smjg.libs.sdwf.application.Application.cursor | ( | string | name | ) |

Loads a specified mouse cursor resource.

Parameters:

  | name | name of the cursor resource.

Returns:
  a handle to the loaded cursor.

char [] smjg.libs.sdwf.application.Application.stringTable | ( | uint | id | ) |

Loads a string from a string table resource.

Since:
  0.4

Status:
  done

The documentation for this class was generated from the following file:

- application.d