View Issue Details

IDProjectCategoryView StatusLast Update
0001690NoesisGUIC++ SDKpublic2020-05-28 14:45
ReporterstevehAssigned Tojsantos 
Status resolvedResolutionfixed 
Product Version3.0.0 
Target Version3.0.1Fixed in Version 
Summary0001690: Suggestion: Remove exposed include to platform headers
DescriptionHi guys,

I'm currently moving our code base over to 3.0.0 RC7 (well technically your SVN trunk head revision) in preparation for the 3.0.0 official release. Note: I'm only using the RC to get our code working locally against the 3.0.0 version, I don't plan to submit the integration until you create a tag for the official 3.0.0 release so I have an official version to work against.

I hit another snag. We had several references to FrameworkElement::TryFindResource in our code base. It looks like this has now been removed and replaced with FrameworkElement::FindResource and it no longer looks to throw an error if an invalid resource is requested. I've replaced the instances but then I hit another compile error, similar to the PlaySound error ( It looks like WinAPI redefines FindResource -> FindResourceA / FindResourceW depending on unicode settings (

I think the simplest fix is to remove any reference to #include <windows.h> in the header. Here are the references I could find in the headers:


It would be nice if these platform layer types could be abstracted away into a platform independent type, and then all platform include headers could be removed from external code.

For the time being, I've changed my code to do something like the following:

// Backup the FindResource defintion overridden by WinAPI

#ifdef FindResource
#define FindResourceBackup FindResource
#undef FindResource

// ... Code which uses FindResource

// Restore FindResource

#ifdef FindResourceBackup
#define FindResource FindResourceBackup

This is obviously not ideal, but it gets the code compiling.

Steps To Reproduce- Compile NoesisGUI as a static lib
- Include Noesis Headers
- Try to call FindResource(...). It'll throw a compile error.
TagsNo tags attached.




2020-05-20 10:38

manager   ~0006384

Yes, windows.h again.... :(

Problem is, we want SpinMutex and all headers to be inline (for performance) so what I am going to do is just copying the definitions inside windows.h and put exactly what I need instead of doing include windows.

We will try to solve this in 3.0.1 (3.0.0 is locked now)

Issue History

Date Modified Username Field Change
2020-05-19 15:17 steveh New Issue
2020-05-20 10:35 jsantos Assigned To => jsantos
2020-05-20 10:35 jsantos Status new => assigned
2020-05-20 10:35 jsantos Target Version => 3.0.0
2020-05-20 10:38 jsantos Note Added: 0006384
2020-05-20 10:39 jsantos Target Version 3.0.0 => 3.0
2020-05-26 13:30 jsantos Target Version 3.0 => 3.0.1
2020-05-28 14:45 jsantos Status assigned => resolved
2020-05-28 14:45 jsantos Resolution open => fixed