Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

magesh

@magesh
About
Posts
6
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Handling the OK button in CPropertySheet
    M magesh

    I have a CPropertySheet with three embedded CPropertyPages. In each page when the user handles some controls, their state is saved in the parent CPropertySheet. When the PropertySheet is dismissed by pressing the OK button, the user selection should be saved in a file. But I do not want the caller of the CPropertySheet to do this saving. Rather I want the CPropertySheet to implement this saving. So I did the following. In the CPropertySheet, I manually added a BN_CLICKED message map entry for IDOK (ClassWizard does not do this). This command handler gets called but the OnKillActive() of the currently visible page is not called (which I badly need). Then I used ClassWizard to add the OnOk handler to one of the pages (and removed this from CPropertysheet). Only when this page is active, this OnOk gets called. When some other page is active, the sheet closes automatically. I do not want to override OnOk() for every page that I add to this sheet, yet I still want the CPropertySheet to handle this message. What should I do? Thanks,

    C / C++ / MFC hardware question

  • Multi/Single selection in a ListBox
    M magesh

    I did not make myself sufficiently clear. I have a list box in a dialog. Depending on an argument to the constructor of the dialog, I want to make this list box either single selection or multi-selection. However, once the selection style is set, It will not change for till the dialog is dismissed. In the resource editor, I'll set selection type to be 'single selection'. Depending on the argument to the constructor, I want to modify the selection type to 'Multi-Selection'. Is there a simple way of doing this without recreating the ctrl or deriving a class from CListBox. I tried ModifyStyle(0, LBS_MULTIPLESEL) in the OnInitDialog() of the dialog. This did not work. Hence this post.

    C / C++ / MFC question

  • Multi/Single selection in a ListBox
    M magesh

    I have a dialog with a listbox. For some invocations of the dialog, I want the listbox to be multi-selection and for other invocations, the listbox should be single-select. In OnInitDialog(), I used ModifyStyle() to change the selection style. But this did not work. Is there a solution without subclassing CListBox?

    C / C++ / MFC question

  • Displaying the Property Sheet for a file
    M magesh

    I tried the following code fragment from the WM_LBUTTONDOWN handler of an SDI app ShellExecute(this->GetSafeHwnd(), "properties", "c:\\temp\\sharedfile.txt", NULL, "c:\\temp", SW_SHOW); The file exists in the specified directory. This call returns the error code SE_ERR_NOASSOC (0x1f) and does not display the property sheet for the file. What's wrong with this code?

    C / C++ / MFC question learning

  • Displaying the Property Sheet for a file
    M magesh

    I tried the following code fragment from the WM_LBUTTONDOWN handler of an SDI app ShellExecute(this->GetSafeHwnd(), "properties", "c:\\temp\\sharedfile.txt", NULL, "c:\\temp", SW_SHOW); This call returns the error code SE_ERR_NOASSOC (0x1f) and does not display the property sheet for the file. What's wrong with this code?

    C / C++ / MFC question learning

  • Displaying the Property Sheet for a file
    M magesh

    Hi, How do I display the same Property Sheet that is shown when we select 'Properties' from the context menu on a file in Windows Explorer. I want to display the properties of a file, but do not want to create a dialog template of my own and populate the dialog with all the information. I want to reuse the resource that Explorer uses. Is this possible? Thanks in advance, Magesh

    C / C++ / MFC question learning
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups