/* * SSDlgProc - callback routine for status bar settings drag & drop dialog */ WINEXPORT BOOL CALLBACK SSDlgProc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam ) { lparam = lparam; wparam = wparam; switch( msg ) { case WM_INITDIALOG: hSSbar = hwnd; MoveWindowTopRight( hwnd ); addSubclasses( hwnd ); return( TRUE ); case WM_CLOSE: removeSubclasses( hwnd ); hSSbar = NO_WINDOW; // update editflags (may have closed from system menu) EditFlags.SSbar = false; DestroyWindow( hwnd ); break; } return( FALSE ); } /* SSDlgProc */
/* * FtDlgProc - callback routine for font drag & drop dialog */ BOOL WINEXP FtDlgProc( HWND hwnd, UINT msg, UINT wparam, LONG lparam ) { static int inSELCHANGE = 0; static bool dontQuit = FALSE; char str[10]; int i; WORD cmd; lparam = lparam; wparam = wparam; hwnd = hwnd; switch( msg ) { case WM_INITDIALOG: hFontbar = hwnd; MoveWindowTopRight( hwnd ); initHwnds( hwnd ); fillTypefaceBox( hwnd ); setDefaultTypeface(); fillInfoBoxes( hwnd ); setDefaultSizeStyle(); if( setCurLogfont( 0 ) ) { InvalidateRect( hwndPick, NULL, TRUE ); UpdateWindow( hwndPick ); } return( TRUE ); case WM_CLOSE: doneWithHwnds(); DestroyWindow( hwnd ); hFontbar = (HWND)NULLHANDLE; // update editflags (may have closed from system menu) EditFlags.Fontbar = FALSE; break; case WM_COMMAND: cmd = LOWORD( wparam ); switch( cmd ) { case IDOK: if( dontQuit == TRUE ) { dontQuit = FALSE; break; } // fall through case IDCANCEL: EndDialog( hwnd, TRUE ); return( TRUE ); case FT_SIZE: case FT_STYLE: case FT_TYPEFACE: dontQuit = FALSE; if( GET_WM_COMMAND_CMD( wparam, lparam ) == CBN_SELCHANGE || GET_WM_COMMAND_CMD( wparam, lparam ) == LBN_SELCHANGE ) { inSELCHANGE++; if( cmd == FT_TYPEFACE ) { fillInfoBoxes( hwnd ); } if( (inSELCHANGE == 1) && setCurLogfont( 0 ) ) { InvalidateRect( hwndPick, NULL, TRUE ); UpdateWindow( hwndPick ); } inSELCHANGE--; return( 0 ); } break; } break; case DM_GETDEFID: /* Hack! User hit enter, so grab text from combo box edit control & attempt to update pick sample. */ if( (GetFocus() != hwndSizeEdit) || (SendMessage( hwndSize, CB_GETCURSEL, 0, 0L ) != CB_ERR) ) { break; } i = SendMessage( hwndSizeEdit, EM_GETLINE, 0, (LONG)str ); str[i] = '\0'; GetWindowText( hwndSizeEdit, str, 5 ); i = atoi( str ); if( (i != 0) && setCurLogfont( i ) ) { InvalidateRect( hwndPick, NULL, TRUE ); UpdateWindow( hwndPick ); } dontQuit = TRUE; return( TRUE ); } return( FALSE ); } /* FtDlgProc */