I am migrating our application database from SQLCE 2.0 to SQL Server Compact
Edition 3.5. We run on Windows Mobile 5.0 and PocketPC 2003.
A wierd thing happens, (and I've only seen one or two similar complaints
after Google search), after our application is palced into the background,
wither by starting another program or going to the today screen. When we
reactivate (or simply click aour app Start Menu shortcut again) our
appication we see ms_sqlce_se_notify_wndproc in the title bar, and our
application does NOT appear. (I actually CAN get our application activated
if I go to "Settings|Memory|Running Programs" select our app, and press
Activate.)
This never happend until we started using the newer SQL Server 3.0/3.5. For
implementation, when our iconified app is clicked, we respond by "invoking"
our executeable again, which has the affect (or used to) of bring the
application to the forground, preserving focus, etc.
Any ideas? I'm baffled. Am I "activating" our application wrong? Is this a
SQL CE or OLEDB error?
Thanks in advance for any words or help! James
James Hunter Ross - 10 Nov 2007 00:50 GMT
Apparently it's an MFC issue on Mobile Devices, whre MFC assumes just on top
level window when it imlpements it's "run app only once" logic. I needed to
override AfxWinMain() and use a more robust imlpementation of code that
activates the window. (MFC assumed one top level window per running UI
process, which is not a safe under windows mobile. The article below
explains, although in the context of bizzare "Default IME" text being
displayed in the title bar.
It is a little nastier still, since our app works on PocketPC 2003 and
Windows Mobile 5.0, both of which use different version of MFC. But, it
works.
James
http://www.pocketpcdn.com/print/articles/?&atb.set(c_id)=51&atb.set(a_id)=7165&a
tb.perform(details)=