Since version 7, RHEL has only x86-64 versions. The same thing happens to CentOS 7. In CentOS 7/EPEL, there is only package for Wine x86-64. However, many Windows .exe files are 32-bit. Even there are 64-bit versions for some software, their installation file is 32-bit. And for some certain software such as Office 2007, 32-bit
Read more
Tag: win32
COM Port Programming in Win32
Posted onThe control support for the COM port under Win32 can be used to operate the COM port, such as a monitoring and control program for a single-chip microcontroller. Below is an example code related to COM port control: // Open COM1 hCOM=CreateFile( “COM1″,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL); if (hCOM==INVALID_HANDLE_VALUE) { MessageBox( GetForegroundWindow(),”Can not open the COM port!”,”Operation Failed”,MB_ICONINFORMATION); return;
Read more
Win32 Programming: Operation on Files
Posted onHere, we show some example code on Win32. The code are operations on file on Win32 OSes. The code here uses some MFC classes. Recursively show the files from a path: void Show(const char *folderPath) { CFileFind finder; CString path(folderPath); path += “*.*”; BOOL bWorking = finder.FindFile(path); while (bWorking) { bWorking = finder.FindNextFile(); cout <<
Read more
SetProxy: 一个设置IE代理的命令行小工具
Posted onIE的代理设置用起来并不方便,我自己而言就要经常更改代理服务器,相信很多人有跟我相同的需要。使用C++编写了一个小程序SetProxy调用Win32 API来设置代理服务器IP,用起来方便多了。 编译后为一个可运行console程序,将它放在\windows\system32目录下,使用时只要运行 SetProxy IP:port 就可以把IP设置好,如果要关闭代理,只需运行 SetProxy “” 命令行中运行,界面较土,但用着方便。可以考虑设置几个快捷方式在桌面或者工具栏,点击即设置代理,其它方式发挥想象。 程序下载地址. 源代码也放在这里,希望有需要的人可以用得上 ;) 源代码下载地址. 这是一份有些年头的代码, 如果你在较新的编译器下编译这个项目, 请先做[[setproxy-一个设置ie代理的小工具#comment-995|这里所述的小修改]]. — Eric on Apr. 9, 2014.
Send Messages to Other Windows Using Win32 API
Posted onIt is simple for basic use. Just the example code. It is clear enough. int SendMsgToOtherWindow( ) { // find window by name HWND wnd = FindWindow( 0, “计算器” ); if ( wnd == 0 ) return 0; // print the child window text HWND cwd = GetWindow( wnd, GW_CHILD ); while ( cwd )
Read more
MFC程序使用系统风格界面
Posted onVC6默认编译出来的程序在XP下Luma风格下运行也是Windows的经典界面, 有损界面的美观与统一. VC2008默认设置下如果不是使用的unicode也是如此. 本文给出使VC6和VC2008可以编译出使用系统界面风格的解决方案. 1. 使VC6编译出使用系统风格的程序 步骤如下: 1) 创建一个.manifest文件的资源. 在res/文件夹下创建一个跟以程序名加.manifest的文件, 如果程序为test.exe, 则创建test.exe.manifest 文件可由此下载: https://www.systutorials.com/t/g/programming/resultcollector.manifest/ 注意要使用utf-8编码保存。 2) 将新定义的资源加入到.rc2文件中, 类型设为24. 打开res/文件夹下的.rc2文件, 在其中加入如下定义: 1 24 MOVEABLE PURE “res/test.exe.manifest” 其中的文件地址按1)步中修改的设置即可. 之后编译即可, 为了使程序界面可能充分利用系统的界面特性, 可以将界面字体设置为TrueType类型的, 利用Windows XP等系统的屏幕字体平滑特性. 2. 使VC2008编译出使用系统风格的程序 在VC2008下就比较简单了, 如果程序字符集使用unicode则默认就是使用系统界面风格的, 如果选择其它的类型, 则编辑下stdafx.h即可. 最后面部分找到这么一段: #ifdef _UNICODE #if defined _M_IX86 #pragma comment(linker,”/manifestdependency:”type=’win32′ name=’Microsoft.Windows.Common-Controls’ version=’6.0.0.0′ processorArchitecture=’x86′ publicKeyToken=’6595b64144ccf1df’ language=’*'””) #elif defined _M_IA64 #pragma comment(linker,”/manifestdependency:”type=’win32′
Read more
Java Calling Native Functions in .DLL on Windows
Posted onHow to call a function in .dll from Java on Windows is introduced in this post with an example. Platforms used: OS: Microsoft Windows XP [5.1.2600] C to .dll compiler: MS Visual Studio 2008 JDK: java -version java version “1.6.0_05” Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)
Read more
How to Install MS Office 2007 on Linux using Wine
Posted onAs a Linux user, I must keep a copy of Windows. One reason is that I should edit MS Office files, such as .doc, .ppt, .xls and .xml (office 2003 xml format) required by, created by or for other using Windows. Wine worked for me with Office 2003 ever but has this or that problem.
Read more