justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: With Reaper localized there are some quirks when it comes to things Windows display: i.imgur.com/yMonxdi.png (notice how čć become cc) Sometimes we search for hwnds by name and this can become a pain.This is what I've come up with to deal with it: bit.ly/1poiTf7 But I don't like that things are getting reconverted 4 times! Being old Being old win32 guy, do you have any idea how to make this a bit more nicer?
Asked by Martin (93.136.59.x) on April 22 2014, 3:05pm
Reply on April 23 2014, 1:40pm (edited at April 23 2014, 1:44pm):
    You should convert the string you're searching for from UTF-8 to UTF16 (MultiByteToWideChar(CP_UTF8)), then search for the windows and call GetWindowTextW(), and compare the UTF16 strings.

    Edit: or, as Jeffos points out, making a FindWindowUTF8() which calls MultiByteToWideChar(CP_UTF8) and FindWindowW() would be the nicest way to go about this...

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2024 Justin Frankel. | RSS