SB1 and C++

// Expert user has replied.
N Nicolas Etienne 3 years 7 months ago
11 1 0

Hi
 
Thanks to Nick PRICE, I know that it is possible to launch an exe program done with visual studio 2008 in C++.
 
Step 1:
Create a smart device project with Pocket PC 2003 template... and a console one..
 
Step 2:
Put this code...
MessageBox(NULL,L"ALARME",L"Message",MB_OK);
 
in the tmain...
 
In a index.html file, you can put this:
 
generic.LaunchProcess("\\UserDrive\\apps\\HelloWorld\\nico.exe","");
 
where nico.exe was the executable create by visual studio.
 
---------------------------------------------------------------------
 
Now, few questions....
 
It's nice to display a Messagebox, but what if I want to create my own message box ?
 
I've tried with MFC but it seems that it's not supported by SB1 os ?
 
So, what should I do in order to make it work ?
 
 
What is beyond my request:
 
I'm creating for a customer a program that will alert a user equiped with a SB1 that an alarm occured.
 
at this time, using the notification Push sample from the toolbox, I'm able to do it... but (because there is always a but in dev...), when my "app" is foreground,
it's not brought to front... My index.html contains a playFile which is nicely played by the SB1 (so the user is warned) but the User HAS TO PUSH "HOME BUTTON"
to see the message i've send him...
 
My wished would be to be able to show him the message without having to press "Home button"...
 
If I use the C++ program with MessageBox, the message is well displayed but, messagebox look is not nice.. so I want my home message box...
 
And if I don't use C++ program and launchProcess, I've to push "home"...
 
So, what should I do to achieve this:
 
Push notification from PC to SB1 ==> OK
 
On the SB1:
 
Play a sound ==> OK
Show message without any push button or press screen or whatever ==> My question
 
 
thanks

Please Register or Login to post a reply

1 Replies

H Hayden Eastman

I'm not sure I completely understand your issue, but it seems that you want to create your own notification window and would like it to be on top of the other open windows.  This can be done via the SetWindowPos function.  If you use HWND_TOPMOST as the hWndInsertAfter parameter, the window will be set on top of all other windows.   Hope this helps

CONTACT
Can’t find what you’re looking for?