MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / UpdateTextBox

Method UpdateTextBox

src/windows/MessageEditor.cpp:101–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101void MessageEditor::UpdateTextBox()
102{
103 bool mayType = GetDiscordInstance()->GetCurrentChannel() && GetDiscordInstance()->GetCurrentChannel()->HasPermission(PERM_SEND_MESSAGES);
104 bool wasDisabled = EnableWindow(m_edit_hwnd, mayType);
105 EnableWindow(m_send_hwnd, mayType);
106
107 if (mayType && wasDisabled) {
108 SetWindowText(m_edit_hwnd, TEXT(""));
109 }
110 if (!mayType && !wasDisabled) {
111 SetWindowText(m_edit_hwnd, TmGetTString(IDS_CANT_SEND_MESSAGES));
112 }
113}
114
115void MessageEditor::ShowOrHideReply(bool shown)
116{

Callers 1

WindowProcFunction · 0.80

Calls 3

GetDiscordInstanceFunction · 0.85
HasPermissionMethod · 0.80
GetCurrentChannelMethod · 0.45

Tested by

no test coverage detected