需要一些帮助以找到代码中的Windows函数:: blocks [英] Need some help finding some windows functions in code::blocks

查看:86
本文介绍了需要一些帮助以找到代码中的Windows函数:: blocks的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我现在必须使用code :: blocks,因为MSVC目前不是一个选项,并且我在查找某些我偶尔会使用的功能时遇到了一些困难在MSVC中进行编程.我正在使用mingw编译器附带的commctrl.h和libcomctl32.a文件,这些文件与Code :: Blocks打包在一起,我试图使用SetWindowSubclass和DefSubclassProc函数,但是编译器说它们丢失了.有人可以帮我找到他们吗?另外,如果可能的话,我对MSVC编译器会更自在,是否有可能无需安装任何内容即可获得编译器本身?我想念能够通过#pragma注释来包含库.

实际上,所有这些的解决方案,有人知道MSVC的可移植版本吗?因为我正在尝试在需要管理权限才能安装任何东西的计算机上获得不错的C ++ IDE/编译器.现在,我只是在跳接驱动器上安装了代码块,将文件夹复制到了计算机上,并且可以正常工作,但功能要少一些(#pragma注释,不能).对于任何关心的人,我需要编译器的原因是,我正在上高中编程班,并且他们已向我们租用了配备Mac和Windows的笔记本电脑,并且我在家中使用PC进行编程,因此我想在笔记本电脑的Windows部分上使用MSVC,但它们会限制所有安装,实际上只为我们提供了使用Mac版XCode的选项.太烂了,我无意开发Mac应用程序:P,对macs没有冒犯,只是不喜欢我喝杯茶.

Hi, i''m having to use code::blocks currently because MSVC isn''t currently an option, and i''m having some difficulty finding some functions that i use occasionally when programming in MSVC. I am using the commctrl.h and libcomctl32.a files that came with mingw compiler that came packaged with Code::Blocks and i''m trying to use the functions SetWindowSubclass and DefSubclassProc, but the compiler says they''re missing. Can someone help me find them? Also, if it''s possible, i''m alot more comfortable with the MSVC compiler, is it at all possible to obtain the compiler itself without having to install anything? i miss being able to include libraries via #pragma comment.

actually, a solution to all of this, does anyone know of a portable version of MSVC? because i''m trying to get a decent C++ IDE/Compiler on a computer that requires administrative permissions to install anything. For right now, i''ve just installed code blocks on a jump drive, copied the folder over to the computer, and it works fine minus slightly less functionality (#pragma comment and what not). For anyone who cares, the reason i need the compiler is that i''m in a high school programming class and they''ve rented us laptops with both mac and windows, and i use my PC at home for programming so i wanted to use MSVC on the windows portion of the laptop, but they restrict any installs, and really only give us the option of using XCode for Mac. which sucks, and i have no intention of developing Mac applications :P, no offence to macs, just not my cup of tea.

推荐答案

问题不在于C: :B,但是编译器的版本(我想是MinGW),尤其是窗口支持库的版本.

要保留在MS文档中,该功能应保留在Commctrl.h中,并由Comctl32.lib链接到Comctl32.dll.

使用MinGW约定,您应该#include<commctrl.h>并告诉链接器链接
libKernel32.a,libuser32.a,libgdi32.a和libComctl32.a
(请注意,lib前缀和.a后缀是由链接器本身添加的,如果缺少的话)

另外,包括< windows.h>在< commctrl.h>之前,并检查是否存在适当的TCHAR_H支持.
可能是您必须明确引用DefSubclassProcW DefSubclassProcA.
(只需在Commctrl.h中搜索其声明)
The problem is not C::B, but the version of the compiler (I suppose MinGW) and in particular of window support library.

To stay with MS documentation the function should stay in Commctrl.h, and linked by Comctl32.lib towards Comctl32.dll.

With MinGW convention, you should #include<commctrl.h> and tell the linker to link
libKernel32.a, libuser32.a, libgdi32.a and libComctl32.a
(note that the lib prefix and the .a suffix are added by the linker itself, if missing)

Also, include <windows.h> before <commctrl.h>, and check if proper TCHAR_H support exist.
May be you have to refer explicitly to DefSubclassProcW or DefSubclassProcA.
(just search in Commctrl.h for their declarations)


为什么不下载
您的学校为您提供与发展相关的内容吗?如果这是用于学校项目,那么您的IT部门可能会为您安装它.
Why don''t you just download Visual Studio 2010 Express[^]? It is free and has the full software development kit necessary for developing Windows applications already included.

When you say "MSVC" (the language: Microsoft Visual C), do you actually mean "MSVS" (the development environment: Microsoft Visual Studio)?

What does your school provide for you to do development with? If this for a school project, then maybe your IT department will install it for you.


这篇关于需要一些帮助以找到代码中的Windows函数:: blocks的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆