mspocketpc.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

using SHBOXEX

 
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers
Author Message
jianwei



Joined: 22 Feb 2008
Posts: 1

PostPosted: Fri Feb 22, 2008 3:40 am    Post subject: using SHBOXEX Reply with quote

Dear All:

I would like to use SHBOXEX to develop some mobile apps.
but I met some difficulties. does anyone could give me some
suggestions.

I would like to show some pictures or icon in a toast window.
Here is the sample code I am trying:
#include "aygshell.h"
#include "wpcpriv.h"

#include "htmlctrl.h"

#pragma comment(lib,"coredll.lib")
#pragma comment(lib,"ossvcs.lib")
#pragma comment(lib,"aygshell.lib")

BOOL CALLBACK ToastHookProc(HWND hwnd, UINT uMsg,
WPARAM wParam, LPARAM lParam, VOID
*pvUser)
{

BOOL fRes = FALSE;
RETAILMSG(1, (L"The uMsg = 0x%x",uMsg));

switch (uMsg)
{
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
case IDCANCEL:
PostMessage(hwnd, SHBM_CLOSE, wParam, lParam);
break;

} // switch
}
return fRes;

}

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
const TCHAR Info[] = L"Info";
//UINT uiTimeout = 10000;
//LPCTSTR pszText = Text;
HWND hwnd;
LPCTSTR pszTitle = Info;
SH_BOXEX shboxex;
HRESULT hr = S_OK;
int iRet = IDCANCEL;

memset(&shboxex, 0, sizeof(SH_BOXEX));
shboxex.cbSize = sizeof(SH_BOXEX);
shboxex.dwStyle = SHBEXF_TOPMOST | SHBEXF_SETFOREGROUND |
SHBEXF_CLOSE_LIKE_MENUS ;
shboxex.hwndOwner = NULL;

//shboxex.nTimeOut = uiTimeout;

shboxex.info.bi.dwOriginatingIcon = SHNBI_NOTIFICATIONS;
shboxex.info.bi.iXPos = SHBB_DEFAULT_BUBBLEPOS;
shboxex.info.bi.iYPos = SHBB_DEFAULT_BUBBLEPOS;
shboxex.info.bi.cxPos = SHBB_DEFAULT_BUBBLEWIDTH;
shboxex.info.bi.cyPos = -1;
shboxex.info.bi.dwAlign = SHBOX_TOPALIGN;

shboxex.sbextype = sbextToast;
shboxex.info.bi.dwFlags = SHBBIF_HTML;
shboxex.pfnHook = ToastHookProc;

// I would like to show this picture in the pop-up window, but I
found I could display it correctly
TCHAR temp[] = TEXT("");
shboxex.info.bi.pszContent = temp;
shboxex.pszTitle = pszTitle;


hr = SHBoxEx(&shboxex);

return hr;
}
How to use this struct to display a picture in the toast window?
Does the toast window receive a WM_PAINT message?
Thanks in advance..

Archived from group: microsoft>public>pocketpc>developer
Back to top
View user's profile Send private message
Christopher Fairbairn



Joined: 30 Oct 2007
Posts: 57

PostPosted: Mon Feb 25, 2008 3:51 pm    Post subject: Re: using SHBOXEX Reply with quote

Hi,

"jianwei" wrote in message @i29g2000prf.googlegroups.com...
> // I would like to show this picture in the pop-up window, but I
> found I could display it correctly
> TCHAR temp[] = TEXT("");
> shboxex.info.bi.pszContent = temp;
> shboxex.pszTitle = pszTitle;

I am not aware of the API you are utilising, but taking a "semi educated
guess" based upon your code snippet and what I know about Windows Mobile etc
I would suggest trying the following:

TCHAR temp[] = TEXT("");
shboxex.info.bi.pszContent = temp;
shboxex.pszTitle = pszTitle;

Notice the slightly different way to specify the image source url?

Hope this helps,
Christopher Fairbairn

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Money for PPC Can anyone confirm that Money for Pocket PC will not work on Windows mobile 5? I can get in to work on mine anyway. Thanks a lot Stephen

Copying files to EVC++ 3.0 emulator using Post build rules.. I am trying to copy files to the ppc2002 emulator using post build setup under project settings in EVC++ 3.0. I cannot find any information regarding how to use batch commands to copy the files to the target emulator. I have tried env. variables like: $

New Computer My computer crashed last week, so I've just purchased a new one and upgraded to Vista. The new computer recognizes my Pocket PC, it says it is synching, but the Windows mobile device center doesn't open, and I am not really synching. I've tryed removing a

Outlook / Exchange / OMA I set up my Exchange server to support OMA. My Smartphone Audiovox SMT 5600 works great by going to the URL. But instead of using a web-based browser solution on the phone, is there a way to run a rich client on the phone instead of pocket IE? what wo

Hello, I have an application which is the parent of another window. What i would like to do is copy the parent window (as a bitmap) and redraw it to the client - so it looks transparent. The purpose of this is that Im writing an application which will cover over
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group