커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

0 투표
How can I use a custom MFC CDialog class as my "SettingsDialog" or "ContentsDialog"?
I have created my custom CDialog class based on a template (ex. IDD_MYDIALOG). Here I have defined the logic for the binding properties to UI, etc...
However It feels like Wwise is in control of which dialogs get created in the function IAudioPlugin::GetDialog() and I am only able to return the ID of my dialog template such as IDD_MYDIALOG. It looks like a new dialog based on the template is created rather than based on my custom dialog class.

How can I use an instance of my custom CDialog class instead?
Is it something I have to do in the Plugin CWinApp?
What should I then return in IAudioPlugin::GetDialog?
General Discussion Cosimo R. (140 포인트) 로 부터

1 답변

0 투표
You are right that Wwise creates the dialog on its side. The HWND created that represents the dialog is provided through the WindowProc when it is called with the message ID WM_INITDIALOG.

To have an MFC instance constructed by the plug-in, you need to create the instance as a child window of the main dialog window, which you can do by passing the HWND mentioned above as a parent (you can acquire a CWnd* through the MFC function CWnd::FromHandle). The dialog template you provide will be used for the main dialog area: it could be devoid of controls if you intend to implement everything yourself: only the size (width x height) will be used as the size and your child dialog will be constrained to that size.
Samuel L. (Audiokinetic) (23.6k 포인트) 로 부터
Thanks! I've managed to create a custom child dialog, however the style of the controls looks off. How could I make the control look like the various Wwise UI dialog class Spinner,  SuperRange, etc?
You can insert placeholder controls of type Static (aka. labels) that will be replaced by the appropriate control according based on a specially formatted window text: following this page to learn about the format to follow: https://www.audiokinetic.com/library/edge/?source=SDK&id=wwiseplugin_dialog_guide.html#wwiseplugin_dialog_guide_controls_wwise.

The sample plug-ins use this format as well so you can have a look at how their dialog is set up. Here's a link to the .rc of the Wwise Up On Air sample plug-in as reference: https://github.com/audiokinetic/wuoa-plugin/blob/master/WwisePlugin/WoaGain.rc#L57

Here is the Wwise Up On Air segment that goes through the steps: https://youtu.be/dYy7r8vljz0?t=6233
Unfortunately the static placeholder controls are not replaced with the wwise ones when using a custom child dialog. Also the background is grey. Basically the appearance of my dialog is shown as the same as it is in the MFC editor...
Is there another way to style the controls manually?
After verification, placeholders are indeed not replaced recursively, I was misleading you, sorry about that!

If you go the fully custom dialog way, you need to implement your own UI system: Wwise does not know about your sub-dialog.

If you want to use the Wwise Authoring styled controls, the placeholders need to be directly created under the HWND passed by WM_INITDIALOG: either those are present already in the template identified by the ID returned in GetDialog, or you can add programmatically new controls in that initialization function, provided cannot are not MFC instances. You can also use the populate table to bind a model property to other types of Win32 controls such as text fields or checkboxes, and those will also be replaced at instantiation time to use the Wwise implementation.

The best compromise for you may be to only implement specific controls as custom UI elements, which can be MFC instances without any problem, and just use the placeholder controls in the resource template for everything else.
...