Skip to content

Instantly share code, notes, and snippets.

@Appendme Appendme/some.cpp Secret
Last active Sep 11, 2019

Embed
What would you like to do?
IAIMPServiceUI* m_ui;
IAIMPUIForm* m_form;
IAIMPUICategory* m_category;
IAIMPUIGroupBox* m_userBox;
IAIMPUIButton* m_authButton;
...
HWND __stdcall OptionsDialog::CreateFrame(HWND parentWnd)
{
if (m_ui == nullptr)
return nullptr;
m_ui->CreateForm(
parentWnd,
AIMPUI_SERVICE_CREATEFORM_FLAGS_CHILD,
String(L"OptionForm"),
nullptr,
&m_form);
if (m_form == nullptr)
return nullptr;
m_form->SetPlacement({ ualClient });
m_form->SetValueAsInt32(AIMPUI_FORM_PROPID_BORDERICONS, 0);
m_form->SetValueAsInt32(
AIMPUI_FORM_PROPID_BORDERSTYLE,
AIMPUI_FLAGS_BORDERSTYLE_NONE);
m_ui->CreateControl(
m_form,
m_form,
String(L"Category"),
nullptr,
IID_IAIMPUICategory,
reinterpret_cast<void**>(&m_category));
if (m_category == nullptr)
return nullptr;
m_category->SetPlacement({ ualClient });
m_ui->CreateControl(
m_form,
m_category,
String(L"UserBox"),
nullptr,
IID_IAIMPUIGroupBox,
reinterpret_cast<void**>(&m_userBox));
m_userBox->SetPlacement({ ualTop });
m_userBox->SetPlacementConstraints({ 110, 0, 110, 0 });
m_ui->CreateControl(
m_form,
m_userBox,
String(L"ButtonAuth"),
nullptr,
IID_IAIMPUIButton,
reinterpret_cast<void**>(&m_authButton));
m_authButton->SetPlacement({ ualRight });
m_authButton->SetPlacementConstraints({ 25, 100, 25, 100 });
return m_form->GetHandle();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.