📄 message-box.zc
字号:
//[c]message box
//[c]
//[of]:license
//[c] Code Browser - a folding text editor for programmers
//[c] Copyright (C) 2003-07 Marc Kerbiquet
//[c]
//[c] This program is free software; you can redistribute it and/or modify
//[c] it under the terms of the GNU General Public License as published by
//[c] the Free Software Foundation; either version 2 of the License, or
//[c] (at your option) any later version.
//[c]
//[c] This program is distributed in the hope that it will be useful,
//[c] but WITHOUT ANY WARRANTY; without even the implied warranty of
//[c] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//[c] GNU General Public License for more details.
//[c]
//[c] You should have received a copy of the GNU General Public License
//[c] along with this program; if not, write to the Free Software
//[c] Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//[cf]
//[of]:imports
import "base/types"
import "user/box"
import "win32/windows"
//[cf]
//[of]:constants
//[c]
public enum message box type
mb ok = MB_OK
mb ok cancel = MB_OKCANCEL
mb yes no cancel = MB_YESNOCANCEL
mb yes no = MB_YESNO
end
//[c]
public enum message box code
id ok = IDOK
id cancel = IDCANCEL
id yes = IDYES
id no = IDNO
end
//[cf]
//[c]
//[of]:message box (parent box, text, title, type)
//[c]
public func message box (
parent: box,
text: string,
title: string,
type: message box type)
def hwnd : HWND
if is nil (parent)
hwnd = nil
else
hwnd = hwnd (parent)
end
def code = MessageBoxA (hwnd, text, title, type: int)
return code : message box code
end
//[cf]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -