MCPcopy Create free account
hub / github.com/Predelnik/DSpellCheck / create

Method create

src/ui/StaticDialog.cpp:97–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

95}
96
97void StaticDialog::create(int dialogID, bool isRTL, bool msgDestParent) {
98 if (isRTL) {
99 DLGTEMPLATE *pMyDlgTemplate = NULL;
100 HGLOBAL hMyDlgTemplate = makeRTLResource(dialogID, &pMyDlgTemplate);
101 _hSelf = ::CreateDialogIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, (LPARAM)this);
102 ::GlobalFree(hMyDlgTemplate);
103 } else
104 _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, dlgProc, (LPARAM)this);
105
106 if (!_hSelf) {
107 DWORD err = ::GetLastError();
108 char errMsg[256];
109 sprintf(errMsg, "CreateDialogParam() return NULL.\rGetLastError() == %lu", err);
110 ::MessageBoxA(NULL, errMsg, "In StaticDialog::create()", MB_OK);
111 return;
112 }
113
114 // if the destination of message NPPM_MODELESSDIALOG is not its parent, then it's the grand-parent
115 ::SendMessage(msgDestParent ? _hParent : (::GetParent(_hParent)), NPPM_MODELESSDIALOG, MODELESSDIALOGADD, (WPARAM)_hSelf);
116}
117
118INT_PTR StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {
119 switch (message) {

Callers 1

run_dlg_procMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected