|
Take a look at the following article Using Worker Threads.
void CMyView::OnClose()
{
myWorkerThread->m_bAutoDelete = FALSE;
running = FALSE;
WaitForSingleObject(myWorkerThread->m_hThread, INFINITE);
delete myWorkerThread;
CView::OnClose();
}
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello everyone,
I write a POCKET PC Irda Chat application.
Two POCKET PC transmiss data to each other.
When one application is close, then start up again and ready to send data but this action will get a error code=1359.
If two devices closed and start up again, the function will work fine.
The question is when one closed and never can connect with the other one.Why?
Please reply the answer to tsung-yu@yahoo.com.tw simultaneously.
Thanks.
|
|
|
|
|
What kind of communication do you use? RAW IR or IR SOCKET communication?
Show us the code do you use!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello,
I use IrComm port and call OpenFile(),WriteFile(),ReadFile() function.And I create two threads,one is for sending and another one is for receving.
Joye
|
|
|
|
|
Try to use the RAW IR port and not the IrCOMM port.
How to find the real RAW port index just take a look at Raw IR on Pocket PC.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello,
The other question is how to detect a irda device approached or go away.
Joye
|
|
|
|
|
Hi,
i handle that with checking a timeout period while sending
and receiving ... that works quite good.
Greetings,
Frank
|
|
|
|
|
Hello,
Do you have any idea about using IrSock?
I need to discover the server using this and actually i want to send/receive packet/file from one device to another device. (ie)
HandHeld -To - HandHeld Communication
HandHeld - DeskTop PC communication
please give me some idea in this regard and let me know if you have any code for to test.
thanks,
siva
|
|
|
|
|
I have written an article how to use IrSock to send and/or receive data from and to a Desktop PC or another Pocket PC. The guys from PocketPCDN are going to translate it to english, because I have written it in german. So, I think they will publish it the next time.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
|
this is the code i used in eVC++, in the Windows CE API in the WinMain function, from grattan's, [i]pocket pc development in the enterprise.[/i]
SHELLEXECUTEINFO sei;
TCHAR tFile[255];
if (lpCmdLine[0]==0) wsprintf(tFile, TEXT("\\ePowerDiagnostic.vb"));
else
wsprintf(tFile, lpCmdLine);
ZeroMemory(&sei, sizeof(sei));
sei.cbSize = sizeof(sei);
sei.lpFile = tFile;
return ShellExecuteEx(&sei);
return 0;
supposedly, since the eVB application (project1.vb, [i]ePowerDiagnostic.vb in my case[/i])is "associated with the pvbload.exe, the ShellExecuteEx will load the pvbload.exe file with the project1.vb as a parameter ( just as if we were tapping the project1.vb file from the start menu or programs folder.
however, i followed the instruction, imported an icon, and compiled by using the relase suffix and building the project. i copied the lauch app to the device. however, the error msg i keep getting on the pocket pc is
" 'ePowerDiagnostic' is not a valid Pocket PC application "
I'm not sure where I went wrong....
thx.
|
|
|
|
|
Check my reply on PPCDN. Also, check the target CPU.
|
|
|
|
|
Hi,
How can I make CHRIS MAUNDER Grid control(gridctrl_demo224) as ActiveX drag & drop control and also I want to bind with the Pocket Access Data base for H/PC devices.
But I can be able to bind with the given database using ADOCE componenet and I can be able to update the table data from the specified database.
Actually I need to make it as a ActiveX control
Any ideas from any one ???
Thanks,
Siva
|
|
|
|
|
Hi,
How can I make CHRIS MAUNDER Grid control(gridctrl_demo224) as ActiveX drag & drop control and also I want to bind with the Pocket Access Data base for H/PC devices.
But I can be able to bind with the given database using ADOCE componenet and I can be able to update the table data from the specified database.
Actually I need to make it as a ActiveX control
Any ideas from any one ???
Thanks,
Siva
|
|
|
|
|
Hi,
How can I make CHRIS MAUNDER Grid control(gridctrl_demo224) as ActiveX drag & drop control and also I want to bind with the Pocket Access Data base for H/PC devices.
But I can be able to bind with the given database using ADOCE componenet and I can be able to update the table data from the specified database.
Actually I need to make it as a ActiveX control
Any ideas from any one ???
Thanks,
Siva
|
|
|
|
|
What is the easiest way to associate a program app w/an icon? I've seen the MSDN website explaination, but it didn't work and the steps seemed really complicated. Does anyone know of any other methods that work? Thanks.
|
|
|
|
|
|
hi,
any one having idea about how to detect particular keys in the keyboard.????
i posted the same questions so many times but no response
any idea...
thanks
siva
|
|
|
|
|
When I use the DesktoptoDevice Api to convert an MDB to CDB. I don't see any progress bars showing the conversion. If I do it manually by going to tools->import database I do see the transfer status. I'm using evc++.
Can anyone help me out.
Thanks
|
|
|
|
|
Hi,
Is there a way to manilupate the power setting of the PDA (Ipaq or HP Jornada) progrmatically.
Like i want the device to NOT go in suspend mode even after 5 mins when it is on battery power(the control panel only allows it till 5mins.). The reason is my app sometimes takes more than 5 mins to load depending on the size of the database and if the device suspends, the loading process is stopped and then resumes again only when the user wakes the device up. This makes the loading process very long at times.
thanks
Vs
|
|
|
|
|
Hi,
You can use either
::keybd_event(VK_F24, 0, KEYEVENTF_KEYUP | KEYEVENTF_SILENT, 0)
or
SystemIdleTimerReset()
or both.
I'd suggest that you use them with a timer, or if that's not possible, sprinkled here and there in your 'loading process'.
I normally use those in combination with GetSystemPowerStatusEx so I can allow the device to suspend if it's running low on power. I've noticed that my users dont like it when their PDA's hard reset due to no power
Jonas
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
I am unable to disable a second level menu item.
I have a Tools popup menu on my menubar that contains two items and a popup item that also contains two menu items. It looks like this:
Tools
|--- Item1
|--- Item2
|---- SubItem1
|---- SubItem2
I used ClassWizard to add the usual ON_UPDATE_COMMAND_UI functions. In the appropriate function, I can use "pCmdUI->Enable(FALSE)" to disable "Item", but I can't disable "SubItem1" and "SubItem2". Matter of fact, the functions that ClassWizard generated for my two sub menu items are never even called. I have breakpoints on both these function and they are never even hit.
This bug occurs on both my emulator and on my Compaq iPaq (arm processor). I created the project with AppWizard and am using a "Basic MenuBar".
Any ideas? Can anyone else disable a submenu item?
[edit] Forgot to mention that this is for PocketPC 2002. [/edit]
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I did some research on this and found the following (file winfrm.cpp, line 1607 of the MFC sources):
if (state.m_nID == (UINT)-1)
{
state.m_pSubMenu = pMenu->GetSubMenu(state.m_nIndex);
if (state.m_pSubMenu == NULL ||
(state.m_nID = state.m_pSubMenu->GetMenuItemID(0)) == 0 ||
state.m_nID == (UINT)-1)
{
continue;
}
state.DoUpdate(this, FALSE);
}
else
{
state.m_pSubMenu = NULL;
state.DoUpdate(this, m_bAutoMenuEnable && state.m_nID < 0xF000);
}
This seems to imply that MFC does not allow that.
|
|
|
|
|
He doesn't want to disable a popup menu, he want's disable one of the items in it.
ClassWizard allowed him to create OnUpdate handlers for the subitems, but that code isn't being called at all.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
After reporting this issue to Microsoft's tech support, they acknowledged that this was a bug in Pocket PC 2002.
|
|
|
|