Skip to content

Identifying Win XP and and Win2K ???? #2420

@SinghRajenM

Description

@SinghRajenM

Below piece of code does not provide guarantee about detecting WinXp and Win2K

From "ScintillaEditView.h"

void convertSelectedTextToLowerCase() {
         // if system is w2k or xp
         if ((NppParameters::getInstance())->isTransparentAvailable())
                  convertSelectedTextTo(LOWERCASE);
         else
                  execute(SCI_LOWERCASE);
    };

whereas transparentFuncAddr points to "SetLayeredWindowAttributes".

    // Transparent function for w2k and xp //
    //-------------------------------------//
    HMODULE hUser32 = ::GetModuleHandle(TEXT("User32"));
    if (hUser32)
        _transparentFuncAddr = (WNDPROC)::GetProcAddress(hUser32, "SetLayeredWindowAttributes");

I was debugging issue #2417 on Win10. As code is running on win10, I expected to statement execute(SCI_LOWERCASE); (from code snippet 1) to be executed, but it goes to convertSelectedTextTo(LOWERCASE);

In convertSelectedTextTo(LOWERCASE), API CharLowerW does not convert uppercase dotted (İ) to lowercase.
As per MSDN https://msdn.microsoft.com/en-us/library/windows/desktop/ms647467(v=vs.85).aspx unfortunately, there is no indication of success or failure. However, failure is rare. :(

So concerns:
1: Why npp does not hand over case conversion task Scintilla?
2: If Scintilla conversion does not work properly on winXp and Win2K, condition to check winXp and Win2K should be modified, So issue #2417 (or similar) will not occur atleast on Win10 as execute(SCI_LOWERCASE); working perfectly.

Notepad++ v7 (32-bit)
Build time : Oct 13 2016 - 23:29:49
Path : C:\Program Files (x86)\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 10
Plugins : DSpellCheck.dll mimeTools.dll NppConverter.dll NppExport.dll PluginManager.dll

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions