Child window not getting invalidated when the parent window has CLIP_CHILDREN and CLIP_SIBLINGS style - visual-c++

In my Application, there is a modeless dialog box which has one static control and some customized controls - Edit box, buttons. Actually we are enhancing the functionality of this dialog and added 2 more static controls. The dialog box has CLIP_SIBLINGS and CLIP_CHILDREN styles.
The Problem I am facing is in WinXP, when some other window gets overlapped on this dialog, every other control is getting painted properly except the newly added static controls. But there is no particular difference between the existing static controls and the ones I added.
This is solved with explicitly calling Invalidate method of the static control in dialog's OnPaint() method, but still I didn't get why the existing controls are painted fine.
I tried removing CLIP_CHILDREN style, then it worked fine but there is a lot of flickering.
Please help me understand the same, I have gone through so many threads relating to the same but I didn't find the answer.

Related

JavaFX GridLayoutPane with GridData.heightHint not updating unless Focus changes

I created a GridLayoutPane and want to set the size of its children programmatically. This is working fine and the sizes are set correct,
but they are not applied after beeing set automatically.
My first thought was that I might have to call .layout() on the Pane, but this has no result at all. Now I noticed that my heightHint (on the GridData) do get applied when I click on a TextField after generating the heightHint (so changing focus does the trick)
I try to get a look into the world of JavaFX
SWT was my default for years nowm but for several reasons I try to port my widgets to JavaFX.
GridLayoutPane http://efxclipse.bestsolution.at/doc/api/org/eclipse/fx/ui/panes/GridLayoutPane.html
is there a manual way to tell JavaFX to layout ALL nodes on a Pane?
layout()
layoutChildren()
requestLayout()
have no result!

XPAGE Modal Dialog [duplicate]

I am using the extlib Dialog component to display some data. I want the user to only close the dialog via a button I have in it.
I can't see any option to disable the close icon in the title bar. Can someone point me to the documentation on doing this? So far I've checked the wiki + extlib book (maybe I missed it?).
css rules, again! As far as I can see there's no "native" way to get rid of that close button (and to be honest, I don't think it's a really good idea to do so; see below). But using some css you of course can hide anything you want on your page.
Just give your dialog some custom styleClass; at runtime this custom class is then added to the dialog's outer div-container.
The close button itself is an link inside a span; the has tow style classes, one being "lotusClose".
Finally adding this piece of code to your style sheet will hide the button:
div.yourCustomClass a.lotusClose {display:none;}
Caveat:
The "close" button is there on purpose. And instead of hiding it I would rather add some kind of validation code to your dialog's close event. There are numerous examples, but maybe you just want to refer to dojotoolkit.org's reference for
dijit.Dialog
(section "Forms and Functionality in Dialogs).
Btw: since the dialog is based on dijit.Dialog you may also want to browse stackoverflow's dojo section.

SharePoint default modal dialog box not showing buttons

I've been doing searches trying to find help on this, but so far all I have found is how to set options for popping up a SharePoint modal dialog box from custom code.
However, I haven't created any custom web parts to display modal dialogs. What's happening, is if someone clicks the upload document button in a library, the upload document modal dialog comes up, but the ok and cancel buttons are half off of the bottom of the box. Users can click on them, but it just doesn't look very good.
I started playing with the CSS to make the modal dialog box bigger to reveal the buttons, and that works for the most part, but the real problem is the grant user permission dialog box.
When that is clicked, it doesn't show the ok and cancel buttons, and maximizing the dialog box doesn't reveal them. The user has to hit tab about 5-10 times before the focus moves to the ok button and is then clickable.
I would post an image, but I don't have enough reputation to do so.
Has anyone come across this? It seems very strange that the out of the box setting would have this problem.
The CSS that I use to adjust the height and width of the modal dialog is:
.ms-dlgFrame, .ms-dlgContent, .ms-dlgBorder, .ms-dlgFrameContainer
I'm just trying to set the height/min-height values, but I haven't had much luck.
We're using Internet Explorer 11 to view the pages.
Stevangelista actually pointed me in the right direction, I wish I could mark comments as answers, and since I'm new I can't upvote the comment, but here's the solution:
I am using a customized master page, and that comment had me take a look at the elements in the page.
Since the master page is being used in the dialog boxes as well, I used the s4-notdlg class to remove parts that weren't needed in the dialogs. Those parts were pushing the buttons below the bottom of the screen.
I'm not a css expert, so there may be ways of keeping those parts and still have the buttons accessible, but the particular issue I was trying to fix was resolved by using the s4-notdlg class to objects in my custom master page.

WinRT XAML - how to fix higlight issues?

When I'm testing my app on a mouse-driven device, I'm seeing a couple of odd highlight issues that I would like to try and resolve.
The first occurs when I call up the app bar, hover the mouse over a button (at which point the button goes grey) and then press Escape to dismiss the app bar. If I then call up the app bar again, the button has stayed grey, even if the mouse isn't over it, and remains in that state until I move the mouse over it and then away again.
I can't immediately see a property of the button that I can reset to clear that state when the app bar gets dismissed.
The other oddity I'm seeing is that sometimes the first item in the list on the page will get a box drawn around it:
This seems to happen when the app bar is being dismissed. I'm guessing that this is because the item is in a particular state that causes the box to appear but I'm not sure what state or how to clear it. The box does not appear during normal use of my app.
Thanks for any clarification or solutions you can provide.
I found a simple way to workaround this issue. In the code for Clicked/Tapped set Visibility of the button:
CreateNewDatabase.Visibility = Visibility.Collapsed;
CreateNewDatabase.Visibility = Visibility.Visible;
It will reset button state to Normal.
Hope this helps!
So, the issue is that the VisualState for the Button is being set to PointedOver, and then not being unset (because your mouse isn't leaving the bounds of the control and therefore triggering a PointerExited event). What this means is that you'll have to manually set the VisualState of the Button if you want it to change in this manner. You could do it on AppBar's Closed event. Basically, do a recursive check of all Children of the Content property of the AppBar using the VisualTreeHelper. Check to see if the Child is a Button. If it is, set its VisualState using VisualStateManager.GoToState().
I've also figured out what was causing the black box around the button - it is to indicate that the button has Focus.
The rather strange thing is that I'm not really sure why that specific button is getting focus or how a user is supposed to give focus to a button without it just randomly happening so, until I figure that out, I've decided to comment out the Focus state support from the Visual Manager XAML used in the default GridView item style.

Howto prevent a CFrameWnd from being mouse moved

I have an application that displays a CFrameWnd that is displayed on top of the main window. I need the window to be non-movable and non-resizable when the user selects a certain mode for the window.
My CFrameWnd is created with the styles WS_OVERLAPPEDWINDOW | WS_THICKFRAME | WS_POPUP
I have come across a solution using an overload of CWndOnNcHitTest to rewrite
HTLEFT,HTRIGHT,HTTOP,HTTOPLEFT,HTTOPRIGHT,HTBOTTOM,HTBOTTOMLEFT,HTBOTTOMRIGHT,HTSIZE,HTCAPTIONto HTBORDERto prevent the framework to recognize the areas responsible for sizing / moving.
This method works well for resizing in my case, but moving the window is still possible, although the hittest override works correctly (verified with traces).
Is there anything wrong in my approach, or could there be something interfering with this solution and if so, do you have any tips on where to look?
You should be able to make OnNcHitTest() work, don't return HTCAPTION.
Still, there's more than one way to move/size a window, you also have to worry about the system menu (type Alt+Space). Write a message handler for WM_MOVING and WM_SIZING and override the RECT so the window stays put.

Resources