研究wince下的程序设计还不久,大体上感觉和windows下编写程序差不多,但wince只是windows的一个子集,很多在windows下支持的api,在wince下不支持。
这天,发现自己写的wince程序,无论在任务栏,还是在任务切换列表中,都只显示标题而不显示标题左边的那个应用程序定义的小图标,而微软自己写的程序,还有一些厂商写的程序,运行的时候,在任务栏上是同时显示图标和标题文字的,这就奇怪了,又自己编写了几个程序,发现无论是wince sdk,还是mfc的程序都不显示这个图标。
在网上狂搜了一通,不知道这个问题是不是太简单,大侠们都不屑于发表指导意见。
又在msdn上一个一个地浏览以WM开头的消息,终于给我找到一个消息:WM_SETICON,从名字上看,是设置图标的。
WM_SETICON
wParam = (WPARAM) fType; // icon type
lParam = (LPARAM) (HICON) hicon; // handle to icon
两个参数一个是fType,用来指定设定的是大图标还是小图标,分别由宏ICON_BIG和ICON_SMALL指定;另一个是hicon,是图标的句柄,一般用LoadIcon()来载入。
再看这个消息支持的平台,windows ce:requires version 1.0 or later。看来是支持所有wince系统的了。
接下来的事情就好办了,在主窗口的回调函数中,响应WM_CREATE消息,加入一条语句:
SendMessage(hWnd, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, (LPCTSTR)IDI_MYSMALLICON));
搞定。第三个参数ICON_SMALL,在任务栏上显示的是小图标。LoadIcon()载入图标资源,IDI_MYSMALLICON是你定义的小图标的ID,一般是16*16大小。
运行程序,看看任务栏上,是不是在标题左边出现了你定义的小图标?
相关推荐
C#在状态栏显示图标
摘要:C#源码,菜单窗体,状态栏 C#在状态栏显示图标,很简单的程序,希望大家喜欢。
【Win32】 解惑 WM_SETICON中图标变换异常(细!!!)
今天在用SendMessage函数给WM_SETICON发送消息改变图标时发现: 1.如果刚开始设置了wParam参数为ICON_BIG(即设置大图标类型) 的话,WM_SETICON会将窗口标题栏、任务栏、Alt+Tab的图标都设为 由SendMessage传来的lParam参数所指向的图标。 ; BOOL ShowWindow(
白炽灯寿命工程解析:从钨丝蒸发到电压控制的可靠性设计
白炽灯作为一种经典的电光源,其工作原理基于电流通过钨丝产生热辐射发光。在高温下,钨丝会持续蒸发导致灯丝逐渐变细、电阻增大,这是影响其寿命的核心物理机制。从工程角度看,白炽灯的可靠性设计涉及材料科学、热力学和电路设计的交叉,技术价值在于通过理解其失效原理,可以在成本与性能间取得最佳平衡。在实际应用中,电压波动、开关浪涌电流和机械振动是主要寿命杀手,尤其在工业控制、仪器仪表和特定照明场景中,合理的设计能大幅提升系统稳定性。本文深入探讨了钨蒸发、热应力等关键因素,并结合浪涌抑制和降压设计等实战技巧,为工程师提供了
Gemini 2.5 Pro国内免魔法直连教程:5分钟搞定专业级PPT图表(附折线图/柱状图案例)
本文详细介绍了如何利用Gemini 2.5 Pro快速生成专业级PPT图表,包括折线图和柱状图等常见商业图表。通过自然语言交互和智能图表生成功能,用户可以在5分钟内完成数据可视化,大幅提升工作效率。文章还提供了实战案例和高级技巧,帮助用户轻松应对各种商业场景需求。
关于Wince部署时无图标的问题
在Wince系统中部署应用程序,如若需要设置或者更改图标,需要注意两点。 第一点,在项目属性中添加图标时,要注意图标的格式。一般的Wince程序图标文件应由两帧构成,第一帧大小为16*16像素,第二帧大小为32*32像素。这种图标文件的第一帧用于程序以列表方式或者小图标显示,第二帧用于大图标查看显示 第二点,设置或者更改图标后,需要将Wince设备重启。否则的话,可能会出现在开发环境下的输出文
安卓模拟器绕过检测全解析:雷电、MuMu、蓝叠、逍遥、夜神与WSA完整指南
随着手机游戏和应用的普及,越来越多的用户选择在PC上通过模拟器来运行安卓应用。然而,许多应用和游戏为了防止作弊或出于安全考虑,会检测是否运行在模拟器环境中。本文将详细介绍各大主流模拟器的检测绕过方法,帮助用户在电脑上流畅体验各类安卓应用。1. 获取模拟器系统镜像2. 使用ROM厨房工具修改系统文件3. 替换模拟器的系统镜像雷电模拟器:适合游戏,推荐使用MAGISK + EdXposed方案MuMu模拟器:适合中度游戏,推荐太极框架蓝叠模拟器:适合国际应用,推荐MAGISK方案逍遥模拟器。
wince 全屏显示、控制任务栏等
1 using System; 2 using System.Linq; 3 using System.Collections.Generic; 4 using System.Text; 5 using System.Windows.Forms; 6 using System.Runtime.InteropServices; 7 8 namespa...
cst使用局部网格加密,手动加密,special设置等方法合理网格布局加速仿真速度
在CST中,计算复杂模型或者阵列的时候往往需要耗费大量仿真时间,除了使用更高性能的电脑或工作站进行仿真,合理对CST的仿真网格进行适当设置也是必不可少的一步。CST中网格设置影响模拟的精度和速度,因此花时间理解网格过程是很重要的。
110、3A 端到端调试:从 ISP register dump 到主观画质的完整调试流程
文章摘要 本文分享了ISP 3A(AE/AWB/AF)端到端调试的实战经验,通过具体案例解析常见问题排查方法。从硬件链路确认、寄存器dump分析、算法闭环验证到主观画质调优,提出了一套系统化调试流程。重点包括:如何通过示波器和寄存器抓包定位时序问题,AWB调试中black level校正的关键作用,AF闭环控制中hall传感器反馈的重要性,以及算法与硬件联调的"三板斧"方法论。作者强调3A调试本质是系统工程,需结合物理层信号测量、数据通路验证和算法状态跟踪,避免陷入局部优化陷阱。
WinCE 编程技巧集合
1. CString 到 Char* 的方法: 包含头文件 #include USES_CONVERSION; // 定义转换宏 int nNum = fprintf(fp,"%s",T2A(strOld)); // 转换 原理:T2A宏把TCHAR* (CString) 转化为 char* ,vc中这一转换可以自动完成。 2. 把窗口放到最前 HWND hwnd; if(hwnd = Find
多模态轨迹预测:行人、车辆的交互式推理
多模态轨迹预测:行人、车辆的交互式推理 ,人工智能,计算机视觉,大模型,AI,本文围绕多模态轨迹预测中行人与车辆的交互式推理展开,介绍了其定义,即综合多种信息预测交通参与者未来多种轨迹。涵盖基础概念如轨迹表示、模态、交互关系,技术框架包括数据处理、特征提取、预测模型(物理、机器学习、深度学习模型等)及结果评估。还探讨了交互式推理方法、面临的不确定性处理等挑战、应用场景、未来发展方向、相关工具及实际案例,展现了该技术在智能交通等领域的重要性与发展潜力。
WinCE下自定义Shell的方法
考虑到产品外观及风格的一致性,无法直接把Explorer作为Shell,而且,又无简单的把Explorer直接放到后台(会出现一些问题,譬如启动的瞬间,Explorer会显示一下)方法:1. 直接修改Explorer,改为自己的风格。个人认为这是最根本最有效的方法,但是工作量比较大,考虑到时间只能放弃。2. 直接用自己的Shell替代Explorer。在Shell.reg中有一句[HKEY_
全网详细解决Client does not support authentication protocol requested by server;consider upgrading Mysql c
全网详细解决1251 - Client does not support authentication protocol requested by server; consider upgrading Mysql client。
深度学习工具包 DeepLearningToolbox
深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[](https://bitdeli.com/free "Bitdeli Badge")
WINCE启动界面完全定制
一、 EBOOT启动界面LOGOa) 可供备选方案有1. 将图像数据写入NANDFLASH固定位置,优点是图像数据大,不会占用EBOOT大小;2. 直接将图像数据写成头文件,包含到工程中编译,优点是方式容易理解,但按目前的EBOOT大小,能放入320*240的二值图,也就是320*240/8=960Byte。最后选择第二种方案b) 生成一幅LOGO位图,采用PYTHON的图像库将图像变为二值图,再将二值图转为头文件。c) 更改%
蓝牙模块HM-10手册
蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。
WINCE及MOBILE常用代码
原文网址:http://www.cppblog.com/zhangyq/archive/2009/06/26/88579.html 对话框全屏代码 -----在OnInitDialog函数中加入以下代码 m_bFullScreen = FALSE; // Call SHInitDialog with flags for full screen. SHINITDLGINFO shid
IEM模型,地表粗糙度模拟
利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟
文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况
主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。
如何在Wince5.0先建立并使用自己的Shell
环境:Wince5.0+ARM926目的:按照自己的风格建立Shell背景:考虑到产品外观及风格的一致性,无法直接把Explorer作为Shell,而且,又无简单的把Explorer直接放到后台(会出现一些问题,譬如启动的瞬间,Explorer会显示一下)方法:1. 直接修改Explorer,改为自己的风格。个人认为这是最根本最有效的方法,但是工作量比较大,考虑到时间只能放弃。2. 直接用自己的S
uCOS、WinCE、uCLinux嵌入式系统介绍
uCOS、WinCE、uCLinux嵌入式系统介绍 时间:2012-10-18 11:51:49 点击: 152 uCOS-Ⅱ具有可裁剪、源码开放、结构小巧等特点,是一个抢先式的实时多任务内核。VxWorks具有良好的可靠性和卓越的实时性,是目前嵌入式系统领域中使用最广泛的系统。WinCE是针对有限资源平台而设计的多线程、完整优先权、多任务的操作系统。uCLinux是针对无MM
1627



被折叠的 条评论
为什么被折叠?



