   Can't read my file? oO
  Here, this code:FILE* f=_wfopen(L"wtechShaderTemplate.fx",L"rb");//Get the textfile...if(f){UINT Size;//Get the filesizefseek(f,0,SEEK_END);Size=ftell(f);fseek(f,0,SEEK_SET);//Read the templatebyte* Text = new byte[Size];fread(Text,Size,1,f);//And send it to scintillaSendMessage(ShaderEditor.Scintillahw,SCI_SETTEXT, 0, (LPARAM)(LPWSTR)Text);delete Text;}(Sorry for that large space, it is from a switch/case)produces only that: ÿþ/Why?? The ShaderTemplate  file looks like this://----------------------------------------------------------------------------------------------------// Shader template for [w]tech.// Copyright (c) the [w]tech team.//----------------------------------------------------------------------------------------------------//Include the base shader for useful makros and other useful things#include <wtechBaseShader.fx>//Output the diffuse color herefloat3 GetDiffuseColor(PixelShaderInput Input){return float3(1,1,1);}//Emissive goes here. Note that the formula is RGB*A later RG and B can't be > 1float4 GetEmissiveColor(PixelShaderInput Input){return float4(0,0,0,1);}//Color for specular reflectionsfloat3 GetSpecularColor(PixelShaderInput Input){return float3(1,1,1);}//The size of the specular reflectionfloat GetSpecularPower(PixelShaderInput Input){return 50;}//Put your normals in herefloat3 GetNormals(PixelShaderInput Input){return NRM;}//Here is place to modify the vertex positions of a meshfloat3 PreVertexShader(VertexShaderInput Input){return Input.Pos;}#include <wtechPreShader.fx>and it is even in the right folder...I bet I just missed one or two letters in my code :(   
  Is the file in Unicode? You're reading the file contents into a byte array but then casting it to a unicode C-string.   ;  I had similar issues in the past with the unicode identifier in text files (0xFEFF). Try calling this:SendMessage(ShaderEditor.Scintillahw,SCI_SETTEXT, 0, (LPARAM)(LPWSTR)&Text[2]);   ;  Firstly I noticed that you're not null terminating the string. That will cause problems.Going from the documentation at http://www.scintilla.org/ScintillaDoc.html#SCI_SETTEXT SCI_SETTEXT wants a char*, and not a unicode string.Assuming that's correct and the file is in unicode you can use WideCharToMultiByte() to convert it.   ;  Okay, I'll add a null-char to it. I thought it would be there if I load it all out of a file. Anyways, the file wasn't ANSI, and converting to it helped! Thank you guys!   ;  FYI: This is what's happening:A Unicode file generally has a byte order marker at the start of the file, so the loader knows what byte order the file is in, and then following that is the file contents in Unicode.Your file, in hex looks like:FF FE 2F 00 2F 00 2D 00 2D 00 2D 00 2D 00 ...When you convert that into an ANSI string, you only get 3 bytes then a NULL terminator, since it's parsing 1 byte at a time. If you instead read that as a Unicode file, then you can skip the first 2 bytes (Unicode BOM), as Gorax said, and then read 16-bit values as Unicode characters.   