Hi,
The first "problem" is that there's no title, it's empty. Your title bar IS visible, but maybe, since this is a response window, the background is white on windows 10. (you can change those preferences using win10 colour settings btw).
For the rest, those other controls are not visible on response windows, unless you do something with windows API functions such as SetWindowPos().
Have a look at PFC classes: pfcmain.pbl - pfc_w_response. It has some attributes named:
Protected:
Boolean #ControlMenu = TRUE
Boolean #MinBox = FALSE
Boolean #MaxBox = FALSE
Boolean #CloseBox = TRUE
Boolean #Resizable = FALSE
When you inherit a window from w_response you'll see those properties as checkboxes in the properties down below the other properties:
You don't have to also mark the 'normal' checkbox for "controlmenu" for them to work (if I remember well), so if it looks like in the image below, you have to 'uncheck' that box:
If you do a search on for example "#controlmenu" in the pfc_w_response window, you'll see how they work.
Here's the code of the pfc_preopen event:
/////////////////////////////////////////////////////////////////////////
//
// Event: pfc_preOpen
//
// Arguments: None
//
// Returns: None
//
// Description: Triggered from the top of the open event.
//
/////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version 12.5 Initial version, provide ability to
// make a response window resizable.
// 12.5 Adjust size of window when resizable is
// set to true. Border is thicker for
// resizable windows.
/////////////////////////////////////////////////////////////////////////
//
// Open Source PowerBuilder Foundation Class Libraries
//
// Copyright (c) 2004-2017, All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted in accordance with the MIT License
//
//
// https://opensource.org/licenses/MIT
//
// This software consists of voluntary contributions made by many
// individuals and was originally based on software copyright (c)
// 1996-2004 Sybase, Inc. http://www.sybase.com. For more
// information on the Open Source PowerBuilder Foundation Class
// Libraries see https://github.com/OpenSourcePFCLibraries
//
/////////////////////////////////////////////////////////////////////////
// The default for the controlMenu property on pfc response windows is
// FALSE. Only do resize logic if developer has not changed the
// controlMenu property.
IF NOT controlMenu THEN
unsignedLong lul_hWnd
lul_hWnd = Handle(this)
n_cst_winSrv_style lnvo_style
lnvo_style = CREATE n_cst_winSrv_style
f_setPlatForm(invo_platForm, TRUE)
// Window is resizable
IF #Resizable THEN
lnvo_style.of_style(lul_hWnd, invo_constants.WS_THICKFRAME, TRUE)
lnvo_style.of_style_extended(lul_hWnd, invo_constants.WS_EX_DLGMODALFRAME, FALSE)
// Adjust window size to include new thicker border style
Long ll_xExpand
ll_xExpand = invo_platForm.of_getSystemMetrics(invo_constants.SM_CXSIZEFRAME) &
- invo_platForm.of_getSystemMetrics(invo_constants.SM_CXDLGFRAME) + 2
Long ll_yExpand
ll_yExpand = invo_platForm.of_getSystemMetrics(invo_constants.SM_CYSIZEFRAME) &
- invo_platForm.of_getSystemMetrics(invo_constants.SM_CYDLGFRAME)
Width = Width + PixelsToUnits(ll_xExpand * 2, XPixelsToUnits!)
Height = Height + PixelsToUnits(ll_yExpand * 2, YPixelsToUnits!)
END IF
// Developer requested a controlMenu
IF #controlMenu THEN
// Add the default system menu
lnvo_style.of_style(lul_hWnd, invo_constants.WS_SYSMENU, TRUE)
UnsignedLong lul_Menu
lul_menu = invo_platForm.GetSystemMenu(lul_hWnd, FALSE)
// Minimize Box
IF #minBox THEN
lnvo_style.of_style(lul_hWnd, invo_constants.WS_MINIMIZEBOX, TRUE)
ELSE
invo_platForm.DeleteMenu(lul_Menu, invo_constants.SC_MINIMIZE, invo_constants.MF_BYCOMMAND)
END IF
// Maximize Box
IF #maxBox THEN
lnvo_style.of_style(lul_hWnd, invo_constants.WS_MAXIMIZEBOX, TRUE)
ELSE
invo_platForm.DeleteMenu(lul_Menu, invo_constants.SC_MAXIMIZE, invo_constants.MF_BYCOMMAND)
END IF
// Restore is not needed if there is no minimize nor maximize
IF NOT (#maxBox OR #minBox) THEN
invo_platForm.DeleteMenu(lul_Menu, invo_constants.SC_RESTORE, invo_constants.MF_BYCOMMAND)
END IF
// Size is not needed if the window is not resizable
IF NOT (#resizable) THEN
invo_platForm.DeleteMenu(lul_Menu, invo_constants.SC_SIZE, invo_constants.MF_BYCOMMAND)
END IF
// Turn off/disable the system menu's close. There is also
// code in ue_sysCommand to prevent Alt-F4 from closing the
// window when the closeBox is not requested.
IF NOT #closeBox THEN
invo_platForm.DeleteMenu(lul_Menu, invo_constants.SC_CLOSE, invo_constants.MF_BYCOMMAND)
invo_platForm.DeleteMenu(lul_menu, invo_platForm.GetMenuItemCount(lul_menu) - 1, invo_constants.MF_BYPOSITION)
END IF
END IF
// Force Redraw
invo_platForm.SetWindowPos(lul_hWnd, 0, 0, 0, 0, 0, invo_constants.SWP_NOSIZE + invo_constants.SWP_NOMOVE + invo_constants.SWP_NOZORDER + invo_constants.SWP_FRAMECHANGED)
invo_platForm.DrawMenuBar(lul_hWnd)
DESTROY lnvo_style
END IF
Whatever is tried with the "thick border" in the above code no longer works on windows 8 and 10.
For the rest of the API declarations like DeleteMenu, SetWindowPos(), DrawMenuBar() etc. please download the latest pfc classes and have a look at the platform objects used in this code. https://github.com/OpenSourcePFCLibraries
regards,
MiguelL