Chinese
life is like a box of chocolate,you never know what you r going to get.
Chinese
life is like a box of chocolate,you never know what you r going to get.
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.
I saw the translating version in Chinese.
life is like a box of chocolate,you never know what you r going to get.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.