Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6545663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:36:48+00:00 2026-05-25T11:36:48+00:00

I am writing an editor for my project by using scintilla editor component .

  • 0

I am writing an editor for my project by using scintilla editor component. The editor is for an internal scripting language, having all the basic functionalities like cut,copy, paste etc. As one of the feature I am also providing searching functionality. When a user presses the Ctrl+F ideally it should show this dialog:

Search

But because of some reason CreateDialog API is failing, but the GetLastError returns 0. Also please note that I am using Windows Common Controls.

>>Code for creating dialog

HWND CreateFindDialog(HINSTANCE hInstance, HWND hWnd, UINT id)
{
    HWND dlgHwnd = ::CreateDialog(hInstance, MAKEINTRESOURCE(id), hWnd, FindDlgProc);
    if(dlgHwnd == NULL)
    {
        wchar_t buf [100];
        wsprintf (buf, L"Error x%x", GetLastError ());
        MessageBox (0, buf, L"CreateDialog", MB_ICONEXCLAMATION | MB_OK);
    }

    return(dlgHwnd);
}

BOOL CALLBACK FindDlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
{
    switch(Msg)
    {
    case WM_INITDIALOG:
        MessageBox (0, L"in", L"CreateDialog", MB_ICONEXCLAMATION | MB_OK);
        return TRUE;

    case WM_COMMAND:
        switch(wParam)
        {
        case IDOK:
            EndDialog(hWndDlg, 0);
            return TRUE;
        }
        break;
    }

    return FALSE;
}

>>Resource entry for the dialog

IDD_FIND DIALOGEX 0, 0, 304, 90
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "Find Text"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    LTEXT           "Search String",IDC_STATIC,7,7,44,8
    EDITTEXT        IDC_FIND_TEXT,7,20,217,14,ES_AUTOHSCROLL
    DEFPUSHBUTTON   "Find Next",IDC_FIND_NEXT,243,7,54,16,WS_DISABLED
    PUSHBUTTON      "Find Previous",IDC_FIND_PREVIOUS,243,26,54,16,WS_DISABLED
    PUSHBUTTON      "Close",IDCANCEL,243,45,54,16
    CONTROL         "Match case",IDC_FIND_CASE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,42,52,10
    CONTROL         "Match whole word",IDC_FIND_WHOLE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,55,74,10
    CONTROL         "Wrap around",IDC_FIND_WRAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,116,42,58,10
    CONTROL         "<a>Goto Replace (Ctrl+H)</a>",IDC_FIND_OPENREPLACE,
                    "SysLink",WS_TABSTOP,218,70,79,13
END

The only page talking about the same problem is this: CreateDialog Failed, but GetLastError return 0. I have checked the solution mentioned there but in my project I am linking to comctl32.lib. I have also checked my resource file and the resource header. The dialog entry seems to be proper.


>>Common control initialization

 INITCOMMONCONTROLSEX iccx;
 iccx.dwSize = sizeof(INITCOMMONCONTROLSEX);
 iccx.dwICC = ICC_WIN95_CLASSES|ICC_COOL_CLASSES|ICC_BAR_CLASSES|ICC_USEREX_CLASSES;
 if (!InitCommonControlsEx(&iccx))
    return;

Any suggestion/idea would be helpful. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:36:48+00:00Added an answer on May 25, 2026 at 11:36 am

    The SysLink control requires v6 of comctl32 as explained by the documentation. You are linking to v5 comctl32 and I suspect this is the cause of your error. You need to include the v6 comctl32 application manifest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a simple graphic editor for a university project using C#. I
I am writing a text editor and had planned on using the richtextbox control
A part of the editor i'm writing uses a Wpf-TreeView. I'm using DataBinding and
I'm writing a text editor using C#, I know i'm just reinventing the wheel
I'm writing a blog editor using pyqt4. My issue is this. There is a
I am using the WMD markdown editor in a project for a large number
im writing a chrome extension and need a simple text editor component so that
I'm writing an editor , and would like for the input field to be
I'm writing a sound editor for my graduation. I'm using BASS to extract samples
As an educational project, I'm writing (yet another) editor-style live syntax highlighter in JavaScript.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.