- 浏览: 174375 次
- 性别:
- 来自: 南京
文章分类
最新评论
-
zhong504989:
你好。。请问你解决了么?我刚开始搞wap开发,用xhtml来, ...
ASP.NET Mobile Web Form 怎么设置背景图呢? -
xiaoqiang2008:
后台接收代码最好是用java写的
Windows Mobile 上传文件到服务器 -
xiaoqiang2008:
有后台接收的代码吗?能否贴上来看看,谢谢!
Windows Mobile 上传文件到服务器 -
guowee:
大家可以试着用一下ATL的HTML控件,不错的。
Windows mobile HTMLCtrl can not support WML ? -
guowee:
注意: 监控的文件夹名称最后不能有 \
windows mobile 监控 文件夹
最近在研究Windows mobile的时候,想自己做一个弹出类似程序启动时候的小图标,于是查了一下Windows mobile 5的SDK手册。
发现Shows how to establish the shape of a wait cursor. 这个例子。于是详看了一下。
A cursor is a small bit image that reflects the position of a pointing device.
Because standard cursors are predefined, it is unnecessary to create them. To use a standard cursor, an application retrieves a cursor handle by calling the LoadCursor function. A cursor handle is a unique value of the HCURSOR type that identifies a standard or custom cursor.
The following code example shows the syntax for the LoadCursor function.
HCURSOR LoadCursor( HINSTANCE hInstance, // Handle to the application instance LPCTSTR lpCursorName // Name string or cursor resource identifier );
Here, hInstance is a handle to an instance of the module whose executable file contains the cursor to be loaded, and lpCursorName is a pointer to the name of the cursor to be loaded. It can also point to a resource identifier. To use a predefined cursor, the application must set hInstance to NULL and lpCursorName to one of the predefined cursor values.
Windows CE–based platforms implement cursors in different ways depending on the platform configuration. For example, on many Windows CE–based platforms, users interact with applications by tapping the stylus on the screen; because there is no mouse, there is no need for a cursor to indicate the current mouse position. Target platforms not requiring mouse support typically implement Iconcurs.dll. This component enables you to specify only the wait cursor when calling the LoadCursor function. Applications should display the wait cursor when executing a command that renders the current window or the system unresponsive to user input. To establish the shape of a wait cursor, you must call the SetCursor function in conjunction with the LoadCursor function. The following code example shows how to establish the shape of a wait cursor.
SetCursor(LoadCursor(NULL, IDC_WAIT));
Target platforms that support mouse cursors typically include Mcursor.dll. This component implements cursors similar to Windows-based desktop platforms; all standard cursors, except color cursors, are available when calling the LoadCursor function. Windows CE also supports custom cursors.
To create a custom cursor
- Draw the cursor by using a graphics application.
- Include the cursor as a resource in the application resource-definition
file.
Using a cursor resource avoids device dependence, simplifies localization, and enables applications to share cursor designs.
- Call LoadCursor
at run time to retrieve the cursor handle.
Cursor resources contain data for several different display devices. The LoadCursor function automatically selects the most appropriate data for the current display device. To load a cursor directly from a .cur or .ani file, use the LoadCursorFromFile function instead of the LoadCursor function.
Once you create and load a cursor, you can hide and redisplay the cursor, without changing the cursor design, by using the ShowCursor function. This function uses an internal counter to determine when to hide or display the cursor. An attempt to show the cursor increments the counter; an attempt to hide the cursor decrements the counter. The cursor is visible only if this counter is greater than or equal to zero.
Additionally, you can change the design of the cursor by using the SetCursor function and specifying a different cursor handle.
原来实现起来如此之方便啊!
在C++中只要把如下两个方法结合起来使用,就可以了。
SetCursor(LoadCursor(NULL, IDC_WAIT));
SetCursor(LoadCursor(NULL, IDC_NO));
在C#中
try
{
Cursor.Current = Cursors.WaitCursor;
Cursor.Show();
btnLogin.Enabled = false;
}
catch (Exception exp)
{
MessageBox.Show(exp.Message, "错误");
}
finally
{
Cursor.Current = Cursors.Default;
btnLogin.Enabled = true;
}
本文参考了如下文章:
http://topic.csdn.net/u/20080321/13/b73582cd-d9ca-4a04-9d3f-d7e36e7ff869.html
发表评论
-
Windows mobile 菜单(Menu Bar) 更改解决方案
2010-04-07 09:06 2493Windows Mobile 菜单(Menu Bar,C ... -
Windows CE/Windows Mobile开发常见问题解答
2009-12-17 14:44 18061.怎样在一个控件获得 ... -
WM/PPC程序与控制面板命令参数
2009-12-17 14:39 1793不完全正确,不过值得参考: WINDOWS目录下的程序(中英 ... -
PC中如何判断网络已经连接或者断开
2009-12-17 14:38 1646在PPC的开发中有时需要判断网络什么时候连接,什么时候断开,并 ... -
PPC中如何找到正在使用中的网络(源代码)
2009-12-17 14:36 925《PPC中如何判断网络已 ... -
在Windows mobile中如何更改短信会话模式
2009-11-04 11:57 1890在windows mobile 中如何更改短信的会话模式呢。 ... -
GPS短信接收 与 导航软件通信
2009-10-29 14:10 1471这是开这个博客的第一篇文章, 在这里开博客主要是为了写一下以前 ... -
windows mobile MAPI Set EntryID
2009-08-17 16:02 0void CSmsMessage::SetEntryID(SB ... -
控制Windows Mobile手机的键盘操作
2009-08-07 11:59 2692如何控制Windows Mobile 手 ... -
WinCE Dialog 添加 Scrollbar
2009-06-22 16:53 4197如何在WinCE上设置滚动条? 最近再搞winCE ... -
Windows mobile HTMLCtrl can not support WML ?
2009-06-01 10:58 1364最近在使用windows mobile上的HTMLCtrl的时 ... -
Windows Mobile 今日插件开发
2009-05-27 16:06 3946http://blog.csdn.net/doubleblue ... -
Developing in C++ with the HTML Viewer Control
2009-05-22 09:34 2202[转载自MSDN:http://msdn.microsoft. ... -
Mobile开发之路_之小总结
2009-04-18 22:20 17561,从那种基本类中继承的函数 变异时都会自动被调用 2,vo ... -
Windows Mobile中使用htmlCtrl控件
2009-04-18 22:16 2371在某些特殊的应用场合,我们很想要一个类似IE功能的模块,定制自 ... -
推荐几篇关于Windows Mobile程序安装包制作的文章
2009-03-13 15:39 3471转载至:http://www.cnblogs.com/upt ... -
Hiding the Progress Bar of a .NET 2.0 CF WebBrowse
2009-03-11 14:08 1528[转载自:http://www.chriskarch ... -
如何处理屏幕方向改变
2009-03-01 10:02 1137在Windows Mobile平台的应用程序开发过程中, ... -
Windows Mobile中GPRS连接网络
2009-03-01 09:58 1664Windows Mobile程序中如果 ... -
Outgoing SMS intercepting
2009-02-27 14:33 1035http://social.msdn.microsoft.co ...
相关推荐
windows mobile编程起步,简单的一个小教程
Windows Mobile编程杂项笔记
现在Microsoft发布了Visual Studio 2005,这使Windows Mobile编译环境的搭建变得简单的多。下面我就详细地说明搭建Windows Mobile SmartPhone 5.0开发环境及一个简单的程序生成。
有关DirectShow摄像头编程及DirectShow在WindowsMobile下编程的两篇文章,介绍DirectShow的入门知识。
Windows+Mobile编程起步 Windows+Mobile编程起步
这是windows mobile 的快速编程工具 basic for ppc ,是拿来玩玩的,如果正规开发还是建议。net哦 ,因为 我最近研究wm编程要用到,如果您觉得有用,请 为我顶一个. 另外,本资源是免费的,但是俺的资源分实在太少了...
Windows Mobile编程起步,对于初学windows mobile编程的人非常适合
Windows mobile编程环境的配置及连接设置
Windows mobile 6.5常用软件
windows mobile 6 开发蓝牙
众所周知,在windows7操作系统中已经不需要安装active sync 手机同步软件,那么我想在win7系统中手机同步pc机信息,该如何操作呢?清您下载windows mobile center for windows7(vista也是如此)软件,然后将手机与电脑连接...
Windows Mobile 6.5 Final Release Documentation Windows Mobile 6.5 开发文档最终版,--2010/2
WindowsMobile5 源码WindowsMobile5 源码WindowsMobile5 源码WindowsMobile5 源码
获取windows mobile硬件IMEI的方法.
WindowsMobile6 2009 编程手册
如何搭建windows mobile应用开发的环境
Windows Mobile开发实验,wince操作系统定制。
windows+mobile+编程,很好的编程教程。
结合经验和实例软件来介绍Windows Mobile操作系统上的短信开发技术
Windows Mobile编程起步.doc 微软的系统还是很有影响力的