* * ActivatePrevInst() * * Tries to find and activate an already open Notepad2 Window * * ******************************************************************************/
| 5841 | * |
| 5842 | ******************************************************************************/ |
| 5843 | BOOL CALLBACK EnumWndProc ( HWND hwnd, LPARAM lParam ) |
| 5844 | { |
| 5845 | BOOL bContinue = TRUE; |
| 5846 | WCHAR szClassName[64]; |
| 5847 | if ( GetClassName ( hwnd, szClassName, COUNTOF ( szClassName ) ) ) |
| 5848 | if ( lstrcmpi ( szClassName, wchWndClass ) == 0 ) { |
| 5849 | DWORD dwReuseLock = GetDlgItemInt ( hwnd, IDC_REUSELOCK, NULL, FALSE ); |
| 5850 | if ( GetTickCount() - dwReuseLock >= REUSEWINDOWLOCKTIMEOUT ) { |
| 5851 | * ( HWND * ) lParam = hwnd; |
| 5852 | if ( IsWindowEnabled ( hwnd ) ) { |
| 5853 | bContinue = FALSE; |
| 5854 | } |
| 5855 | } |
| 5856 | } |
| 5857 | return ( bContinue ); |
| 5858 | } |
| 5859 | BOOL CALLBACK EnumWndProc2 ( HWND hwnd, LPARAM lParam ) |
| 5860 | { |
| 5861 | BOOL bContinue = TRUE; |
nothing calls this directly
no outgoing calls
no test coverage detected