且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Visual Studio 2008中的QuickWin编译错误

更新时间:2022-06-24 03:06:43

我建​​议您更改代码-旧的格式,字符串和内存函数已替换为较安全的版本,试图保护您免受缓冲区溢出的影响.另一种方法是在项目级别#define _CRT_SECURE_NO_WARNINGS = 1.

似乎您需要定义WINVER-也许#define WINVER 0x0601

至于CRedirect,您需要深入研究代码,也许另一个缺少的定义会阻止其被包含.

***的问候
Espen Harlinn
I would suggest that you change the code - the old formatting, string and memory functions has been replaced with safer versions that tries to protect you from buffer overruns. The alternative is to #define _CRT_SECURE_NO_WARNINGS=1 at the project level.

It seems that you need to define WINVER - perhaps #define WINVER 0x0601

As for the CRedirect, you need to dig into the code, perhaps another missing define prevents it from being included.

Best regards
Espen Harlinn


我想您是从头开始制定自己的解决方案,而不是升级现有解决方案.

实际项目中未使用ChildView.h和ChildView.cpp.从解决方案中删除它们.

完成此操作后,只需更改一件事. Microsoft更改了注册线程消息的实现方式,并且不再需要返回值.以下是您需要对其进行编译的唯一更改.

QuickWin.h
I am going to guess that you made your own solution from scratch, rather than upgrade the existing one.

ChildView.h and ChildView.cpp are not used in the actual project. Remove these from your solution.

Once you have done that, there is only 1 thing that needs changing. Microsoft changed the way registered thread messages are implemented, and a return value is no longer needed. Below are the only changes you should need to make to get it compiling.

QuickWin.h
//Line 102: Change
//afx_msg LRESULT OnStdioCommand(WPARAM wParam, LPARAM lParam);
afx_msg void OnStdioCommand(WPARAM wParam, LPARAM lParam);



QuickWin.cpp



QuickWin.cpp

//Line 420: Change
//LRESULT CQuickWinApp::OnStdioCommand(WPARAM wCommand, LPARAM lParam)
void CQuickWinApp::OnStdioCommand(WPARAM wCommand, LPARAM lParam)

//Line 454: Delete
//return 0;




我实际上无法让它做任何有用的事情,因此肯定还有其他需要更改的地方,但是我没有时间去搜索它.希望对您有所帮助.




I couldn''t actually get it to do anything useful, so there must be something else that needs changing too, but I don''t have the time to search for it. Hope this much helps.