|
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.
|
|
|
|
|
When we shut our app down, it stays in memory. This is a pain because while we're using the emulator, we have to either reset the emulator or go into settings/system/memory/running apps to shut the program down completely.
Is there a way to do this programatically from within our own app?
[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
|
|
|
|
|
Try this:
LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if (message==WM_WINDOWPOSCHANGED)
{
WINDOWPOS *pWp = (LPWINDOWPOS) lParam;
if (pWp->hwndInsertAfter != NULL)
{
TCHAR str[101];
::GetWindowText(pWp->hwndInsertAfter, str, 100);
if (wcscmp(str, _T("Desktop"))==0)
SendMessage(WM_CLOSE,0,0);
}
}
return CFrameWnd::WindowProc(message, wParam, lParam);
}
I found it on the Net... but i should say João Paulo Figueira was a great help.
Thanks!
|
|
|
|
|
Perfect! Thanks!
BTW, is this supposed to work in the emulator too? Once I shut down my app, I can't restart it without reseting the emulator.
[EDIT] Hmmm, it also does this when I use the Settings|System|Running Programs method for shutting down. [/EDIT]
[EDIT2] After shutting the app down (with this code in place), and then trying to restart the app, the title bar reads "Default IME" (and the app doesn't start). [/EDIT2]
------- 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
|
|
|
|
|
John Simmons / outlaw programmer wrote:
When we shut our app down, it stays in memory
If I understand this correctly, you are "closing" the app by using the "Smart Minimize" button (the X) instead of the OK button, eh?
Smart Minimize won't close the app, but the OK button will.
To remove the Smart Minimize (and add OK), use this:
ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);
SHDoneButton(m_hWnd, SHDB_SHOW);
Hopefully, this is what you're wanting.
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
That didn't change the current behavior. The app shuts down, and doesn't show as an entry in the "Running Programs" list, but when I try to restart it, all I get is "Default IME" showing up in the PocketPC title bar.
------- 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
|
|
|
|
|
That's really weird; I haven't seen anything like before.
I did a quick Google search (as I'm sure you have done too), and found some other programs out there have a similar problem.
Seems like the error is caused by the Storage Card (CF or SD).
HTH.
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=597[^]
http://www.gpspassion.com/forumsen/topic.asp?TOPIC_ID=529[^]
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
These people are all end users. I'm trying to figure out how to keep it from happening. Also, I haven't moved the app to the actual iPaq yet - I'm still working in the emulator, but from past experience, what you see in the emulator will also be seen on the actual device.
------- 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
|
|
|
|
|
|
hi all ,
i want to prcess keybord inputs in c++ application.
how to do it ?
any idea ?
suggestions are most welcome.
thanks
siva
|
|
|
|
|
I have a CPropertySheet-derived class (with no associated dialog template). In the constructor, I call AddPage() for the three CPropertyPage-derived classes (Thin/Child templates).
I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed.
What am I missing?
------- 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
|
|
|
|
|
Hi, John! Nice to see you back on the forum.
John Simmons / outlaw programmer wrote:
I've tried a number of things, but I can't seem to get any of the propertysheet buttons displayed.
To what buttons are you referring? Are these from your dialog template?
|
|
|
|
|
João Paulo Figueira wrote:
Hi, John! Nice to see you back on the forum.
I've always been here.
Recently, I've been converting code from other projects to work in our PPC2K project. We have a common code base that is shared between apps that run on the Windows desktop, and apps that run on CE 2.12 proprietary embedded devices that don't have a (Windows) user interface. The problem has been that some of the compiler definitions are defined in such a way as to assume that if the program is being written for CE, then there is no user interface (not true for our PPC2K project), or that if MFC is being used, it must be a desktop Windows project (again, not true in our current case).
Needless to say, this project has turned out to be the very bane of my miserable existance. Add to that, we're shoe-horning STL into the project, there's just plain strange legacy code, and my total lack of familiarity with the idea behind what I'm working on, and you can probably guess that I've been fairly hard to live with recently.
Anyway, I'm temporarily working on some of the interface stuff once again.
João Paulo Figueira wrote:
To what buttons are you referring? Are these from your dialog template?
You know, the buttons that always show up on a propertysheet under VC6, especially when you don't need them - Okay, Cancel, and Apply (and I don't need apply, but I do need cancel). I've even gone back to the basics of using property sheets to see where I could have gone wrong, and I can't see anything wrong with what I've done.
------- 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
|
|
|
|
|
John Simmons / outlaw programmer wrote:
Okay, Cancel, and Apply
As far as I know the Pocket PC 2002, you only get the top left-hand-corner ok button. I'm not sure about the Pocket PC 2000, but I've seen dialogs with both the ok and the close (X) box. By using this button you would effectively cancel the dialog.
I've recently came up with a solution, although it is not a standard one: insert a command bar in the dialog / property sheet and place the ok and cancel buttons there (graphic buttons). To do this, have a look at these articles:
A File Open Dialog for the PocketPC 2002[^]
Property sheet callbacks in the Pocket PC 2002[^]
The first shows how to put ok and cancel buttons on the dialog's command bar, and the second shows how to put a command bar in a property sheet.
Hope these help.
|
|
|
|
|
Thanks I'll look at those.
------- 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
|
|
|
|
|
The callback article is cool, and I used the concept in our code.
In fact, I think the commandbar thing is a better solution than putting the "OK" and "Cancel" buttons in the titlebar at the top of the screen. However, I'd like to remove the "OK" button from the titlebar if it's possible.
Got any ideas?
------- 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
|
|
|
|
|
Use this:
ModifyStyle(0, WS_NONAVDONEBUTTON, SWP_NOSIZE);
SHDoneButton(m_hWnd, SHDB_HIDE);
This can go in the OnInitDialog of your CPropertySheet .
|
|
|
|
|
Perfect! Thanks!
------- 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
|
|
|
|
|
Hello to everyone again:
I am experiencing a troubling problem with stl strings. I will try to be as much precise as possible.
I have this definition, as my DLL must work under WIN32 and WINCE
<br />
#ifdef _UNICODE<br />
#define __tstring std::wstring<br />
#else<br />
#define __tstring std::string<br />
#endif<br />
One object (CContainer) has to build an string with different information obtained from a structure.
<br />
const TCHAR* CContainer::GetCurrentCommandText()<br />
{<br />
CCommands::LPCOMMAND pCommand = GetCurrentCommand();<br />
__tstring sReturn;<br />
sReturn.clear();<br />
if (pCommand)<br />
{<br />
CCommandToTextConvert* pText;<br />
pText= new CCommandToTextConvert(pCommand);<br />
sReturn.append(pText->GetSVOrigin());<br />
sReturn.append(pText->GetSVDestination());<br />
}<br />
GetSVOrigin and GetSVDestination have a similar code. I'll show GetSVOrigin:
<br />
const TCHAR* CCommandToTextConvert::GetSVOrigin() const<br />
{<br />
__tstring s;<br />
s.clear();<br />
if (m_pCommand->dLong > 0)<br />
{<br />
s.append(_T("Origin: "));<br />
s.append(m_pCommand->sOrigin);<br />
}<br />
return s.c_str();<br />
}<br />
The problem, as mentioned in the code is that when returning, the string gets spoilt. If I make s.c_str() before returning, the result is right. As a result, when trying to append the strings returned by the functions, as each one is wrong, the result is wrong^2
I also tried to do
<br />
const TCHAR* sFoo;<br />
sFoo= new TCHAR[200];<br />
sFoo = s.c_str();<br />
return sFoo;<br />
But the problem remains the same
What on earth can be the problem? Answers will be really welcomed.
José M Castellanos. Troubled rookie programmer
|
|
|
|
|