Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

Useful helpers
[Interfaces of MyWins module of MiniGUIExt library]

Data Structures

Typedefs

Functions


Detailed Description

This module defines some useful helpers, such as tool-tip window, progress window, and so on.

Typedef Documentation

typedef struct _myWinButton myWINBUTTON
 

Button info structure used by myWinMenu and myWinEntries function.

See also:
myWinMenu, myWinEntries

typedef struct _myWinEntry myWINENTRY
 

Entry info structure used by myWinEntries function.

See also:
myWinEntries


Function Documentation

HWND createProgressWin HWND  hParentWnd,
char *  title,
char *  label,
int  id,
int  range
 

Creates a main window within a progress bar.

This function creates a main window within a progress bar and returns the handle. You can call destroyProgressWin to destroy it.

Note that you can use SendDlgItemMessage to send a message to the progress bar in the main window in order to update the progress bar.

Parameters:
hParentWnd The hosting main window.
title The title of the progress window.
label The text in the label of the progress bar.
id The identifier of the progress bar.
range The maximal value of the progress bar (minimal value is 0).
Returns:
The handle to the progress window on success, HWND_INVALID on error.
See also:
destroyProgressWin

HWND createStatusWin HWND  hParentWnd,
int  width,
int  height,
char *  title,
char *  text,
  ...
 

Creates a status main window.

This function creates a status main window and returns the handle to it. You can call destroyStatusWin to destroy it. This function also receives printf-like arguments to format a string.

Parameters:
hParentWnd The hosting main window.
width The width of the status window.
height The height of the status window.
title The title of the status window.
text The format string.
Returns:
The handle to the status window on success, HWND_INVALID on error.
See also:
destroyStatusWin

HWND createToolTipWin HWND  hParentWnd,
int  x,
int  y,
int  timeout_ms,
const char *  text,
  ...
 

Creates a tool tip window.

This function creates a tool tip window and returns the handle to it. You can call destroyToolTipWin to destroy it. This function also receives printf-like arguments to format a string.

Note that the tool tip window will disappear automatically after the specified milliseconds by timeout_ms if timeout_ms is larger than 9 ms.

Parameters:
hParentWnd The hosting main window.
x The position of the tool tip window.
y The position of the tool tip window.
timeout_ms The timeout value of the tool tip window.
text The format string.
Returns:
The handle to the tool tip window on success, HWND_INVALID on error.
See also:
resetToolTipWin, destroyToolTipWin

void destroyProgressWin HWND  hwnd  ) 
 

Destroies progress window.

This function destroies the specified progress window hwnd, which is returned by createProgressWin.

Parameters:
hwnd The handle to the progress window.
See also:
createProgressWin

void destroyStatusWin HWND  hwnd  ) 
 

Destroies a status window.

This function destroies the specified status window hwnd, which is returned by createStatusWin.

Parameters:
hwnd The handle to the status window.
See also:
createStatusWin

void destroyToolTipWin HWND  hwnd  ) 
 

Destroies a tool tip window.

This function destroies the specified tool tip window hwnd, which is returned by createToolTipWin.

Parameters:
hwnd The handle to the tool tip window.
See also:
createToolTipWin

void errorWindow HWND  hwnd,
char *  str,
char *  title
 

A MiniGUI edition of perror.

This function creates a message box by using myMessageBox, and display the current system error message. You can consider it as an alternative of perror.

Parameters:
hwnd The hosting main window.
str The string will be appeared before the system error message.
title The title of the message box.
See also:
myMessageBox, perror(3)

int myMessageBox HWND  hwnd,
DWORD  dwStyle,
char *  title,
char *  text,
  ...
 

Creates a message box.

This function creates a message box calling MessageBox and passing hwnd, dwStyle and title to it. This function also receives printf-like arguments to format a string.

Parameters:
hwnd The hosting main window.
dwStyle The style of the message box.
title The title of the message box.
text The format string.
Returns:
Identifier of the button which closes the message box.
See also:
MessageBox, printf(3)

int myWinChoice HWND  hwnd,
char *  title,
char *  button1,
char *  button2,
char *  text,
  ...
 

Creates a message box within two buttons.

This function creates a message box hosted to the main window hwnd, displays a message and an application icon in the message box, and creates two buttons in it. This function also receives printf-like arguments to format a string.

This function can be used to prompt the user to choose one item between two.

Parameters:
hwnd The hosting main window.
title The title of the message box.
button1 The title of the first button.
button2 The title of the second button.
text The format string.
Returns:
Either 0 or 1, indicates the message box was closed by the first or second button.
See also:
myWinTernary, printf(3)

int myWinEntries HWND  hParentWnd,
const char *  title,
const char *  label,
int  width,
int  editboxwidth,
BOOL  fIME,
myWINENTRY items,
myWINBUTTON buttons
 

Creates a entry main window for the user to enter something.

This function creates a entry main window including a few buttons and a few entries.

When the user click one of the buttons, this function will return the identifier of the button which leads to close the menu window, and the entered strings.

Parameters:
hParentWnd The hosting main window.
title The title of the menu main window.
label The label of the entries.
width The width of the menu main window.
editboxwidth The width of the edit boxes.
fIME Whether active the IME window (obsolete).
items The pointer to the array of the entries, initial and returned.
buttons The buttons will be created.
Returns:
Returns the identifier of the button leading to close the menu window on success, else on errors.
See also:
myWINBUTTON, myWINENTRY

int myWinHelpMessage HWND  hwnd,
int  width,
int  height,
const char *  help_title,
const char *  help_msg
 

Creates a help message window.

This function creates a help message window including a scrollable help message and a spin box. When the user click the OK button, this function will return.

Parameters:
hwnd The hosting main window.
width The width of the help message window.
height The height of the help message window.
help_title The title of the window.
help_msg The help message.
Returns:
0 on success, -1 on error.

int myWinMenu HWND  hParentWnd,
const char *  title,
const char *  label,
int  width,
int  listboxheight,
char **  items,
int *  listItem,
myWINBUTTON buttons
 

Creates a menu main window for the user to select an item.

This function creates a menu main window including a few buttons, and a list box with checkable item.

When the user click one of the buttons, this function will return the identifier of the button which leads to close the menu window, and the selections of the items via listItem.

Parameters:
hParentWnd The hosting main window.
title The title of the menu main window.
label The label of the list box.
width The width of the menu main window.
listboxheight The height of the list box.
items The pointer to the array of the item strings.
listItem The pointer to the array of the check status of the items, initial and returned.
buttons The buttons will be created.
Returns:
Returns the identifier of the button leading to close the menu window on success, else on errors.
See also:
myWINBUTTON

int myWinMessage HWND  hwnd,
char *  title,
char *  button1,
char *  text,
  ...
 

Creates a message box within only one button.

This function creates a message box hosted to the main window hwnd, displays a message and an application icon in the message box, and creates a button which can be used to close the box. This function also receives printf-like arguments to format a string.

This function can be used to display a information for the user.

Parameters:
hwnd The hosting main window.
title The title of the message box.
button1 The text in the button.
text The format string.
Returns:
0 indicates the message box was closed by clicking the only button.
See also:
myWinChoice, printf(3)

int myWinTernary HWND  hwnd,
char *  title,
char *  button1,
char *  button2,
char *  button3,
char *  text,
  ...
 

Creates a message box within three buttons.

This function creates a message box hosted to the main window hwnd, displays a message and an application icon in the message box, and creates three buttons in it. This function also receives printf-like arguments to format a string.

This function can be used to prompt the user to choose one item among three choices.

Parameters:
hwnd The hosting main window.
title The title of the message box.
button1 The title of the first button.
button2 The title of the second button.
button3 The title of the third button.
text The format string.
Returns:
0, 1, or 2, indicates the message box was closed by the first, the second, or the third button.
See also:
myWinChoice, printf(3)

void resetToolTipWin HWND  hwnd,
int  x,
int  y,
const char *  text,
  ...
 

Resets a tool tip window.

This function resets the tool tip window specified by hwnd, including its position, text displayed in it, and the visible status. If the tool tip is invisible, it will become visible.

This function also receives printf-like arguments to format a string.

Parameters:
hwnd The tool tip window handle returned by createToolTipWin.
x The new position of the tool tip window.
y The new position of the tool tip window.
text The new format string.
See also:
createToolTipWin, destroyToolTipWin


Generated on Mon Jun 26 13:54:34 2006 for MiniGUI V1.6.9 API Reference by  doxygen 1.4.2