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

stanlymt

@stanlymt
About
Posts
18
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with CopyFileW
    S stanlymt

    It did return a nonzero value otherwise it would give a download error.

    C / C++ / MFC help json

  • Problem with CopyFileW
    S stanlymt

    Download was successful and temporary file is perfect!!! But when it is copied it did return a nonzero value but the destination file was corrupted.

    C / C++ / MFC help json

  • Problem with CopyFileW
    S stanlymt

    I'm using CopyFileW to copy a temporary downloaded file to proper location. But in a rare scenario, CopyFileW didnt return any error but first 198,324 bytes of 454,086 bytes of destination file was written empty, rest of data is copied properly. This was used on Windows XP. Please tell me where would have gone wrong.

    C / C++ / MFC help json

  • Editbox identification problem
    S stanlymt

    ID is the Editbox ID in the resource file. If you need to handle differently for each edit box in the dialog, you have to handle it seperately. Otherwise, you can use one button as 'default' button and handle the event there.

    C / C++ / MFC help database

  • Editbox identification problem
    S stanlymt

    You can override default PreTranslateMessage function of the dialog/window class. BOOL CBAMBuildToolDlg::PreTranslateMessage(MSG* pMsg) { if (pMsg->message == WM_KEYDOWN) { if(pMsg->wParam == VK_RETURN) { if (pMsg->hwnd == ::GetDlgItem(*this, IDC_EDITBOXID) //Replace with proper ID { //Handling of the return key for this edit box return TRUE; } } } return CDialog::PreTranslateMessage(pMsg); } I hope the above code snippet will help you. Regards, Stanly

    C / C++ / MFC help database

  • path name
    S stanlymt

    Hi Radhika, You can use string manipulations to remove the prefix of drive letter. There are so many helpful functions in CString class.

    C / C++ / MFC data-structures help question

  • VSS automation problem
    S stanlymt

    I know the control is coming to that thread because I've put some debug logs which was not printing. I think I'll go for recursive version. Thanks a lot for your help.

    C / C++ / MFC testing tools help question announcement

  • VSS automation problem
    S stanlymt

    I found that the CPU is much lesser(30%) than total CPU available. The single get is much faster than recursive version and also it's faster than SS UI. It's better than SS UI. The VSS database is located in remote machine. Is it because of reading from remote machine makes the application to freeze? One thread is to monitor the content of one folder. The control is never reaching this thread, once the 'get' function is called. I tried using timers also, timer event is also not happening. Thanks a lot for your help. Thanks, Stanly

    C / C++ / MFC testing tools help question announcement

  • VSS automation problem
    S stanlymt

    Thanks a lot for responding. I tried using thread to perform 'get'. In this case also, once the 'get' function is called application is not responding to any messages even the message loop of each thread. The 'get' completely blocks other messages. I tried using recursion mechanism to 'get' file. There is a major drawback for this method. The performance is affected to a large extent. It's take very long time to get a big folder because it has to recurse to each folders and subfolders. Thats why I thought of shifting to single call mechanism to 'get' whole folder. Can you please help me with this problem? Thanks, Stanly

    C / C++ / MFC testing tools help question announcement

  • hard disk
    S stanlymt

    DWORD GetSerialNumber(int nDrive) { DWORD dwHDSerialNum = 0; if (!GetVolumeInformation(GetRoot(nDrive), NULL, 0, &dwHDSerialNum,NULL,NULL, NULL, 0)) return (DWORD)-1; return dwHDSerialNum; }

    Hardware & Devices

  • VSS automation problem
    S stanlymt

    I'm using VSS interface in my program. I'm getting the latest version of the file by using Get function in IVSSItemPtr. IVSSItemPtr vssi; COleVariant varBuf(strProjectFolder); vssi = m_vssdb->GetVSSItem( varBuf.bstrVal,0); vssi->Get( NULL,VSSFLAG_USERRONO | VSSFLAG_RECURSYES | VSSFLAG_FORCEDIRYES | VSSFLAG_GETYES ); The above code works perfectly for me. It gets the latest version. But I'm suffering from biggest disadvantage. Once this function is called it disables my main application. No messages are handled by main window, when the Get function is called. Once that function execution is finished then only Window accepts messages. Till then all the messages are blocked. Even all the threads are suspended. For large folders when we use Get function, it's takes very long time and it's quite annoying that Window gets disabled and all background threads are suspended. Is there any way to overcome it? I wanted to monitor the status of the Get function. Is there any way to run background thread to monitor it? Can we enable the Window to accept messages. Thanks, Stanly

    C / C++ / MFC testing tools help question announcement

  • Killing the process
    S stanlymt

    This solution won't work for me because I won't be able to keep track of all spawned windows/applications. Spawned application say MS SQL query analyzer is not created by me. So, that application may spawn other applications. I want to implement the function of Kill Process tree just like in Process Explorer by Mark Russinovich (www.sysinternals.com). Thanks, Stanly

    C / C++ / MFC question

  • Killing the process
    S stanlymt

    The problem with me is that, I'm spawning many process. One process my spawn other process. So my spawned process is having many other spawns. But when I'm terminating the main spawned process, only that process is terminated, not the child processes. I want to implement Kill Process Tree function for my child processes. Thanks, Stanly

    C / C++ / MFC question

  • Killing the process
    S stanlymt

    How will I kill all the spawned processes of my application? I dont want to kill my main application, but only the all other processes spawned by my main application? Is there any articles related to this? Thanks, Stanly

    C / C++ / MFC question

  • handling the RETURN key
    S stanlymt

    This is not the proper way of handling RETURN Key. If you have more than one edit box and if you want to handle RETURN in different ways for each edit box, then this method fails. Check the below code: BOOL CApplyValue::PreTranslateMessage(MSG* pMsg) { if (pMsg->message== WM_KEYDOWN && pMsg->wParam == VK_RETURN) { if (pMsg->hwnd == ::GetDlgItem(*this, IDC_EDIT1) //Replace with proper resource ID { //Do your processing for Edit box1 GetDlgItem(*this, IDC_EDIT2)->SetFocus(); //If you want to set focus to next edit box } else if(pMsg->hwnd == ::GetDlgItem(*this, IDC_EDIT2) { //Do your processing for Edit box2 } return TRUE; } return CDialog::PreTranslateMessage(pMsg); }

    C / C++ / MFC help

  • Checking for Software installed.
    S stanlymt

    Thanks a lot!!! Thanks, Stanly

    C / C++ / MFC tutorial question announcement

  • Checking for Software installed.
    S stanlymt

    I mean not my software. I want to check whether certain softwares(Visual Studio, SQL Server like that) are installed in the system or not? Thanks, Stanly

    C / C++ / MFC tutorial question announcement

  • Checking for Software installed.
    S stanlymt

    How will I know programmatically, software installed in the system? How to check whether the installed software is correct version? Is there any article related to this? Thanks, Stanly

    C / C++ / MFC tutorial question announcement
  • Login

  • Don't have an account? Register

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