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 6198043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T03:55:44+00:00 2026-05-24T03:55:44+00:00

According to msdn, http://msdn.microsoft.com/en-us/library/bb774798%28VS.85%29.aspx , returning TRUE prevents user from editing labels. So I

  • 0

According to msdn, http://msdn.microsoft.com/en-us/library/bb774798%28VS.85%29.aspx,
returning TRUE prevents user from editing labels.

So I wrote the code below:
Main:

WinMain(...)
{
    DialogBox(..., DlgProc)
}

DlgProc:

DlgProc(...)
{
    switch(message) {
    case WM_NOTIFY:
        if((NMHDR *)lParam->code == LVN_BEGINLABELEDIT) {
            return TRUE;
        return FALSE;
    ...
}

Still, the labels can be edited. I dont want to cancel the style LVS_EDITLABELS, because sometimes I would like to allow the users edit labels.

Does anyone know the problem? Thank you.

  • 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-24T03:55:45+00:00Added an answer on May 24, 2026 at 3:55 am

    Returning TRUE from a DialogProc() doesn’t mean what you think it does. Quoting from the MSDN library article:

    Typically, the dialog box procedure should return TRUE if it processed
    the message, and FALSE if it did not. If the dialog box procedure
    returns FALSE, the dialog manager performs the default dialog
    operation in response to the message.

    If the dialog box procedure processes a message that requires a
    specific return value, the dialog box procedure should set the desired
    return value by calling SetWindowLong(hwndDlg, DWL_MSGRESULT, lResult)
    immediately before returning TRUE. Note that you must call
    SetWindowLong immediately before returning TRUE; doing so earlier may
    result in the DWL_MSGRESULT value being overwritten by a nested dialog
    box message.

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

Sidebar

Related Questions

According to http://msdn.microsoft.com/en-us/library/aa984351%28VS.71%29.aspx Disabling the first or toplevel menu item in a menu (for
According to MSDN: http://msdn.microsoft.com/en-us/library/ms649052%28VS.85%29.aspx Adds the specified window to the chain of clipboard viewers.
According to MSDN ( http://msdn.microsoft.com/en-us/library/system.windows.forms.label.autosize.aspx ), there's a note about Label 's AutoSize property:
According to http://msdn.microsoft.com/en-us/library/ms810291.aspx , you can't change the ReadOnly attribute of an Expression based
I'm using ICommandText::GetCommandText method. According to the MSDN documentation ( http://msdn.microsoft.com/en-us/library/ms709825(v=VS.85).aspx ) I need
I was reading custom serialization article on msdn: http://msdn.microsoft.com/en-us/library/ty01x675%28VS.80%29.aspx It mentions that there are
According to the MSDN documentation ( http://msdn.microsoft.com/en-us/library/ms172987.aspx ), the My.Application.Log property is used to
I was looking at http://msdn.microsoft.com/en-us/library/szywdw8k%28VS.80%29.aspx and part of the code didn't make sense to
According to MSDN (http://msdn.microsoft.com/en-us/library/dd487208.aspx), there is an object called DbDataReader that is created in
According to : http://msdn.microsoft.com/en-us/library/ms175061.aspx It says that the NOT LIKE relational operator : Specifies

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.