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
R

Ramu Pulipati

@Ramu Pulipati
About
Posts
28
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Run Time Error When Using CDatabase
    R Ramu Pulipati

    A guess: Run() on Win32 Service is generally executed on different thread. And CDatabase (may/may not) need MFC initialisation before its being invoked. And AfxWinInit is used to initialse MFC for non-MFC applications. Add the following line in the very begining of the Run() Method if (!AfxWinInit(::GetModuleHandle(NULL), NULL, NULL, 0)) { cerr << "MFC failed to initialize!" << endl; return 1; } and maybe an instance of CWinApp. Check AfxWinInit API in MSDN for more details. Hope this helps! Ram

    C / C++ / MFC c++ database help sysadmin question

  • Problem with the registry
    R Ramu Pulipati

    You have to create RegKey using options 'REG_OPTION_NON_VOLATILE' instead of 'REG_OPTION_VOLATILE'. For more details, Check RegCreateKeyEx API in MSDN. If you are developing MFC/ATL based app...you can use CRegKey for easy registry access. Hope this helps. Ramu

    C / C++ / MFC windows-admin help tutorial question

  • HtmlView
    R Ramu Pulipati

    IWebBrowser2 is protected member variable(m_pBrowserApp) of CHtmlView class. If you are using within CHtmlView derived class u can directly access 'm_pBrowserApp' or else you have to write a delegating function. Hth, Ramu

    C / C++ / MFC tutorial

  • Overwriting COM
    R Ramu Pulipati

    COM supports two kinds of object orientation over binary components with C++. They are Containment and Aggregation. Containment: This is traditional C++ wrapping up style where the new CoClass will implement the desired interface and internally use the Binary component to perform the operations. Aggregation: The new CoClass will delegate the implemented interafce requests to the binary component and any request to the CoClass from binary component will be delegated back. This is a kinda tricky thing and has got restrictions. Like, the component being aggregated should be an In-Proc Server and should support component aggregation. Advantage of Containment Over Aggregation: It doesnt have any restrictions. Advantage of Aggregation Over Containment: You dont have to implement all interface methods by youself in the component. You'll just delegate, this will be handy if interface has lot of methods. Check out COM books for further details. Thanks, Ramu

    COM question com

  • Any Idea why? ....
    R Ramu Pulipati

    What error message does it exactly give ??? Using '&' is not correct. Thanks, Ramu

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

  • About memory leaks
    R Ramu Pulipati

    VC++ debugger does not indicate the memory leaks. You can use CRT libary programatically to check the memory leaks, but this is of not great help compred to third party tools like BoundsChecker, etc. Thanks, Ramy

    C / C++ / MFC c++ debugging performance question

  • Getting shldisp.h
    R Ramu Pulipati

    if you didnt find from vs6, then download ms sdk... http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

    C / C++ / MFC visual-studio help question

  • Capturing the event
    R Ramu Pulipati

    You have to advise the button events (_CommandBarButtonEvents) from m_pButton and add event handlers to the sink map. Hth, Ramu

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

  • Any Idea why? ....
    R Ramu Pulipati

    JohnnyG wrote: memset(&RadarParityTable, 0, sizeof(RadarParityTable)); to memset(RadarParityTable, 0, sizeof(RadarParityTable)); Did you corrected this ??? Hth....;) Ramu

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

  • How to embed information data and retrieve it from other applications
    R Ramu Pulipati

    Yes, you can do it. To be specific it should be ATL COM Dll which implemenets IDExtensibilty2 interface. This COM dll will be loaded when excel comes up. When user chooses to open the selected file, a notification will be fired by excel application to all the listners of IAppEvents. At this stage, component should read from file and stuff it in Excel columns. Check out more for COM add-in dlls in Office applications. Hth, Ramu

    C / C++ / MFC csharp c++ sales tutorial question

  • Help with Doc/View Usage
    R Ramu Pulipati

    Refer to Kb article http://support.microsoft.com/default.aspx?scid=kb;EN-US;q108587 to fetch the document or view class from anywhere in the MFC app. Once you have the document pointer, store the (dialog) data in member variable of document class. void CMyDialog::OnOK() { UpdateData(TRUE); CMyAppDoc * pDoc; pDoc = (((CMDIFrameWnd*)(AfxGetApp()->m_pMainWnd))->MDIGetActive())->GetActiveDocument(); pDoc->m_Data = m_szDialogdata; pDoc->UpdateAllViews(NULL); } - UpdateAllViews inturn will call OnUpdate function internally. So, implement all the view presentation data on OnUpdate(). void CMyAppView::OnUpdate() { //load document using memeber variables //if using formview, call UpdateData(FALSE); } Hth, Ramu

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

  • terminate thread
    R Ramu Pulipati

    There are couple of ways to terminate thread safely based on the problem here is the event approach, - CreateEvent() (named event to use across process'es) - CreateThread (or AfxBEginThread) and pass event as Thread Param - Keep listening to Event Signaling at application atomic times (WaitForSingleObject). - when Event is signaled or job is done, just return (use AfxEndThread() with AfxBeginThread() - MFC way) From main/any thread signal the event, when u want to stop the thread safely. To brutally kill the thread use: TerminateThread() Refer to samples in codeproject.com OR codeguru.com. Hth, Ramu

    C / C++ / MFC help question

  • Single Instance Dialog Box
    R Ramu Pulipati

    Registering a dialog class is not suported(directly) in older versions of windows(9x and NT). Generally we use mutex with GUID for single instance. Check out the kb article: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q243953

    C / C++ / MFC

  • Database ( table Update/Delete)
    R Ramu Pulipati

    Are you opening the RecordSet Connection over 'CRecordset::dynamic'???? Thanks, Ramu

    C / C++ / MFC database mysql announcement

  • Outlook Express data format
    R Ramu Pulipati

    FYI, MSDN has articles abt Outlook Express format! Thanks, Ramu

    C / C++ / MFC help tutorial question

  • Cryptic Error popup
    R Ramu Pulipati

    This is MFC framework error message. This will be occur when you try to open a file which doesnt exist physically. If this problem occurs in InitInstance()..then manually populate the CCommandLineInfo Object. For more info, let us know what u r doing! Hth, Ramu

    C / C++ / MFC announcement csharp c++ visual-studio debugging

  • SAFEARRAY in Variant
    R Ramu Pulipati

    STDMETHODIMPL MyCOMClass::VBMethod(VARIANT * vt) { SAFEARRAY *psa; if(vt == NULL) return E_POINTER; //assuming safearray consists BSTR. if not change to appropriate sa datatype if(vt->vt != VT_BSTR | VT_ARRAY) { return E_INVALIDARG; } psa = vt->parray; ATLASSERT(psa != NULL); //use safe array here return S_OK; } Hth, Ramu

    COM tutorial

  • How to deal with Ghost windows in XP System?
    R Ramu Pulipati

    I never did program for XP specific, still a guess. Are window styles (::GetWindowLong()) same for Ghost(Excutable Mode) & Non-Ghost(Debug Mode) ? If not, make them the similar styles. Use Spy++ to check the styles. Thanks, Ramu

    C / C++ / MFC debugging tutorial question

  • How to keep my server alive
    R Ramu Pulipati

    Couple of bluffs here...;) Go for 'Win32 Service' instead of 'LocalServer'. Will solve all the problems! Just to keep LocalServer running, Fool it! Set the event (hEventShutdown) manually when you want to close the app and dont set the it on CExeModule::Unlock(). I'm not sure this is the correct approach. Thanks, Ramu

    C / C++ / MFC com sysadmin json performance tutorial

  • Copying files/directories
    R Ramu Pulipati

    SHFileOperation() is the one you are looking for! It does have the progress window if you want to use. It does do copy recursive sub-directories. This does copy/rename/delete too...;) all in one package I dont think this is the fastest way but application level safest way as its a high level api. Thanks, Ramu

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

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