Is there a way to prevent TaskDialog from wrapping pszContent? - winapi

Often times when our app uses TaskDialog to display a simple dialog box, Windows will wrap the last word of pszContent to a second line. In those scenarios, we'd much prefer the dialog box be widened just a bit and keep pszContent on a single line.
Anyone know if this is possible without adding additional buttons to the dialog box? (That's the only workaround I've found after searching online. And not an acceptable workaround for me.)

Related

How do I turn off "column box select" in visual studio code?

I seem to be unable to turn off box/column select. In other words, if I try to select across multiple lines, I only get a box select, as opposed to the usual behavior where entire lines are selected as I add lines.
I am using version 1.48.2 on a mac.
I must have pressed option+shift or some other such code inadvertently and now I can only select boxes. I have looked at my keyboard shortcuts but I don't know what to look for...
Unfortunately searching for solutions via google or SE only produces results for how to turn it on, not off! I don't know what the opposite mode is. "line select" seems to be just to select the current line, not for entire lines across multiline selections.
example of current behavior. I want the entire line "spaceship..." to be selected.
Just found the answer myself looking for something else. There is a "Text Editor" setting called "Editor: Column Selection" that controls this. The default is off, but I must have turned it on somehow without realizing it. Thanks to anyone who may have taken time to read this....
Cmd+8 is the shortcut to toggle the setting

Interface Builder cuts off text input for long strings when using attributed text

Is this a bug or by design? The text input is cut off when text is getting long. Using Xcode 8. How can I avoid this? It stops me from inputting the text I want.
I realized that you can make the thing stop cutting off text by simply making the Xcode window and/or panel wider. I still think though that this kind of control usually should allow for scrolling within itself... I seem to remember that it did at times, but I just can't get it working now.

Is it possible to hook the copy and paste of Windows Phone Designer and change its behavior?

I like the windows phone 7 designer but the copy and paste of textbox is irritating. It just keep paste the textbox at the very top. It would be much more productive that it paste below the previous textbox.
So would it be possible to change this behavior by hooking this with some IDE API ?
If you are using the visual designer, rather than using copy and paste, you can drag a new control from the toolbox and drop it precisely where on the form you want it.
The IDE isn't arbitrarily dropping the control at the top of the screen, it places it at 0,0. You could argue that this is as good a place to put it as any. In a true copy and paste, the physical location should be exactly the same but that would be confusing.
I would expect it to be quite uncommon to place one textbox directly under another without a textblock or somethign else in between. In any case it would be necessary to change the position from where it was copied. At least with the current behaviour you'll always know where the new control is.
Not sure about hooking into the IDE, but you might find it easier to just use Blend for the UI aspects. For example, if you have a vertical stackpanel, you can copy and paste and have each control appear below each other in the correct position.

Windows text editor that shows/hides lines based on RegEx or Grep syntax?

One of my application components produces some extremely hairy log files. They require a lot of poking and prodding before they produce useful information. I'm on the hunt for a text editor for windows that will let me enter text in either RegEx or Grep-style syntax, and automatically show/hide the relevant lines.
Does anyone know of a text editor that has this feature?
Thanks!
IVR Avenger
I know it's answered already, but http://glogg.bonnefon.org/ is the perfect answer for this. Couldn't live w/o it.
I would recommend Notepad++ as far as a good all-around Windows text editor is concerned - it is very extensible and includes just about every power feature you need to wade through data logs. If your log files are in a well-defined format, you can even use the built-in language editor to define a custom visual scheme for your logs - easier on the eyes.
-matt
GVim with for example, :g command. There are also plugins that allow entering search criteria, and they show relevant lines, and fold everything else.
Emacs, of course (occur), but I think pretty much every editor will do this.
Another option is SlickEdit using it's "Selective Display..." option
Although it wont show/hide based on a regex, Textpad will allow you to search and produce a hyperlinked result file with the lines that will allow you to click into the actual log. Consider the benefit: You can keep the filtered results up on your left monitor, and you can click into the full files and show them on your right monitor to see the context.
SPFLite is free and does just what you want. At least the IBM SPF and ISFP (used on IBM mainframes as part of the MVS operating system) that it emulates is just what you want.
From what I have tried, SPFLite will probably do the job. It can X (exclude) all lines from view, or eXclude lines with a given character or phrase (optionally starting in a certain column) from view. Or after eXcluding all lines, you can display, by Finding, characters or strings (optionally starting in a certain column). I think it also has a macro capability. The original does, and I think this Lite does as well. How robust I do not know. The original could create interactive screens and programs using the MVS TSO Command Language.
I found SPFLite at http://www.spflite.com/
I found that this interface is not so easy to use, but one gets used to about anything if necessary.

Reuse Edit Control as Command Window

This is a GUI application (actually MFC). I need a command window with the ability to display a prompt like such:
Name of favorite porn star:
The user should be able to enter text after the prompt like such:
Name of favorite porn star: Raven Riley
But I need to prevent the user from moving the cursor into the prompt area. Users should also be prevented from backspacing into the prompt in order to prevent the following:
Rrraven Rrrileeey Ruuuulez!!! Name of favorite porn star:
Also need to control text selection and so on. And finally, I should have no problem retrieving only the text the user entered (minus prompt text).
Will it be better to create my own window class from scratch (i.e inherit from CWnd) or should I reuse the Windows EDIT control (i.e. inherit from CEdit)?
A similar command window can be seen in AutoCAD and Visual Studio (in debug mode).
I think you'd be better off creating a subclass of CEdit and limiting filtering key-presses. I suppose the hard part is not letting the user move the caret to the prompt area, but you can probably write some code to make sure the caret always get sent back to where it belongs (the input part).
Anyway, if you really, really want to implement your own control (it's not that difficult after all) I recommend you read Jacob Navia's "technical documentation" on how he built the LCC compiler and environment. Actually, it seems the docs are not online anymore, but I'm sure you can get them through his e-mail (jacob#jacob.remcomp.fr).
Edit: I liked your previous example better. Keep it classy, LOL :)
I had a very similar requirement and did exactly what davidg suggested; subclassed a edit control and filtered key presses. This was actually using Qt not MFC but the principle will be exactly the same.
You need to remember to filter keys such as home as well as left and backspace. I just checked to see if the move would move the caret into the prompt and if it did ignored the keypress.
Another thing to watch for is pasting multiline text, you will have to choose whether to just paste the first line or all lines, adding the prompt on all lines after the first. When subclassing the control you get lots of behaviour which won't work exactly as you want it.

Resources