MCPcopy Create free account
hub / github.com/bruderstein/nppPluginManager / create

Method create

NppPlugin/src/StaticDialog.cpp:141–164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141void StaticDialog::create(int dialogID, bool isRTL, bool msgDestParent)
142{
143 if (isRTL)
144 {
145 DLGTEMPLATE *pMyDlgTemplate = NULL;
146 HGLOBAL hMyDlgTemplate = makeRTLResource(dialogID, &pMyDlgTemplate);
147 _hSelf = ::CreateDialogIndirectParam(_hInst, pMyDlgTemplate, _hParent, dlgProc, reinterpret_cast<LPARAM>(this));
148 ::GlobalFree(hMyDlgTemplate);
149 }
150 else
151 _hSelf = ::CreateDialogParam(_hInst, MAKEINTRESOURCE(dialogID), _hParent, dlgProc, reinterpret_cast<LPARAM>(this));
152
153 if (!_hSelf)
154 {
155 DWORD err = ::GetLastError();
156 char errMsg[256];
157 sprintf(errMsg, "CreateDialogParam() return NULL.\rGetLastError() == %u", err);
158 ::MessageBoxA(NULL, errMsg, "In StaticDialog::create()", MB_OK);
159 return;
160 }
161
162 // if the destination of message NPPM_MODELESSDIALOG is not its parent, then it's the grand-parent
163 ::SendMessage(msgDestParent ? _hParent : (::GetParent(_hParent)), NPPM_MODELESSDIALOG, MODELESSDIALOGADD, reinterpret_cast<WPARAM>(_hSelf));
164}
165
166INT_PTR CALLBACK StaticDialog::dlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
167{

Callers 1

processActionsFileFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected