Mercurial > dwindows
comparison win/dw.c @ 1795:9304241b7b33
Added new dw_window_set_focus() function and attempted to fix...
Intial focus after a subsequent dw_window_show() on Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 24 Sep 2012 23:24:25 +0000 |
parents | b0bdec1b820c |
children | 7f549994b633 |
comparison
equal
deleted
inserted
replaced
1794:97b1edb41d44 | 1795:9304241b7b33 |
---|---|
11594 *year = *month = *day = 0; | 11594 *year = *month = *day = 0; |
11595 } | 11595 } |
11596 } | 11596 } |
11597 | 11597 |
11598 /* | 11598 /* |
11599 * Sets the current focus item for a window/dialog. | |
11600 * Parameters: | |
11601 * handle: Handle to the dialog item to be focused. | |
11602 * Remarks: | |
11603 * This is for use after showing the window/dialog. | |
11604 */ | |
11605 void API dw_window_set_focus(HWND handle) | |
11606 { | |
11607 SetFocus(handle); | |
11608 } | |
11609 | |
11610 /* | |
11599 * Sets the default focus item for a window/dialog. | 11611 * Sets the default focus item for a window/dialog. |
11600 * Parameters: | 11612 * Parameters: |
11601 * window: Toplevel window or dialog. | 11613 * window: Toplevel window or dialog. |
11602 * defaultitem: Handle to the dialog item to be default. | 11614 * defaultitem: Handle to the dialog item to be default. |
11615 * Remarks: | |
11616 * This is for use before showing the window/dialog. | |
11603 */ | 11617 */ |
11604 void API dw_window_default(HWND window, HWND defaultitem) | 11618 void API dw_window_default(HWND window, HWND defaultitem) |
11605 { | 11619 { |
11606 Box *thisbox = (Box *)GetWindowLongPtr(window, GWLP_USERDATA); | 11620 Box *thisbox = (Box *)GetWindowLongPtr(window, GWLP_USERDATA); |
11607 | 11621 |