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
L

Lizp

@Lizp
About
Posts
25
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • PreTranslateMessage Problem???
    L Lizp

    I have a moduless dialog which has WS_CHILD property in a dll and used as an child in a view. when the dialog has focus ,it look the accelerator key massage as a dialog message and does not pass to it's parent(the view),while my purpose is that it should route the msg to the view and the dispatch to any it's child.Please tell me how to achieve this. some presetive code goes: In the view class: BOOL CTestAccelView::PreTranslateMessage(MSG* pMsg) { if(TranslateAccelerator(m_hWnd,m_hAccelTest,pMsg)) return TRUE; if(m_pTestDlgWnd && m_pTestDlgWnd->GetSafeHwnd() ) if(m_pTestDlgWnd->PreTranslateMessage(pMsg)) return TRUE; if(m_pTestDlgWnd2 && m_pTestDlgWnd2->GetSafeHwnd()) if(m_pTestDlgWnd2->PreTranslateMessage(pMsg)) return TRUE; return CView::PreTranslateMessage(pMsg); } In the Dialog class: BOOL CTestDlg::PreTranslateMessage(MSG* pMsg) { if(TranslateAccelerator(m_hWnd,m_hAccelTest,pMsg)) { return TRUE; } if(IsDialogMessage(pMsg)) { return TRUE; } return CWnd::PreTranslateMessage(pMsg); } Scratch

    C / C++ / MFC help tutorial question

  • How to get the caller of a fuction?
    L Lizp

    It's a good idea,but didn't fit my application. Scratch

    C / C++ / MFC tutorial question

  • How to get the caller of a fuction?
    L Lizp

    at run time i want to known a fuction's caller ,how can? for example: void a(int i) { CString szCaller = GetTheCaller(); MessageBox(szCaller); } void b(int j) { a(j); } I'd like to get a message :"void b(int j)" How to implement method "GetTheCaller()" Scratch

    C / C++ / MFC tutorial question

  • XML DOM in ATL
    L Lizp

    Ok,that's it ,thanks. Scratch

    XML / XSL c++ html xml help tutorial

  • How to test a thread handle is valid handle?
    L Lizp

    thank you for your help,but my code goes like: In main thread. if(m_pScanThread && m_pScanThread->m_hThread != NULL) { m_pScanThread->PostThreadMessage(UWM_TIMERON,0,0); } else { m_pScanThread = AfxBeginThread((AFX_THREADPROC)fnScanProc,NULL); if(m_pScanThread && m_pScanThread->m_hThread != NULL) m_pScanThread->PostThreadMessage(UWM_TIMERON,0,0); } Thread function. CoInitializeEx(NULL,COINIT_MULTITHREADED ); try { //Do some Initialize DWORD dwRet; MSG msg; while(dwRet = GetMessage(&msg,NULL,0,0) != 0) { if(dwRet == -1) { continue; } else { if(msg.message == UWM_TIMERON) Scan(...); else DispatchMessage(&msg); } } } catch(...) { return -1;**///Here! if return then the m_pScanThread's( member of the main ///thread)member m_hThread is 0xfeeefeee ///and at this time i want to re - AfxBeginThread...** ::CoUninitialize(); } ::CoUninitialize(); return 0; Scratch

    C / C++ / MFC tutorial question

  • How to test a thread handle is valid handle?
    L Lizp

    I have a thread handle,when the thread exit.the handle is invalid(0xfeeefeee). and i want to clearly when is it valid and when is it invalid. please show me a solution,thanks. Scratch

    C / C++ / MFC tutorial question

  • Enlist the Transaction of two transactional com+ object
    L Lizp

    Object A was configged as "Requer Transaction" property and Object B(Actually is a databass access object to oracle and use ado to access to the datasource) was configged as "Supported Transaction" one.now A will invoke B and B must run in the Transaction context.is that practical and how to write the implement code of enlist the two transaction? thank you. Scratch

    COM oracle com tutorial question

  • Problem with Recordset(ADO)
    L Lizp

    When use VB your advice is work very well,while using VC++ this seem does not work. Scratch

    Database help tutorial question

  • Problem with Recordset(ADO)
    L Lizp

    Hi. After added a record into a Recordset(offline),how to access the new added record? Scratch

    Database help tutorial question

  • How to pass out an array from a com+ object?
    L Lizp

    Thank for your help! And how to avoid registerring the interfaces as automation marshaler? Scratch

    COM c++ com sysadmin data-structures help

  • How to pass out an array from a com+ object?
    L Lizp

    I am developing an application which need to pass an array from a com+ object to the client,the object runs at the server and the client app runs at a workstation.the problem is i can't get the actual array at the client's side. some represetative code follows: //.idl [id(15), helpstring("method GetAllPolicyID")] HRESULT GetAllPolicyID([in,out]long* size,[out,size_is(,*size)] long** PolicyID); //.cpp *size=pRst->RecordCount; *PolicyID=(ULONG*)CoTaskMemAlloc(*size*sizeof(ULONG)); for(long i=0;i<*size;i++) { if(!pRst->adoEOF) { vt=pRst->GetCollect("POLICYID"); (*PolicyID)[i]=vt.lVal; pRst->MoveNext(); } } Scratch

    COM c++ com sysadmin data-structures help

  • What's that?
    L Lizp

    Anybody know? Scratch

    C / C++ / MFC help question

  • What's that?
    L Lizp

    Hi. I am developing a dialog based app.a costum header file for common defination has been included in stdafx.h,when i build the app,the compiler say the common definations is redefined in appname.obj.However after I install the latest MS Platform sdk,the problem disappear.Please tell me why?

    C / C++ / MFC help question

  • How to register a environment variable ?
    L Lizp

    For Visual Studio . Scratch

    C / C++ / MFC csharp visual-studio tutorial question workspace

  • how can get the CPU info!
    L Lizp

    Try GetSystemInfo(). Scratch

    C / C++ / MFC question

  • Where comes the prerolling filter?
    L Lizp

    When I use ICaptureGraphBuilder2::FindInterface() method to find a specific filter (say IAMVideoCompression).It give two messageboxes that "Please wait until preroll is completed!" and ASSERT Failed ((HRESULT)BreakConnect()) >=0) At line 2005 of ..\DXSDK\Samples\Multimedia\DirectShow\BaseClasses\amfi lter.cpp),but my sourcefilter doesn't need preroll and i had not add any prerolling filter to the graph.The reprentative code like : IAMVideoCompression *pVC=NULL; if(FAILED(m_pCapture->FindInterface (&PIN_CATEGORY_CAPTURE,&MEDIATYPE_Video,m_pSF7146,IID_IAMV ideoCompression,(void**)&pVC))) { return S_FALSE; } My work environment is DirectX8.1SDK + VC++6.0 + WinXP. Please help me to release these errors to get my work continue,thank you advaced! Scratch

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

  • How to get the App(.EXE)'s full path in MFC application?
    L Lizp

    It's seem that the App's m_pszAppName and m_pszExeName member only contain the module name,is there a way to get the App's full path? Scratch

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

  • Why cannot I get a DC of a window in sometime after a longtime running
    L Lizp

    It's get work, thank you ! Scratch

    C / C++ / MFC debugging help learning

  • Why cannot I get a DC of a window in sometime after a longtime running
    L Lizp

    Thank you,I will try it. Scratch

    C / C++ / MFC debugging help learning

  • Why cannot I get a DC of a window in sometime after a longtime running
    L Lizp

    Hi All,I have some trouble: The symptom is I have a child window(CStatic)to display status information,it must be updated every second,after a longtime running(maybe 20 minute),then i only got a NULL DC pointer,and then system give me a notification that the resource requred can't acquire.at the same time get into mass. Any help will be appreciated. some representive code(in a method of a CStatic derived class): CDC* pDC=NULL; pDC=GetDC(); if(pDC==NULL) { TRACE("Draw Label Failed!\n"); return FALSE; } CRect rc; if(::GetClientRect(m_hWnd,&rc)) { PaintBk(pDC,rc); int iDC=pDC->SaveDC(); pDC->SetBkColor(0); pDC->SetTextColor(m_FontColor); pDC->SelectObject(&m_Font); pDC->DrawText(m_szLabel,&rc,DT_VCENTER|DT_SINGLELINE); pDC->RestoreDC(iDC); return TRUE; } Scratch

    C / C++ / MFC debugging help 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