|
hi,
maybe you can override "preTh...." function of dialog's parent windows, and send message to this dialog!
|
|
|
|
|
your means is this:
BOOL CDlg::PreTranslateMessage(MSG* pMsg)
{
if (pMsg->message == WM_MOUSEMOVE)
{
SendMessage(WM_USERMOVE,0,0);
}
return CDialog::PreTranslateMessage(pMsg);
}
-------------
LRESULT CMap::OnUserMove(WPARAM wp, LPARAM lp)
{
m_tooltip.RelayEvent(pMsg);
return TRUE;
}
|
|
|
|
|
You can use the GetCurrentMessage function.
If you vote me down, my score will only get lower
|
|
|
|
|
hi,
thanku for your reply,can i do like this?
LRESULT CMap::OnUserMove(WPARAM wp, LPARAM lp)
{
MSG* pMsg = GetCur...; // is this your meanings?
m_tooltip.RelayEvent(pMsg);
return TRUE;
}
thanku again!
|
|
|
|
|
hi,
is your question how to get the information of "pMsg"?
there are two method, maybe answer your request.
1. refer to 'sendmessage' function, it can take information of msg to receiptor like that:
" sendmessage(WM_xxx, wp,lp);"
then , in function "OnusrMove(wp,lp)", you use the parameter of 'wp/lp' to do something.
2. in ' pretranslatemessage' function, call the process 'mousemove' straight.
|
|
|
|
|
hi,
thanku for your reply,but another problem again...
1.the pMsg is MSG* type,and wp or lp is DWORD type, is this can convert to each other?
2.in Pretrans...,can i do like this? -->
... ::Pretrans..(MSG* pMsg)
{
if( ... == wm_mousemove)
{
CMyChildDlg.m_tooltips.RelayEvent(pMsg); // is this ok?
}
...
}
thanks again!
|
|
|
|
|
hi,
1. read the structure of msg in detail,
typedef struct tagMSG {
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
#ifdef _MAC
DWORD lPrivate;
#endif
} MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
wp is pMsg->wPar...
lp is pMsg->lP...
2. maybe yes, i did't check this code. you try to test it.
|
|
|
|
|
hi,
1. for pMsg, there are some other params, just only send/post wp and lp can resolve the problem?
2. ok, i will test it.but cannot now.
thank u again!
|
|
|
|
|
|
I have downdload the the fantastic control named cgfxoutbarctrl,
at http://www.codeguru.com/controls/outbar.shtml[^],now I try to chang the right view of CGfxSplitterWnd(derived from CSplitterWnd).But exception occurs when
runing it and the dialog displays "Unhandled exception in filetitle.exe(MFC42D.DLL):0x0000005 Access Violation".I found the hWnd=??? in the class pointer during debug.
Fllowing is my own code ,please tell me what's wrong with it and how to correct,thanks!!
<br />
void CMySplitterWnd::ChangeView(int row, int col, CRuntimeClass* pViewClass)<br />
{<br />
ASSERT(pViewClass->IsDerivedFrom(RUNTIME_CLASS(CView)));<br />
<br />
CView* pView = STATIC_DOWNCAST(CView, GetPane(row, col));<br />
CFrameWnd* pFrame = pView->GetParentFrame();<br />
ASSERT(pFrame);<br />
<br />
CCreateContext cc;<br />
memset(&cc, 0, sizeof(cc));<br />
cc.m_pNewViewClass = pViewClass;<br />
cc.m_pCurrentDoc = pView->GetDocument();<br />
cc.m_pNewDocTemplate = cc.m_pCurrentDoc ?<br />
cc.m_pCurrentDoc->GetDocTemplate() : NULL;<br />
cc.m_pCurrentFrame = pFrame;<br />
<br />
DeleteView(row, col);
TRACE("Rows=%d,Columns=%d",GetRowCount,GetColumnCount);<br />
VERIFY(CreateView(row, col,
pViewClass,<br />
CSize(0,0),
&cc));<br />
<br />
RecalcLayout();
<br />
CWnd* pWnd = GetPane(row, col);<br />
if (pWnd)<br />
pWnd->SendMessage(WM_INITIALUPDATE);<br />
}<br />
<br />
|
|
|
|
|
Hi all,
please tell me how can i save value of COLORREF type variable in access databse.
what type of variable use for this?
please help me for this.
thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
|
COLORREF is defined as typedef DWORD COLORREF;
-Saurabh
|
|
|
|
|
NUMBER with FieldSize = LONG INTEGER , see [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
how to set monitor frequency using vc++ code?
|
|
|
|
|
If you have sample of MSDN(I dont remember which version) it has an example for it when you run that example it shows to you a list(listbox) of frequencys and resolutions.
|
|
|
|
|
Hello,
I have created an MFC application and want to create a setu for it.
Kindly help me out.
Thanks In Advance.
Dhiraj
|
|
|
|
|
Hi,
You can use Install Shield.
or
You can Create one new Setup Project in Visual Studio.
The price of anything is the amount of life you exchange for it.
Thanks and Regards.
SANTHOSH V
|
|
|
|
|
use inno setup for creating setup of ur project
|
|
|
|
|
|
I can access all data from a single table.But If I want to access selected data from multiple tables then I get an error after executing.
ERROR: ORA-00903: invalid table name
DSN Name: om_ebridge.
Oracle User Name: SCOTT
Table Names: Transaction_Master,Transporter_Master,Supplier_Master,Product_Master.
CString CMyebridgeSet::GetDefaultConnect()
{
return _T("ODBC;DSN=om_ebridge");
}
CString CMyebridgeSet::GetDefaultSQL()
{
//return _T("[SCOTT].[TRANSACTION_MASTER]");(works to access data from single table.)
(But ERROR occurs if the below mentioned INNER JOIN is used to access selected data from multiple tables .Can you please help me access data).
return _T("SELECT TRANSACTION_MASTER.TRANSACTION_CODE,TRANSACTION_MASTER.VEHICLE_NO,TRANSACTION_MASTER.OPERATING_MODE,")
_T("TRANSPORTER_MASTER.transporter_name,SUPPLIER_MASTER.SUPPLIER_NAME,")
_T("PRODUCT_MASTER.PRODUCT_NAME,TRANSACTION_MASTER.unit,TRANSACTION_MASTER.Gross_Wt,TRANSACTION_MASTER.Gross_WtTime,")
_T("TRANSACTION_MASTER.Tare_Wt,TRANSACTION_MASTER.Tare_WtTime,TRANSACTION_MASTER.CONTAINER1_TAREWT,")
_T("TRANSACTION_MASTER.CONTAINER2_TAREWT ,TRANSACTION_MASTER.net_Wt,TRANSACTION_MASTER.Challan_no,TRANSACTION_MASTER.Challan_Wt,")
_T("TRANSACTION_MASTER.No_Of_Units,TRANSACTION_MASTER.Calculated_Wt,TRANSACTION_MASTER.Formula1,")
_T("TRANSACTION_MASTER.Formula2,TRANSACTION_MASTER.Formula3,TRANSACTION_MASTER.Formula4,")
_T(" TRANSACTION_MASTER.location_code,TRANSACTION_MASTER.field1,TRANSACTION_MASTER.field2,TRANSACTION_MASTER.field3 ")
_T("from PRODUCT_MASTER INNER JOIN SUPPLIER_MASTER INNER JOIN TRANSACTION_MASTER")
_T("ON SUPPLIER_MASTER.SUPPLIER_CODE =TRANSACTION_MASTER.SUPPLIER_CODE")
_T("ON PRODUCT_MASTER.PRODUCT_CODE=TRANSACTION_MASTER.PRODUCT_CODE")
_T("INNER JOIN TRANSPORTER_MASTER ON TRANSPORTER_MASTER.TRANSPORTER_CODE=TRANSACTION_MASTER.TRANSPORTER_CODE ");
}
|
|
|
|
|
Hello,
I m using Microsoft Visual Studio 6.0 editor.
When I build my application and when I Execute (ctrl + F5) my application
then again a build dialog box is get displayed (which is displayed during Build (F7)
the application) & it ask me for build the application (having option Yes, No, Cancel).
Date and time set correctly on my machine. It rebuilding just a subset of files. And same files ask for
build each time.
I 'Clean' the application & then Rebuild it, then also
this problem continues. Also I delete the 'Debug' folder from the current directory
& then Rebuild application then also that problem is not solved.
Plz give me solution.
Thanks in advance.
|
|
|
|
|
Have you tried asking here?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi All
How can write data in excel and pdf fle?Plz help me
|
|
|
|
|
|