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
S

sps itsec46

@sps itsec46
About
Posts
87
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • How to do not step into system and library source files during debug
    S sps itsec46

    Hi, which version of Visual Studio do you use? MS introduced a feature called "Just My Code" with VS2005 which does exactly what you want. If it is set just your code is debugged and system code is ignored. the catch is that the setting just works for managed code... :( afaik there is no such setting for unmanaged code. How to: Step Into Just My Code[^]

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    Visual Studio debugging csharp c++ visual-studio algorithms

  • Is there an alternative solution to this? [Solved]
    S sps itsec46

    Kudos! Keep on rocking! What's making CodeProject so precious are experts like you! I mean real experts. Not those C# experts (if you feel insulted, insert VB) who think they are experts because they don't know anything else.

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help css com tools json

  • Is there an alternative solution to this? [Solved]
    S sps itsec46

    Makes perfectly sense... thanks for the answer! :rose: No FUD anymore when initializing memory! But tell me one more thing: Is this behavior your personal experience or where did you get that deep knowledge of code optimization?

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help css com tools json

  • Is there an alternative solution to this? [Solved]
    S sps itsec46

    You're right, it should definitely be used for clearing e.g. passwords from memory. But where did you get the info that an initial memset(...) / ZeroMemory(...) is never optimized away? Furthermore I cannot see any info on MSDN that it's a no-go to do the first initialization with SecureZeroMemory(...). Just a speed issue - saving 42 CPU cycles? ;)

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help css com tools json

  • Is there an alternative solution to this? [Solved]
    S sps itsec46

    Paranoid people like me tend to use SecureZeroMemory[^], "as the compiler can optimize a call to ZeroMemory by removing it entirely". Makes me think of this article: Optimization: Your Worst Enemy[^] ;)

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help css com tools json

  • How to identify Enter Key pressed by user ?
    S sps itsec46

    This should help: http://www.codeproject.com/dialog/pretransdialog01.asp[^]

    cheers! mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC question tutorial

  • Upgrading old MFC look to .NET look
    S sps itsec46

    Hi, checkout the following links: http://www.codeproject.com/w2k/xptheme.asp[^] http://www.codeproject.com/cpp/xpstylemfc.asp[^] (regard the comments for VS2005 in the discussion section below the articles)

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC c++ csharp help learning

  • I Need to make the CListCtrl non sortable at run time
    S sps itsec46

    Hi! CListCtrl sounds like MFC (i.e. unmanaged), so I guess you've asked this question in the wrong forum. Try here: Visual C++ / MFC[^] But wait... try if this answers your question:

    CListCtrl yourListCtrl;

    ...

    CHeaderCtrl* pHeader = yourListCtrl.GetHeaderCtrl();
    if(pHeader)
    {
    // (1) do this to enable header push buttons
    pHeader->ModifyStyle(0, HDS_BUTTONS);

    // (2) do this to disable header push buttons
    pHeader->ModifyStyle(HDS_BUTTONS, 0);
    }

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    Managed C++/CLI algorithms json help

  • VisualStudio2003 and .netmodule
    S sps itsec46

    Hi, AFAIK it's currently only supported to compile a netmodule in VS2005 via command line. Currently there is no IDE support for it. Because this really bugged me I looked for another way and ended up changing a single tag in the csproj-file. Before change:

    <OutputType>Library</OutputType>

    After change:

    <OutputType>module</OutputType>

    Works perfectly for me (VS2005) but you've to check if this works in VS2003, too. After you've done this change take care not to change the output type of this project via the IDE anymore. It will of course overwrite your hand-changed tag. Perhaps the following links can help you, too: http://support.microsoft.com/?scid=kb%3Ben-us%3B309805&x=9&y=11[^] http://support.microsoft.com/kb/311416/EN-US/[^]

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    Managed C++/CLI help csharp collaboration question

  • Can I declare a control based on OS version in .h file?
    S sps itsec46

    I guess he wants the decision about the used button class during runtime and not during compile time... ;)

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC question announcement

  • Can I declare a control based on OS version in .h file?
    S sps itsec46

    Obey clickety! It's the law! ;P XWinVer - Simple class to get Windows OS version[^]

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC question announcement

  • How to inherit a MFC class.
    S sps itsec46

    You're welcome! Perhaps next time use search and replace when you rename your classes... ;P

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help question c++ json tutorial

  • How to inherit a MFC class.
    S sps itsec46

    It's not really much info you posted but check if the declaration and definition of the method PreTranslateMessage() is correct. When I look at your BEGIN_MESSAGE_MAP macro your class seems to be called CCustomListCtrl but the definition of PreTranslateMessage() contains a class named CCustomList:

    CCustomList::PreTranslateMessage(struct tagMSG *)

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC help question c++ json tutorial

  • CImageList and a CListCtrl
    S sps itsec46

    Hi, if this is the code you wrote it cannot work. You declared a pointer to CHeaderCtrl and some lines below you access this pointer which you never set. This code compiles fine but certainly it results in a crash! You have to ask your CListCtrl instance for the pointer to its header control... Try the following:

    CHeaderCtrl* m_pHdrCtrl = m_YourListCtrl.GetHeaderCtrl();
    if(m_pHdrCtrl != NULL)
    {
    CImageList * imagelist;
    imagelist = new CImageList();
    ASSERT(imagelist != NULL);
    imagelist->Create(13, 13, ILC_COLOR24, 3, 1);
    CBitmap bm;
    bm.LoadBitmap(IDB_CHECKBOXES);
    imagelist->Add(&bm, RGB(255, 0, 255));
    m_pHdrCtrl->SetImageList(imagelist);
    }

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC tutorial learning

  • how open a website page in MFC
    S sps itsec46

    Checkout the XHyperLink[^] article. There you'll find the static method CXHyperLink::GoToURL() which does some advanced checking instead of just ShellExecute'ing the passed URL. Since the method is static you can just copy&paste the method into your own code if you don't want to use the whole CXHyperLink class.

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC c++ com question

  • Displaying text on a Dialog
    S sps itsec46

    Sorry... what's your question? Please try to write valid English! :omg: Perhaps you meant something completely different but... you don't have to change your resource file (.rc and/or resource.h) by hand. I guess you're using Visual Studio. Open the dialog that contains the static control, select the static with the mouse and enter the new ID for the static in the properties window. Press return, that's it. Visual Studion changes your resource files (.rc and resource.h). Now you can use SetDlgItemText() to programmatically change the text of the static (see my previous post).

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC json learning

  • Displaying text on a Dialog
    S sps itsec46

    That's quite easy... (Step 1) Change the ID of your static control to something other than IDC_STATIC. For example IDC_MY_TEXT. (Step 2) You can set the text of your static control programatically at any place in your code (e.g. in OnInitDialog()) with the following method:

    SetDlgItemText(IDC_MY_TEXT, "Here goes your text!");

    The text can surely be a CString instance or the return value of your getData() method.

    cheers, mykel OMM: "Let us be thankful we have an occupation to fill. Work hard, increase production, prevent accidents and be happy."

    C / C++ / MFC json learning

  • TrackPopupMenu
    S sps itsec46

    if i understood your question correctly, the according KB article in MSDN describes why this workaround is necessary: PRB: Menus for Notification Icons Do Not Work Correctly[^]

    SYMPTOMS
    ...
    When you display a context menu for a notification icon (see Shell_NotifyIcon),
    clicking anywhere besides the menu or the window that created the menu
    (if it is visible) doesn't cause the menu to disappear.
    ...

    RESOLUTION
    ...
    The second problem is caused by a problem with TrackPopupMenu. It is necessary
    to force a task switch to the application that called TrackPopupMenu at some
    time in the near future. This can be accomplished by posting a benign message
    to the window or thread.
    ...

    So the WM_NULL message is used to force a task switch to the calling app, so when you click outside the popup menu, the popup menu disappears correctly.

    cheers, mykel OMM: "Let us be thankful we have commerce. Buy more. Buy more now. Buy. And be happy."

    C / C++ / MFC question help

  • CDlg on active (MFC)
    S sps itsec46

    'ait... according to MSDN i recommend the following:

    TCN_SELCHANGE Notification
    Notifies a tab control's parent window that the currently selected tab has changed.
    This message is sent in the form of a WM_NOTIFY message.

    check MSDN for further details, e.g. the handle to the tab control is passed with the notification. then i guess you can call CTabCtrl::GetCurSel() to get the currently selected tab.

    cheers, mykel OMM: "Let us be thankful we have commerce. Buy more. Buy more now. Buy. And be happy."

    C / C++ / MFC question c++ help

  • CDlg on active (MFC)
    S sps itsec46

    Is your dialog a property page? If yes then try CPropertyPage::OnSetActive().

    cheers, mykel OMM: "Let us be thankful we have commerce. Buy more. Buy more now. Buy. And be happy."

    C / C++ / MFC question c++ help
  • Login

  • Don't have an account? Register

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