Skip to content

Mobile

General Discussions on Mobile related development. For Android specific development please see the Android forum

This category can be followed from the open social web via the handle mobile@forum.codeproject.com

3.8k Topics 8.1k Posts
  • free a char[ ]

    c++ security performance question
    6
    0 Votes
    6 Posts
    0 Views
    J
    2 errors in my wchar_t verison of your code. :-O Jonas Larsson wrote: wchar_t* pBuffer = new char[dwFileLength/sizeof(wchar_t)]; wchar_t* pBuffer = new wchar_t[dwFileLength/sizeof(wchar_t)]; Jonas Larsson wrote: pBuffer[dwFileLength - 1] = L'\0'; pBuffer[(dwFileLength/sizeof(wchar_t)) - 1] = L'\0'; Sorry about that. “Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
  • Detecting Power Off

    help question
    3
    0 Votes
    3 Posts
    0 Views
    A
    Well, that sucks, but thanks anyways. The ideas I had were trying to handle VK_OFF in a OnKeyDown or similar. Or hoping that a WM_POWERBROADCAST-type message is sent. When I was playing around, it didn't seem like either of this methods worked, but when it comes to CE, I'm never sure. :( The kindest thing you can do for a stupid person, and for the gene pool, is to let him expire of his own dumb choices. [Roger Wright on stupid people] We're like private member functions [John Theal on R&D]
  • close the MainFrame from a Child-Window

    c++ performance
    5
    0 Votes
    5 Posts
    0 Views
    S
    thx for the help- the problem seems to be somewhere else. it also doesn't work if i try to do it the other way round, i.e. to close the dialog from the mainFrame. to e more detailed, it works in some cases, but most of the times after i worked a little bit in the dialog, my app crashes when trying to close both. probably, somewhere in my dialog i did not free memory or something like that... here's some of my code anyway: I have a PPC app that start and shows a modeless dialog: Code: //in MainFrame.h: CComPortDlg* m_pDlg; //in MainFrame.cpp: CMainFrame::CMainFrame(){ m_pDlg = new CComPortDlg; } //when clicking menu-entry "End": if(this->m_pDlg->m_hWnd != NULL){ this->m_pDlg->ShowWindow(SW_HIDE); this->m_pDlg->DestroyWindow(); //close dialog //the destroyWindow() usually take VERY long and makes the whole PDA crash... } SendMessage(WM_CLOSE,0,0); //close mainframe //in Destructor: CMainFrame::~CMainFrame(){ delete m_pDlg; } is this the right way to deal with modeless dialogs? thx, Daniel
  • 0 Votes
    2 Posts
    0 Views
    J
    Handle the NM_NAVIGATECOMPLETE notification and check if the pnmHTMLView->szTarget contains the URL you want (check help for more info). Regards, João Paulo
  • export dialog-recource

    question learning
    2
    0 Votes
    2 Posts
    0 Views
    J
    Check these articles: How to include a dialog without copying from .RC[^] XDialogImport - How to share dialogs between projects[^] Regards, João Paulo
  • webSerice from wsdl in evc++

    c++ wcf tools question
    2
    0 Votes
    2 Posts
    0 Views
    S
    it seems that there is no such tool. pocketSoap is the only possibility.... thx, Daniel
  • jpgs in pocketIE look crappy

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • 0 Votes
    1 Posts
    0 Views
    No one has replied
  • load a html-file from file

    html question learning
    4
    0 Votes
    4 Posts
    0 Views
    J
    slomoman wrote: but a char array still needs a CONSTANT size, not a variable size, right? Sure, but you should not allocate it statically. Use the value that GetFileSize() returns to create a dynamic char array using new or other memory allocation mechanism you find more convenient. It should be something like this: TCHAR *pBuffer; DWORD dwSize = GetFileSize(hFile); pBuffer = new TCHAR[dwSize]; if(pBuffer) { // Read the file using pBuffer as destination delete [] pBuffer; } else { // Memory allocation error } TCHAR is the UNICODE equivalent of char. Regards, João Paulo
  • Dialog instead of Document

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • pocket pc models with serial port

    2
    0 Votes
    2 Posts
    0 Views
    J
    iPAQ 38xx, 39xx, 54xx Regards, João Paulo
  • evc4 vs PPC2002

    c++ visual-studio question
    3
    0 Votes
    3 Posts
    0 Views
    M
    If the platform is based on Windows CE 3.0 or older, use eVC 3. If the platform is based on Windows CE.NET 4.0 or newer, use eVC 4. Changes were made to the debugging API in Windows CE.NET 4.0 which mean that eVC 3 can't debug on that platform. Likewise eVC 4 cannot debug on CE 3.0. Microsoft are enforcing this by only showing CE 3.0 and lower SDKs as targets in eVC 3, and CE 4.0 and higher SDKs in eVC 4. Pocket PC 2000, Pocket PC 2002 and Smartphone 2002 are based on Windows CE 3.0; Pocket PC 2003 and the forthcoming Smartphone 2003 (Windows Mobile 2003 for Smartphones) are based on CE.NET 4.2. Few people will ever develop on a custom OEM platform, but if you need to, check with the OEM to see which version of Windows CE it's based on. I work for a custom software house specialising in data capture applications; we write software for some custom barcode-enabled handheld computers which are not based on Pocket PC. Sometimes this is a blessing (we have to work around the Pocket PC shell a lot of the time) and sometimes a curse (where a library available on Pocket PC isn't in the OEM's platform).
  • How to use SHBrowseForFolder...

    help tutorial question
    2
    0 Votes
    2 Posts
    0 Views
    A
    Take a look at How to use SHBrowseForFolder....
  • 0 Votes
    2 Posts
    0 Views
    J
    A few questions: How do the PDAs connect to the server? Are the PDAs storing any temporary info, or they just immediately flush any data they acquire to the database? From my own experience, using SQL CE connectivity will greatly simplify your development process, and it does seem to fit well in all your delvelopment requirements. As for .NET, I'm no expert. My experience comes solely from the C++ field where these solutions have been thoroughly tested and used. Regards, João Paulo
  • Controlling a Pocket PC device through a desktop

    help c++ tutorial
    2
    0 Votes
    2 Posts
    2 Views
    J
    Have a look at the Remote API (RAPI). It will allow you to call a DLL on the Pocket PC from the desktop (among a lot of other things). You write the DLL to access the SIM card and make it compatible with the RAPI services. On the desktop side, you just need to make the appropriate calls to your DLL through the RAPI interface. Here's a starting point: HOWTO: Use CeRapiInvoke()[^] Regards, João Paulo
  • Saving Registry changes to Persistent memory

    help tutorial question csharp c++
    2
    0 Votes
    2 Posts
    1 Views
    B
    You should ask to your device manufactor. If this is a industrial device, then there should be a 'RegSave' utility : start->run menu then type RegSave
  • Get Machine ID?

    help tutorial question
    4
    0 Votes
    4 Posts
    0 Views
    J
    Here: http://www.pocketpcdn.com/articles/serial_number2002.html Regards, João Paulo
  • connect to pocket pc using active x

    question
    1
    0 Votes
    1 Posts
    0 Views
    No one has replied
  • read from COM port on PPC

    question com
    2
    0 Votes
    2 Posts
    0 Views
    D
    Take a look at my Infrared Communication with your Mobile Phone article. I will use the IrDA port of my Pocket PC to communicate with the Mobile Phone. It works like the two devices are connected with a serial cable! Cheers, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)
  • keyup in CE

    help tutorial announcement
    2
    0 Votes
    2 Posts
    0 Views
    D
    Have you tried SHSetAppKeyWndAssoc or RegisterHotKey. May be you can also try GAPI and the GXOpenInput function. Cheers, Daniel. -- FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. ;)