MessageBox User32.dll,如何添加链接(Go编程语言)

huangapple go评论69阅读模式
英文:

MessageBox User32.dll, how to add links (Go programming language)

问题

我发现了如何在Go语言中使用Stackoverflow的这个答案创建一个简单的MessageBox:
https://stackoverflow.com/a/71919136/14997578

这个方法使用了user32 Windows DLL来创建MessageBox。

问题是,现在我需要在MessageBox中添加一个可以点击的链接。我尝试将链接写成普通文本,但输出的结果也是普通文本。

有没有办法在user32.dll的MessageBox中添加链接呢?

英文:

I discovered how to create a simple MessageBox in Go using this Stackoverflow answer:
https://stackoverflow.com/a/71919136/14997578

This uses the user32 Windows DLL to create it.

The problem is that now I need to add a link to it, witch you can click, obviously.
I tried writing the link like normal text but it outputs normal text, too.

Is there a way I can add links to user32.dll MessageBox?

答案1

得分: 1

一个MessageBox只支持图标和纯文本。

使用任务对话框ComCtl v6)和TDF_ENABLE_HYPERLINKS标志。TaskDialogIndirect是序数345。

英文:

A MessageBox only supports a icon and plain text.

Use a Task dialog (ComCtl v6) and the TDF_ENABLE_HYPERLINKS flag. TaskDialogIndirect is ordinal 345.

huangapple
  • 本文由 发表于 2022年7月18日 23:40:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/73025006.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定