MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / Encoding_GetFromComboboxEx

Function Encoding_GetFromComboboxEx

src/Edit.c:866–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

864
865
866BOOL Encoding_GetFromComboboxEx ( HWND hwnd, int *pidEncoding )
867{
868 COMBOBOXEXITEM cbei;
869 cbei.iItem = SendMessage ( hwnd, CB_GETCURSEL, 0, 0 );
870 cbei.mask = CBEIF_LPARAM;
871 if ( SendMessage ( hwnd, CBEM_GETITEM, 0, ( LPARAM ) &cbei ) ) {
872 if ( Encoding_IsValid ( ( int ) cbei.lParam ) ) {
873 *pidEncoding = ( int ) cbei.lParam;
874 return ( TRUE );
875 } else {
876 MsgBox ( MBINFO, IDS_ERR_ENCODINGNA );
877 }
878 }
879 return ( FALSE );
880}
881
882
883BOOL IsUnicode ( const char *pBuffer, int cb, LPBOOL lpbBOM, LPBOOL lpbReverse )

Callers 1

SelectDefEncodingDlgProcFunction · 0.85

Calls 2

Encoding_IsValidFunction · 0.85
MsgBoxFunction · 0.85

Tested by

no test coverage detected