WebStorm wraps text not as expected - webstorm

How can I configure WebStorm so that it wraps text near the restriction line but not at the window corner?

There's currently no native setting that can enable this directly.
However, someone wrote a plugin for this : WrapToColumn.

Related

How do I turn on Dev C++ IDE linting for C?

I want the squiggly lines under my codes in Dev C++, is that feature available in Dev C++?
Dev-C++ capabilities are minimal and very limited. It does not have real-time syntax check but you can do it manually using ctrl+F9 shortcut or Execute->Syntax Check Current File.
By default it will change the error line background to color Maroon but you can change that with : Tools->Editor Options...->Colors->Error lines(top left scroll area) Then change the back/forecolors listed bellow it.
You also can change the Syntax Check shortcut to something more convenient, go to Tools->Configure Shortcuts... Find MainMenu > Execute > Syntax Check Current File then click on it and enter your desired keyword.

win32 DialogBox() and MAKEINTRESOURCE(): how to modify the app's ui?

I'm working on my project which is trying to control a camera by using a Joystick,
and I found this sample code:
http://ukgtut.googlecode.com/svn-history/r53/trunk/irrlicht/src/proto_carace/Joystick.cpp
This app has its own ui which isn't fit to my project, the ui seems to be created by MAKEINTRESOURCE( IDD_JOYST_IMM ), I want to modify but don't know how to do.
Should I change the variable in MAKEINTRESOURCE() to modify the ui?
How can I build my own ui?
Thanks for any help!
You need to use resource editor (or even a text editor) to modify the dialog template in the resource file.

Setting console cursor and font color

How can I set console cursor and its font color without including windows.h? is there any alternative way available?
There is no platform-independent method for doing this.
Since it seems you are using windows you can use the console calls
see http://msdn.microsoft.com/en-us/library/ms685032(v=vs.85).aspx
alternatively you can use the old ANSI.SYS to color the text, but you would need to load the driver in config.sys for your console.

Implementing my own print preview?

I have developed my own Report Control which is simply nothing but drawing text on a CDC of the control window's client DC. I have got the printing function to work too. The report output is sent to the printer directly. However I want to let the user know the output before the report is actually printed.
I cannot do this using MFC's print preview architecture as my project is not using the doc/view architecture. Is it possible for me to create a print preview window myself ? How does MFC handle this ? Are there any special processing need to be done or keep in mind when showing the printer output on screen ? I've read that MFC used 2 DCs for print preview purposes. Do I need to do this as well if Im goin for a custom print preview ?
Your input is highly appreciated !
tia.
P.S. i use Visual Studio 6 and there is no option to change this to a newer version just as there is no way for me to add doc/view support.
Print preview isn't that special. It just means that you have to render to screen (or bitmap) what you'd otherwise would render to the printer DC. This primarly means using the page size, and providing a UI control for the prev/next page.
I had tweeked this code in order to compile it as static lib. It is for dialog based applications.If you don't need special functionality it will work ok for you.
I had to dig through MFC mechanisms to add extra functionality but at the end I dropped it. If you know other programming languages, try to find a print preview control in that language, make it a dll and use it from your MFC application.
For example, I found the NicePreview control for Delphi and it worked, for me, beautifully !
if you managed to print your output to a file in an RTF format and displayed it on screen would this solve the problem?
There is a class CPreviewView in MFC. Maybe you can find a way to instantiate it without MDI structure.
Otherwise, you can simply paint on screen whatever you are painting on the printer DC. Just remember that you will probably need to scale it down for lower dpi.

Carbide / Symbian C++ - Change Application Icon

I am using Carbide (just upgraded to 2.0) to develop an S60 3rd Edition application.
I would like to know the easiest way to change the icon (both the application icon on the device menu and the icon at the top left of the main view) because I have the need to skin my application in many different ways as easily as possible.
All my efforts with messing around with .mif files have so far failed. I have a 44x44 .svg icon I made with Illustrator, could someone please help me in the right direction?
Thanks!
To change the app icon when you run your app use (in the status bar):
CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
CAknContextPane* cp=(CAknContextPane *)sp->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "my_bitmap_file.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmap);
CleanupStack::PushL(bitmap);
CFbsBitmap* bitmapmask = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmBitmapMask);
CleanupStack::PushL(bitmapmask);
cp->SetPicture(bitmap, bitmapmask);
CleanupStack::Pop(); // bitmapmask
CleanupStack::Pop(); // bitmap
DrawNow();
I'm not aware of any possibility of changing the app icon in the menu list programmatically, other than reinstalling the app with different mif file.
If you want to change the icon in your SIS file and then overinstall it on device then you may have to reboot your device after installation - the application icon is in the Symbian cache and is not updated.
http://wiki.forum.nokia.com/index.php/CS000808_-_Creating_and_adding_an_icon_to_an_S60_3rd_Edition_application
With latest QMake and Qt SDK (4.6.2) you don't need to create any .mif file yourself. An SVG file will do.
For more detailed instructions see: How to Set Qt Application Icon and Title in Symbian S60.
Although the article uses Qt Creator, as long as you use QMake then it's the same thing.