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
K

krmed

@krmed
About
Posts
321
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Guess your age
    K krmed

    I should really like that test. It says I'm 29 when I'm actually 65!

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge learning question

  • ChartFX Compatiability
    K krmed

    As mentioned in the other answer, you will need to run regsvr32 as administrator on Windows 7 to register the ocx control.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC help c++ announcement learning

  • Finding crash information using the MAP file in vs2005
    K krmed

    I've used CrashFinder[^]quite successfully with VS2005 and even VS2010. Good luck.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC

  • ParseExact - parsing a date with a given format in C++ / MFC
    K krmed

    You can still use the ParseDateTime, but you need to set the format first. Here's what I've done... First, get the current format using

    GetLocaleInfo(m\_LCID, LOCALE\_SSHORTDATE, m\_csOriginalSDateFormat.GetBuffer(MAX\_PATH + 1), MAX\_PATH);
    m\_csOriginalSDateFormat.ReleaseBuffer();
    

    (m_csOriginalSDateFormat is a CString) Next have your own CString with the desired format:

    m_csNewSDateFormat = _T("M/d/yyyy");

    Now, set the desired format, parse the date/time, and restore the original format:

    SetLocaleInfo(m_LCID, LOCALE_SSHORTDATE, m_csNewSDateFormat);
    oleStartTime.ParseDateTime(csDateTime);
    SetLocaleInfo(m_LCID, LOCALE_SSHORTDATE, m_csOriginalSDateFormat);

    Hope this helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

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

  • Get Current View in SDI
    K krmed

    Actually, in an SDI, there is only one document, but there can be many views. In any event (to the OP) the proper way to update views in SDI or MDI is to store and update your data in the document, then call the document's UpdateAllViews method, passing a hint if needed. This automatically calls the OnUpdate method of every view without you having to call it manually. In that method, you can do whatever is necessary to update the view. Hope this helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC help tutorial

  • I Wish Visual Studio Had a Read-Only Lock
    K krmed

    Perhaps the VS Tools/Options/Environment under Documents you can uncheck the Allow editing of read-only files... Then change the files in your model project to read-only (or have them in source control). HTH

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge visual-studio csharp com question

  • I Propose We Rename \ and /
    K krmed

    Or perhaps \ Downhill slash / Uphill slash

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge com question

  • 'Forward Class Declaration' Not Working
    K krmed

    Since the assertion indicates that the mhWnd is NULL, the problem lies in this area:

    Overloaded_Name wrote:

    BOOL CMainDialogDlg::OnInitDialog() { tabCtrl = new CMyTabCtrl; tabCtrl->InitizlizeTabs(); }

    The first line creates an instance of the class, but does not create the window associated with it. The second line tries to insert information into the window - but there is none. As Richard MacCutchen said, you need to Create the tab control. Hope this helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC c++ debugging json

  • Memory Leaks
    K krmed

    I used to have that problem, too. Fortunately, I found the solution, and it worked 1000%. It was fantastic and highly recommended for anyone else experiencing these symptoms. Unfortunately, I forgot what that solution was!

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge algorithms performance question

  • MFC, Threads and Responsive GUI
    K krmed

    You can post a message from your thread to the view that contains your list. Your view can then add the data to the list (or modify it as needed) and then call UpdateWindow() fot the list. UpdateWindow bypasses the normal winproc and is handled immediately by the window. Hope this helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC c++ mobile help question announcement

  • CLabelControl problem
    K krmed

    Your label control does not exist at the point you are trying to hide it. You need to call CDialog::OnInitDialog in your OnInitDialog method before the control exists.

    BOOL CExampleDlg::OnInitDialog()
    {
    CDialog::OnInitDialog();
    CLabelControl* lTest;
    lTest=(CLabelControl*)GetDlgItem(IDC_LABEL_TEST);
    lTest->ShowWindow(SW_HIDE);
    return true;
    }

    Hope that helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

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

  • Why does Windows XP think that nobody else has ever heard of Ctrl-Alt-Del?
    K krmed

    No, you will still be able to log in with Remote Desktop, but a hacker trying to take control of your machine through any open ports won't be able to simulate the Ctrl-Alt-Del to gain access. Any keystrokes he sends won't be put into the login screen, since it's not active.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge question security help

  • Why does Windows XP think that nobody else has ever heard of Ctrl-Alt-Del?
    K krmed

    Actually, the reason for this "secure login" is simple. If someone gains access to your computer (perhaps over the internet), it is not possible to send a Ctrl-Alt-Del to your login screen, therefore they at least can not log on to your computer. If you don't use the Ctrl-Alt-Del screen, the your system is merely waiting for a valid password, which could be sent over a remote link. Makes perfect sense to me.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge question security help

  • Beginner with C++ - Need helps with overload member function error
    K krmed

    Most likely, this is your problem:

    CString CXbeefixedDlg::getCurStrInCombobox(const CComBoBox &a)

    Instead of CComBoBox, it should be CComboBox Hope that helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC help c++ com question learning

  • Pointer Casting warning
    K krmed

    The parentheses you have in

    sgnl_action.sa_handler = (void (*)(int))handle_alarm; /////warning on this line

    looks strange to me. Perhaps

    sgnl_action.sa_handler = (void*)((int)handle_alarm); /////warning on this line

    would solve your problem. Just a guess at the moment - not near my VS to test it.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC c++ question

  • web browser control difficulty
    K krmed

    When you run an application from inside Visual Studio, the working directory is the directory containing the project files (.vcxproj, .sln). However when you run outside of VS, the working directory is the one containing the .exe file. So if you are opening an html file with just a file name (e.g. open "MyTest.html") then that file must exist in the working directory. You should use full path names to avoid this problem. (You can use GetModuleFileName to find out the directory containing your exe). Hope that helps.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

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

  • Finally getting Some Rain
    K krmed

    How well I know. Lived here about 20 years and that's the way it always is!

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge

  • Finally getting Some Rain
    K krmed

    Please be kind enough to send some of it to us in Houston today! We also have been "precipitation challenged" of late, and yesterday only got 0.1 inches. We could use about 10 more (not all at once though!)

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    The Lounge

  • How to set EM_SETCUEBANNER in a Edit Control
    K krmed

    You're probably right that the control has focus, thus preventing the cue banner from showing, however the OP must still insure that it's a Unicode build if TEXT is used. If the build is non-Unicode, the L prefix is required.

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC tutorial

  • How to set EM_SETCUEBANNER in a Edit Control
    K krmed

    The text for your "Username" must be wide character

    case WM_INITDIALOG:
    SendMessage(GetDlgItem(hwnd,IDC_USER), EM_SETCUEBANNER, 0, (LPARAM)L"Username");
    break;

    Other than that, it's supported on WinXP and later - and I believe you need to have WINVER set to 0501 or higher - at least you used to need that. If your project is Unicode, then the TEXT macro will do, but if it's not Unicode, you must use the L prefix to create a wide character string. Hope this helps

    Karl - WK5M PP-ASEL-IA (N43CS) PGP Key: 0xDB02E193 PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

    C / C++ / MFC tutorial
  • Login

  • Don't have an account? Register

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