|
|
Зажги свою жизнь!

| Nov. 2nd, 2009 03:35 pm CVwsSessionWrapper, ActivateView and VIEWSRV 11 To avoid "cool" panic while repeatedly launching the same app with ActivateView, use CVwsSessionWrapper only when you don't have COE environment (for example, from console/background server thread etc.)
In all other cases use CCoeAppUi::ActivateViewL(), it's much safer and more efficient. Leave a comment | |

| Oct. 26th, 2009 12:25 am Visual C++ 2010 - What's new What's New in Visual C++ 2010 Visual C++ Integrated Development Environment
Visual C++ Projects and MSBuild Visual C++ solutions and projects are now built with MSBuild, which is same time-proven build tool that is used by the other Visual Studio languages and project types. MSBuild is a flexible, extensible, XML-based tool that takes the place of VCBUILD.exe. Consequently, project files use a new XML file format, and a .vcxproj file suffix. Visual C++ 2010 automatically converts project files from earlier versions of Visual Studio to the new file format.  Visual C++ Libraries Restart Manager The restart manager autosaves documents and restarts your application if it unexpectedly closes or restarts. For example, you might use the restart manager to start your application after it is closed by an automatic update. For more information about how to configure your application to use the restart manager, see How to: Add Restart Manager Support. MFC Library The CTaskDialog class can be used instead of the standard AfxMessageBox message box. This class displays and gathers more information than the standard message box. New Libraries The SafeInt Library performs safe arithmetic operations that account for integer overflow. This library also compares different types of integers.  Visual C++ Compiler and Linker auto Keyword The auto keyword has a new purpose. Use the default meaning of the auto keyword to declare a variable whose type is deduced from the initialization expression in the variable's declaration. The /Zc:auto compiler option invokes either the new or previous meaning of the auto keyword. decltype Operator The decltype operator returns the type of a specified expression. Use the decltype operator in combination with the auto keyword to declare a type that is either complex or known only to the compiler. For example, use the combination to declare a template function whose return type depends on the types of its template arguments. Or, declare a template function that calls another function, and then returns the return type of the called function. Lambda Expressions Lambda functions have a function body but no name. Lambda functions combine the best characteristics of function pointers and function objects. Use lambda functions by themselves, as a template function parameter instead of a function object, or together with the auto keyword to declare a variable whose type is a lambda. Rvalue Reference The rvalue reference declarator (&&) declares a reference to an rvalue. An rvalue reference enables you to use move semantics and perfect forwarding to code more efficient constructors, functions, and templates. static_assert Declaration A static_assert declaration tests a software assertion at compile time, unlike other assertion mechanisms that test at run time. If the assertion fails, the compilation fails and a specified error message is issued. nullptr and __nullptr Keywords The Visual C++ 2010 compiler enables you to use the nullptr keyword with native code in addition to managed code. The nullptr keyword indicates that an object handle, interior pointer, or native pointer type does not point to an object. The compiler interprets nullptr to be managed code when you use the /clr compiler option, and native code when you do not use the /clr option. The Microsoft-specific __nullptr keyword has the same meaning as nullptr, but applies to only native code. If you compile native C/C++ code with the /clr compiler option, the compiler cannot determine whether the nullptr keyword is a native or managed term. To make your intention clear to the compiler, use the nullptr keyword to specify the managed term, or __nullptr to specify the native term. /Zc:trigraphs Compiler Option By default, support for trigraphs is disabled in Visual C++ 2010 . Use the /Zc:trigraphs compiler option to enable trigraphs support. A trigraph consists of two consecutive question marks ("??") followed by a unique third character. The compiler replaces a trigraph with a corresponding punctuation character. For example, the compiler replaces the "??=" trigraph with the '#' character. Use trigraphs in C source files that use a character set that does not contain convenient graphic representations for some punctuation characters. New Profile-Guided Optimization option PogoSafeMode is a new option for profile-guided optimization that enables you to specify whether to use safe mode or fast mode when you optimize your application. Safe mode is thread safe but slower than fast mode. Fast mode is the default behavior.  Microsoft Macro Assembler Reference The addition of the YMMWORD data type supports the 256-bit multimedia operands provided with Intel Advanced Vector Extensions (AVX) instructions. 2 comments - Leave a comment | |

| Oct. 25th, 2009 02:29 am New Carbide C++ 2.1 - Faster than old one! Go to Downloads at http://developer.symbian.org, install PDT v1.1 and update Carbide C++ 2.0.4 inside into 2.1.
Installing PDT also adds SBSv2 toolchain (next version of Symbian build system). Looks like it's a bit more faster and cooler (python scripting instead of Perl?)
And yes, from Carbide 2.0.4, you have built-in Symbian news feeds, like in Visual Studio start page :) Leave a comment | |

| Jul. 4th, 2009 04:27 am Set CEikEdwin layout - retrieve text editor height Example: you want 1-line text editor, and want to center it inside some parent CCoeControl. To do it, you should know the height of the 1 line of text. Here is the magic:
CParent::ConstructL(TRect const & aRect) { InitComponentArrayL(); // create editor iEditor = new (ELeave) CEikEdwin(); iEditor->SetContainerWindowL(*this); TInt flags = CEikEdwin::ENoWrap; iEditor->ConstructL(flags, 0, 256, 1);
Components().AppendLC(iEditor); CleanupStack::Pop(); iEditor->SetFocus(ETrue); // set parent control size and position first SetRect(aRect); // at this point editor will have correct height set TInt heightOfTextLine = iEditor->Size().iHeight; }
Note: Don't forget to use AddToStackL(iParentWindowControl) and forward OfferKeyEventL() directly into the editor, it will work also on the touch devices. Leave a comment | |

| Jul. 2nd, 2009 02:49 pm Launch Virtual Keyboard on Symbian Touch 5th edition CEikEdwin * editor; ... MCoeFepAwareTextEditor_Extension1 * extension1 = editor->InputCapabilities().FepAwareTextEditor()->Extension1(); CAknEdwinState * aknEdwinState = static_cast<CAknEdwinState *> (extension1->State(KNullUid)); aknEdwinState->ReportAknEdStateEventL(MAknEdStateObserver::EAknActivatePenInputRequest);
Leave a comment | |


| Dec. 24th, 2008 10:39 am How to get Symbian Browser's HTTP User Agent string in C++ Довольно долго провозился, пытаясь решить эту задачу для платформы 3.2. В итоге ответ был найден: http://discussion.forum.nokia.com/forum/showthread.php?p=520495#post520495
Мало того, что это абсолютно нигде не задокументировано, так еще под разными платформами нужная строчка находится по разным индексам! Симбиан, я тебя ненавижу :)
Итоговый алгоритм получается примерно такой: из 4 строчек с индексами от 4 до 7 выбираем самую длинную... Leave a comment | |

|
|