created button go out of preview pane border using resource editor - winapi

I have come across a problem when i created a buttons at preview pane using resource editor (visual c++). The problem is when i try to move the width of preview pane the button don't adjust themselves to be in preview pane according to the movement of the preview pane width. (i mean when i reduce the width of preview pane they go outside the border of the preview pane in right side)..
Could any one please give me the solution to come out of this problem ??? I also want to tell you that i already have one photo in the dialog box which already adjust itself to be in preview pane according to the moving preview pane (I mean photo don't create any problem just the buttons i created go outside the border of the preview pane) ..may be because for the photo we have SS_CENTERIMAGE which keeps the image in center but nothing like this for buttons
Please give me the solution i am doing in Visual C++ using createdialog using resource editor..

When a window size is changed that window receives the WM_SIZE message, with the new size. Handle that message in your preview pane, calculate new button positions, and use MoveWindow or SetWindowPos to move the buttons.

Related

How to make window content transparent just like [phw/peek]

I am new to swift and xcode, I want create a macos app just like peek (a screen GIF recorder).
Now I created a window with toolbar follow the tutorials. My question is, how to make the content area of the window be transparent, and ignore mouse event pass to the bottom of the window.
Thank you ^_^ !
This is the screenshot of peek:

How to change the orientation of the editor in Xcode?

Currently, the assistant editor is on the bottom view:
I've gone to View > Change Editor Orientation, but it doesn't change anything. It just looks as it did before. I'm working on a 13 inch display if that could be a reason. I would like the display to have the storyboard and assistant editor side by side.
Thanks!
View > Change Editor Orientation does change something.
Please look at the little icon at the top right side of the editor window.
By default the assistant editor is opened at the right side
After selecting View > Change Editor Orientation the editor is opened on the bottom .
You can change the orientation temporarily by holding the ⌥ key

Xcode: How to show Preview in separate window instead of showing in Assistant editor?

When I'm making edits in storyboard I know how to show the preview in the assistant editor (as shown in the below screen shot).
How to show the preview in a separate window, so that I'll be able to drag it to my the screen attached to my computer?
UPDATE: Adding few more images to clarify what is the "Storyboard Preview":
In XCode 7 I managed to do this by selecting File -> New window, then adding a preview-part teh same way you illustrate above. I then drag it to my secondary screen resize everything to give a good preview of the screen sizes I want.

How create transparent window in mac?

I am new to MAC development. I want to create a window with transparent. If i put the image or any control, the control only should display and window should not display and that window move horizontally or vertically within screen.
See Apple's sample project RoundTransparentWindow.

MFC: Scrollable Panel/Sub-windows containing controls

Whats the best way to create a 'scrollable panel' in MFC (C++) ? In the past I have displayed different windows "attached" or "on top" of my main dialog window as a means of display different pages of an application. What I want to do this time is create a panel of controls that can be scrolled (because the virtual size of the panel is bigger than the size of the panel itself).
Can anybody recommend any good articles or tutorials on how best to do this?
Thanks
You can create an independent scrollbar control on the side of your dialog. Respond to the messages in the dialog to move your controls. Since the child windows will crop themselves to the parent client area, feel free to move them completely off the dialog as they scroll off the page.
If you place the controls in a CScrollView or a CFormView they will be automatically scrollable inside the view area.

Resources