Create a new window in another program - visual-c++

I'm making a .dll plug-in for a program which will get some informations from the running program. Now i have to do a little graphical part: a window(same style of the program windows and popups) with a couple of buttons with specific functions where i present a list with some informations i calculate from the program.
I'm working with MFC so i think i should use the classes like CRect, CBrush,CPen,etc but that seems like it's too much work with a big learning curve.
I spent all day searching for a good solution and i'm lost. What do you think is the best solution for making a child window alike the program that window is in?
Thank you

Make your window in the visual dialog editor, with the buttons etc. placed on it from the toolbar. Then use "Add Class" to create a class derived from CDialog for your window. For learning purposes create a "dialog based" MFC program to learn how to make a dialog work.

Related

How should I create a desktop mockup?

I want to create a desktop mockup on Elementary OS 0.2. By "mockup" I mean something that shows off the aesthetic of the mockup, mostly just showing what selecting/clicking/hovering over a button or widget does to that particular part of the UI. I'm thinking about creating the various parts on GIMP and coding animation and transition logic into the final result. I know that something like this can be done in HTML/JS, but I want to avoid using those. Is there anything optimized for a project like this? I'm open to most languages.
Try WireframeSketcher wireframing tool. Unlike Gimp or PowerPoint, WireframeSketcher is designed specifically to help you create mockups and wireframes. It comes pre-packaged for Debian systems and can also be found in Software Center and so it works on Elementary OS too. Note that it's a commercial tool, but you can try it freely for 14 days.
Most PMs at large companies mock these things up using a presentation package like PowerPoint. If you know the routine and where to click it can look fantastic with minimal effort.
MockupUI does both wireframe and Windows native looking mockups. It uses your desktop's visual style which makes screens and widgets look as a standard Windows application. MockupUI lets you export screens as individual images, docx, pdf or html.
Actions/interactions can be explained by highlighting widgets and adding text annotations.

VS2012 methods organizing by drag-and-drop

I work in VS2012 and would like to organize the order of members in a class by drag-and-drop, like I can in Eclipse.
However, the members outline in a right-top of the screen and also in a class view or in solution explorer do not give such an option.
Is there a way to do it?
Code Maid is a free Visual Studio extension that adds a digging window tool.
This will answer to your needs, I believe.
This tool also allow you to reorder code elements with drag & drop directly within this window.

Keyboard Tab not working when cdialog application with CREATE method but working fine with DOMODAL

I have one MFC Application. there is one CBUTTON. I had write code create CDialog on CBUTTON click. If i am use DOMODAL method for creating cdialog then keyboard tab working fine but if i am use CREATE method then keyboard tab not working.
You probably are not calling the IsDialogMessage, which is required to ensure that modeless dialog boxes process keyboard input correctly.
This is not necessary with modal dialogs (i.e., those created by calling the DoModal method) because Windows handles it internally.
This doesn't make much sense as an explanation, though, because you're using MFC, which should ensure that IsDialogMessage is called in the message loop for modeless dialogs. That's the whole point of using a framework: it keeps you from forgetting details like this. I can't guess why it isn't working like it should for you; you didn't show us any code. Note that the Visual Studio wizards write the correct code for you automatically. It's recommended that you use them when adding new dialogs to your app.
Joseph Newcomer's article on Creating a Modeless Dialog Box with MFC might be helpful reading.

Entering text in Windows 8 in C#/MonoGame app

I'm writing a WinRT game for Windows 8, in C#, using the excellent MonoGame. I've reached the part where the user has achieved a high score and needs to enter their name. This is causing me more pain than I'd anticipated so I thought I'd ask for help.
First of all, is there a simple "enter some text" function that I can call, similar to Guide.BeginShowKeyboardInput in Windows Phone 7, or the ancient InputBox command in VB? I'm using Windows.UI.Popups.MessageDialog for displaying simple dialog messages, but can't find any similar thing for requesting text from the user.
Failing that, is there a way I can easily use a little piece of XAML to present a textbox for the user to use?
If neither of these are possible, I guess I'll have to wire this all up myself... I then would plan to intercept keystrokes and display the required text on screen myself. As I don't have a physical tablet (just the simulator) I'm struggling to start with this. How can I:
Detect whether the device has a physical keyboard, so I know whether or not to display the on screen keyboard?
If there is no physical keyboard, how can I show and hide the on screen keyboard?
Some of these sound like they should be easy to answer, but I've yet to track down answers to any of them.
Many thanks!
Adam.
Hey there is such a way to do this in monogame. There is a new template that allows you to create a XAML + Game game which allows you to use the game class you a used to with the xaml bits as well. These links should get you started. The monogame team rocks.
There are the three game types listed there. You want XAML + Game there is a template for it now if you get the proper version of monogame.
https://github.com/mono/MonoGame/wiki/Windows-8-Project-Types
let me know if you need more help
This is not a cross platform solution but you could use a FlyOut and place the controls for data entry on the window. FlyOut guidelines are here and UI Controls for text input guidelines are here. I have also used MessageDialog in a MonoGame for asking the user simple questions (up to 3 options) or to get a Yes|No response. You can get details of that class here.

Non-blocking Dialog box in Applescript

I have to write a small script to deploy a patch for our Application. The patch
will replace a couple of files in the application.I decided to depploy the patch using Applescript. The files to be copied are quite large and it takes some time for the files to be copied. I wanted to know if there is any way I can get a dialog box which doesn't block the execution of the script so that I can display some message like Updating.. etc while the patch is applied and then close the dialog box after wards.
Thanks
Shivaprasad
There's a scripting addition called Akua Sweets (oldy but goody) that has a display progress command. Get it at osaxen.com. it's in the 'most popular' section at the top of the page.
edit
Oh, bugger, that's only for OS9. It was really useful back in the day, I remember using it a lot (of course everything took a lot longer in those days so progress bars were more in demand).
another edit
You got me inspired, there's a couple of scripts I use that need progress bars, so I went looking and found this scripting addition at http://osaxen.com/files/extrasuites1.1.html
and again
here's a basic tutorial for how to do it in interface builder. I think that's probably the right way to do it.
I myself ran into the same problem. Unfortunately applescript doesn't provide an easy way of implementing a progress bar.
I ended up using the stop loop example found here to build an application. This guy has a bunch of applescript studio xcode projects to download and mess around with. It's some really great sample code if you aren't too familiar with applescript studio.

Resources