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
W

William Wang

@William Wang
About
Posts
38
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • selam
    W William Wang

    Chinese

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC

  • OOP vs, MFC question...
    W William Wang

    it adds more coupling between YourDialog and clients, assume what does it happen if doing this: D3DMATERIAL9 *pMeterial = new D3DMATERIAL9 ; YourDialog dlg; dlg.SetMaterial(pMeterial); delete pMeterial; dlg.Dosomething(); //this function relies on m_pMaterial it undoubtedly uses an invalid pointer, I think the better way is either change the function name to make callers clear YourDialog instance is attached to D3DMATERIAL9 pointer or maitance a D3DMATERIAL9 object inside of YourDialog class. it's much easier to change function name to: YourDilaog::AttachMaterial(D3DMATERIAL9 *pMaterial)

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC question c++ visual-studio graphics design

  • Proof: Girls = Evil
    W William Wang

    I saw the translating version in Chinese.

    life is like a box of chocolate,you never know what you r going to get.

    The Lounge

  • Escape Key
    W William Wang

    OnCancel is not only called by hitting ESC key, also called by closing dialog box, for settling this, I think u may overwrite CDialog::PreTranslateMessage funcion like this. BOOL CdlgtestDlg::PreTranslateMessage(MSG* pMsg) { if(pMsg->hwnd == m_hWnd || ::IsChild(m_hWnd,pMsg->hwnd) && (pMsg->message == WM_KEYDOWN || pMsg->message == WM_KEYUP)) { if(pMsg->wParam == VK_ESCAPE) return TRUE; } return CDialog::PreTranslateMessage(pMsg); }

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC help tutorial question

  • Escape Key
    W William Wang

    I have two questions:1: r ur dialog boxes modal? 2: how long time did u keep pressing on the ESC key?

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC help tutorial question

  • How to use Internet Explorer with C++ using OLE
    W William Wang

    do u use MFC? if yes, u could use CHtmlView which wraps WebBrowser control.

    life is like a box of chocolate,you never know what you r going to get.

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

  • Code injection
    W William Wang

    does that application has some interfaces functions to allow u to do this?

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC tutorial question

  • How to detect mouse over non client area of List box?
    W William Wang

    U may look up WM_NCHITTEST in MSN, it maybe gives u somehelp.

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC tutorial question

  • Loaded 'C:\WINDOWS\system32\version.dll', No symbols loaded
    W William Wang

    the messages tell u the specific module is being loaded, no symbol file means u couldn't switch in that module's code, and debug step by step.

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC help question announcement

  • FreeImage Library Help [SOLVED]
    W William Wang

    is void CSaverWnd::FadeOn() being called by WM_PAINT corresponding function? if not, CPaintDC dc(this); the dc get in this way will not have a valid clipping filed in screen, means using that dc couldn't paint as u wished. :-)

    life is like a box of chocolate,you never know what you r going to get.

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

  • Subclassing windows controls
    W William Wang

    if u want to handle the messages passed to the controls, I think u will have to subclass them, I couldn't figure out there r some ways else could work out. :-), for the messages passed from controls, u need subclass the controls parent window which u have already done.

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC data-structures question

  • Dynamically Extending Arrays?
    W William Wang

    yes, vector is good choice, except u wanna write a dynamic array by urself.

    life is like a box of chocolate,you never know what you r going to get.

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

  • using Timer in VC++
    W William Wang

    WinAPI Sleep(...) could give u help on delaying 2 seconds.

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC

  • OnLButtonDown
    W William Wang

    Your picture control is a seperate child window to the dialog, so mouse click message is generated and sent to static window, then the static window send WM_NOTIFY message to the parent dialog window, when ur mouse clicks on static control rather than clicking on dialog window. I recommand u to handle this by overwrite CStatic::OnLButtonDown or handle it by CYourDialog::OnNotify. hope this could help u out.

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC

  • Jumping Window ?
    W William Wang

    void CTestView::OnFileNew() { CRect rc; GetWindowRect (&rc); CMainFrame *pFrame = (CMainFrame*)AfxGetMainWnd(); CClientDC dc(this); dc.SetMapMode (MM_TEXT); dc.LPtoDP (&rc); // ClientToScreen (&rc); pFrame->SetWindowPos (&CWnd::wndTop, 0, 0, 200, 100 ,SWP_NOREPOSITION|SWP_NOMOVE); //add one more flag SWP_NOMOVE }

    life is like a box of chocolate,you never know what you r going to get.

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

  • PreTranslateMessage and WM_SETFOCUS
    W William Wang

    the problem is not from the way u try to catch the message, but from the message u want to catch, WM_SETFOCUS cound't be caught, I tried to catch it in the simplest window's program. catch this message before TranslateMessage calls, but still, couldn't get it. somebody knows why?

    life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC c++ javascript question

  • doubt on Activex control
    W William Wang

    I don't think the reason is from COM apartment models, ActiveX controls r working in their own apratment witch initilized by IE . what is the error message? life is like a box of chocolate,you never know what you r going to get.

    COM help com tutorial question announcement

  • how to pass value to MFC exe
    W William Wang

    u may get some clue from COM(DLL) event. event interface is defined in a share file which is shared by both EXE AND DLL, DLL calls the functions defined by event interface, and exe realizes those functions. life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC c++ tutorial

  • Communicating with top level form from child forms
    W William Wang

    seems this is not a standard MFC program, u might post it to Manage C++/CLI forum. life is like a box of chocolate,you never know what you r going to get.

    C / C++ / MFC c++ question

  • Display message from DLL
    W William Wang

    BOOL WINAPI DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved); the first parameter is the dllmodule's instance. life is like a box of chocolate,you never know what you r going to get.

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