Nikolay Sivov (@nsivov) commented about programs/notepad/main.c:
- wchar_t statusTxt[25];
- int lineIndex;
- DWORD selStart;
- DWORD selEnd;
- SendMessageW(Globals.hEdit,EM_GETSEL , (WPARAM)&selStart,(LPARAM)&selEnd);
- if(selStart == selEnd)
Globals.trackedSel = selStart;
- if(selStart < Globals.trackedSel)
currentCol = selStart;
- else
currentCol = selEnd;
- currentLine = SendMessageW(Globals.hEdit,EM_LINEFROMCHAR,currentCol,0);
- lineIndex = SendMessageW(Globals.hEdit,EM_LINEINDEX, currentLine,0);
- swprintf(statusTxt,25,L"Ln %ld, Col %ld",currentLine+1,(currentCol+1) - lineIndex);
Status bar message text should also be localized. You can find examples of how it's done in other modules - it would be using LoadStringW().