tag:blogger.com,1999:blog-3536175612519016822024-02-08T21:09:14.885+01:00Windows Mobile DevelopersBlog for Windows Mobile Developerscrinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-353617561251901682.post-25042749966220615622009-12-09T10:45:00.002+01:002009-12-09T10:48:25.503+01:00HOWTO: Close Application on MinimizeThis is a popular question lately: how do I close my application when the user clicks the "smart minimize button"? This button does exactly that - it minimizes your application and does not close it. Your main application window is minimized when it receives a WM_SIZE message with the SIZE_MINIMIZED constant in the wParam parameter. All you have to do is call PostMessage(WM_CLOSE) and you are crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-68922389165481512552009-12-09T10:43:00.002+01:002009-12-09T10:45:06.143+01:00Article about Windows Mobile 6.5 GesturesThere is a new article on CodeProject about Windows Mobile 6.5 Gestures, and it's fully written in native code. Go there and have a look!crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-47532874076736616602009-07-14T09:24:00.002+02:002009-12-09T10:44:53.339+01:00Windows Mobile 6.5 Gestures documentedThe documentation for Windows Mobile 6.5 Gestures is now online here.crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-67061123837384914062009-07-14T09:22:00.002+02:002009-07-14T09:25:47.547+02:00unresolved external symbol CLSID_ImagingFactoryJust started out a new sample project that illustrates how to use the WM libraries I'm writing, and got the following link errors:1>wmfw.lib(Image.obj) : error LNK2001: unresolved external symbol CLSID_ImagingFactory1>wmfw.lib(Image.obj) : error LNK2001: unresolved external symbol IID_IImagingFactoryThis means that the linker cannot find the symbols CLSID_ImagingFactory andIID_IImagingFactory, crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-7546970299056796352009-05-19T10:25:00.003+02:002009-05-19T10:28:54.941+02:00WTL 8.1.9127 is out!WTL 8.1.9127 is out since May 7 2009.At firt look they added installation support for VS2008 (setup90.js).Enjoy!crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-38468485446474288352008-10-09T12:12:00.004+02:002008-10-09T12:56:05.089+02:00Oriented Dialogs and SP platformSome new SP devices supports screen rotation (ex: HTC S7xx series) but all 'CStdOrientedDialog' classes are only supported for PPC platform in WTL8.0.So i changed some WTL files to add those classes to SP too.The only file to change is: 'atlwince.h'If you want support also in wizard you need to change also: 'AppType.htm' and 'Platforms.htm' in 'AppWizMobile\Files\HTML\1033' folder.You can find crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com2tag:blogger.com,1999:blog-353617561251901682.post-38994603569105853162008-10-01T14:42:00.004+02:002008-10-09T12:56:36.714+02:00CStdDialogImpl and the OK buttonAre using CStdDialogImpl as the base class for your WTL dialogs? Are you having difficulty hiding the "ok" button? Here's a simple solution:Derive your dialog class (say CMyDialog) fromCStdDialogImpl<CMyDialog, SHIDIF_SIZEDLGFULLSCREEN | SHIDIF_SIPDOWN>On the OnInitDialog handler, call:SHDoneButton(m_hWnd, SHDB_HIDE);ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);Make sure you change all Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-87844471792665496732008-08-05T15:31:00.002+02:002008-08-05T17:01:56.554+02:00ClearType on a memory DCI recently developed a small information browser application for Windows CE 5.0 devices. This small application uses a touch list as an item selector and displays an in-memory bitmap with textual information related to the selected item.The touch list uses a ClearType-rendered font (see the latest Touch List sample) painted to a memory DC. I also used a ClearType font to paint the text on the Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-353617561251901682.post-28965642049288159832008-08-04T17:49:00.001+02:002008-08-04T17:49:29.610+02:00Windows Mobile API Usage ToolMicrosoft has just released a new tool to determine the Windowm Mobile API usage in your application. This is especially useful for deprecated functions! Go take a look here.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-87633572448956928262008-07-02T11:31:00.004+02:002008-07-02T12:08:12.492+02:00Installing WTL Helper in VS 2008Last April my good friend Cristiano Severini managed to recompile Sergey Solozhentsev's WTL Helper for VS 2008. He wrote a few instructions about how to do it, but they are a bit incomplete. I have just reviewed the whole process with him and managed to successfully install his version of the WTL Helper DLL on a VS 2008 under Vista. Here's how to do it:Install the original WTL Helper package; Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-353617561251901682.post-66859836282728681432008-06-06T13:12:00.001+02:002008-06-06T13:12:43.364+02:00Animating Child View Transitions - The articleI have just posted a new article on Code Project with the last version the the child view transition animation code. You can read the article here.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-62901284553182577602008-05-29T15:52:00.002+02:002008-05-29T15:57:28.605+02:00Porting old projects to WTL8Hi,after upgraded to WTL 8.0 if you try to compile old project you'll get errors like these:error C2668: 'lstrlenA' : ambiguous call to overloaded function ...\WTL80\include\atlapp.h 697error C2514: 'size_t' : class has no constructors ...\WTL80\include\atlapp.h 73eerror C3861: 'lstrcpynA': identifier not found ...\WTL80\include\atlapp.h 74The way to fix it is simple, just add:#if _ATL_VER == crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com2tag:blogger.com,1999:blog-353617561251901682.post-40731866360068145172008-05-28T10:30:00.005+02:002008-05-28T10:58:49.245+02:00Inject DllsHi,today i'll explain how inject dlls into another process.To inject external dlls into the processes we need to use some functions exported from coredll.dll. These functions are documented in Platform Builder but not in SDK so we need to declare them as extern:extern "C"{BOOL __stdcall SetKMode(BOOL fMode);DWORD __stdcall SetProcPermissions(DWORD);LPVOID __stdcall MapPtrToProcess (LPVOID lpv, crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com2tag:blogger.com,1999:blog-353617561251901682.post-18098202437096165992008-05-27T11:49:00.002+02:002008-05-27T11:51:16.608+02:00An alternative to the SHMENUBAR resourceThe SHMENUBAR resource is a pain. A real pain. Why is there no support for this on the VS 2005 / 2008 resource editor? This resource is actually quite powerful when it comes to defining the WM application menu and fine-tuning its appearance. But when you need to change something, you need to remember the string table IDs, the toolbar button options and all that.Most WM applications I have seen soUnknownnoreply@blogger.com1tag:blogger.com,1999:blog-353617561251901682.post-55831370918639711972008-05-22T17:42:00.008+02:002008-05-22T17:57:49.666+02:00WTL - Create a dialog without resourceHi,yesterday i explained how create a menu by code without use resource, today i'll explain how to create a dialog without use resource using WTL in 2 mins and with 20 lines :)WTL framework comes with two classes:CMemDlgTemplate (which define our dialog template)CIndirectDialogImpl (which define our dialog class)In the code below i'll show how create an empty dialog with just few lines:#pragma crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com0tag:blogger.com,1999:blog-353617561251901682.post-82804438850514719772008-05-21T15:36:00.013+02:002009-10-07T11:05:11.182+02:00Create Menu Bar Programmatically - WM5Hi,today i show you how create a menubar from code without use any resource.//add these lines in your wm_initdialog or wm_create function#define ID_CHANGE_TEXT WM_APP+1#define ID_ADD_NEW_ITEM WM_APP+2#define ID_NEW_ITEM WM_APP+3//Create the right popupmenu HMENU hPopupRightMenu = ::CreatePopupMenu(); ::InsertMenu(hPopupRightMenu, -1, MF_BYPOSITION, ID_CHANGE_TEXT, L"Change Left Text"); ::crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com10tag:blogger.com,1999:blog-353617561251901682.post-26367359225754247912008-05-20T15:42:00.009+02:002008-05-21T16:07:13.457+02:00POOM: 'unresolved external symbol' or 'already defined'Often when we use POOM api's we get those errors by compiler.We have two methods to fix it:solution a - include only where you need;- include into only one .cpp file:#define INITGUID#include <initguid.h>#include <pimstore.h>#pragma comment(lib, "pimstore.lib") //don't forget to link library ;)solution b- include where you need:#include <pimstore.h>#pragma comment(lib, "crinohttp://www.blogger.com/profile/05514614660851356884noreply@blogger.com1tag:blogger.com,1999:blog-353617561251901682.post-13857358802754650562008-05-15T17:28:00.000+02:002008-05-15T17:29:21.630+02:00WelcomeWelcome to the Windows Mobile Developers Blog!Unknownnoreply@blogger.com0