|
From what I could see this is a skeleton piece of source code for you to use and modify as you require, but I doubt that Microsoft will offer much in the way of support. As with so many things you may be the first person to use this, so you become the expert ...
[edit]I also notice that someone downvoted your original question, which may mean that someone (or more than one) does not want this subject discussed here; yeah I know, strange folk around. Good luck anyway.[/edit]
It's time for a new signature.
|
|
|
|
|
Yeah Microsoft did'nt provided much help or documentation on MSDN about this, just a little theory and source code as dump.
I need examples for using listted fucntions and unfortunately no complete source code is given as well. You just need to connect the call and that's it. Every time i call get_symbolsFileName and it returns nothing...
|
|
|
|
|
Hi,
I am opening and writing to an excel sheet using VC6 in an MFC dialog based application.
The excel sheet contains some formulae like Negate and AVERAGE of certain cells. Manually if i enter data in the input field, I need to drag the cells to update them accordingly to the formula... Hope i am making sense...
How can I do this from my code?
Thanks.
|
|
|
|
|
May be this will help you ...
|
|
|
|
|
I'm trying to write an MFC dialog app in VS2008. I put some controls on the dialog and then went to add some event handlers, and found what appears to be a bug in VS2008, unless there is some simple solution that I'm missing.
There are no messages associated with any controls. If I click on a control and then click on the Control Events icon (the lightning bolt), nothing is listed for any control. Because there are no messages listed, I can't add an event handler. (Well, I could do it all manually, but it's easier to use the code generator.)
I've spent the last two hours trying to figure out what's wrong. I see other complaints about the same problem, but no solutions (at least none that work for me).
I'm running VS2008 on a 64-bit Windows 7 system with IE8 installed. Does anyone know what's wrong or how to fix it?
Thanks.
|
|
|
|
|
permutations wrote: There are no messages associated with any controls. If I click on a control and then click on the Control Events icon (the lightning bolt), nothing is listed for any control.
For a message handler, in the Properties window toolbar, click the Messages button and then select the message for which you want to add a handler. From the drop-down list box, select AddMessageHandler to add the message handler selected.
For an event handler, in the Properties window toolbar, click the Events button. Click the plus sign (+) to expand the object for which you want to add an event handler. Select the desired event, and then from the drop-down list box, select Add event.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
|
Same problem here.. Im writting WTL aplication and suddenly for one of my view events list in properties window is gone.
By pure luck, I have found solution. In my code view class was inherited from multiple base classes. I have commented one of the classes and event list was empty:
class CXXXView :
public CDialogImpl<CXXXView>,
public CDialogResize<CXXXView>,
public CWinDataExchange<CXXXView>,
COffscreenDraw<CXXXView>,
CDropFilesHandler,
ITimeLineListener
I just removed commented line, save h file and events is back. Make sure you have
enum { IDD = IDD_XXX_FORM };
in your h file.
|
|
|
|
|
How to stop the popup dialog,if an application embeded a webbrowser control,when opening a webpage which has javascript files,it will popup a dialog ask you to confirm whether to run the scripts.I want to know stop stop the dialog,run the java script as default,really thx!
I am not a genius, but shed more sweat!
|
|
|
|
|
And what does it have to do with C++ ?
|
|
|
|
|
this->put_Silent(VARIANT_TRUE); but how to do that in CHtmlView...
I am not a genius, but shed more sweat!
|
|
|
|
|
LPDISPATCH lpDisp = this->GetApplication();
if(lpDisp == NULL)
return;
IWebBrowser2* lpWeb = NULL;
if(SUCCEEDED(lpDisp->QueryInterface(IID_IWebBrowser2, (void**)&lpWeb)))
{
lpWeb->put_Silent (VARIANT_TRUE);
}
I am not a genius, but shed more sweat!
|
|
|
|
|
Have you already tried CHtmlView::PutProperty(..) ?
virtual void BeHappy() = 0;
|
|
|
|
|
No,remark me that.
I am not a genius, but shed more sweat!
|
|
|
|
|
Hi, i have a popup menu for contextmenu.And i wrote the function for each menu in CMainframe.
I have OnContextMenu() in each view class and in one dialog class.Its works fine in Dialog class.But not in View class.Codings are below:
CMainframe funciton:
void CMainFrame::OnUpdateFptrend(CCmdUI* pCmdUI)
{
((CMainFrame *)AfxGetMainWnd())->SendMessage(WM_COMMAND,ID_TRENDVIEW,NULL);
}
void CMainFrame::OnUpdateFptuning(CCmdUI* pCmdUI)
{
((CMainFrame *)AfxGetMainWnd())->SendMessage(WM_COMMAND,ID_TUNINGVIEW,NULL);
}
Dialog class Contextmenu:
void CFacePlate::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu mnuPopup;
mnuPopup.LoadMenu(IDR_FPMENU);
CRect rBarRect;
rBarRect.left = rBarRect.top = 0;rBarRect.right = 1000;rBarRect.bottom = 300;
CMenu *mnuPopupMenu = mnuPopup.GetSubMenu(0);
ASSERT(mnuPopupMenu);
if( rBarRect.PtInRect(point) )
mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
View class:
void CGroupView::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu mnuPopup;
mnuPopup.LoadMenu(IDR_FPMENU);
CRect rBarRect;
rBarRect.left = rBarRect.top = 0;rBarRect.right = 1150;rBarRect.bottom = 390;
CMenu *mnuPopupMenu = mnuPopup.GetSubMenu(0);
ASSERT(mnuPopupMenu);
if( rBarRect.PtInRect(point) )
mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, this);
}
When i press popup menu from Faceplate(Dialogclass),it goes to Mainframe function.At the same time when i press menu from any view class,it doesnot go to Mainframe function.Why its like that?
Anu
|
|
|
|
|
Try to replace the last parameter (this ) with AfxGetMainWnd() ,
or define your reations for the view too
virtual void BeHappy() = 0;
|
|
|
|
|
I need to turn strings into numbers ASAP, but I'm not sure I've gone about it the right way.
I'm calling into a 3rd party DLL which returns me a load of numbers as text. The text is actually a very basic XML. If I parse the XML, I can tell how many numbers are in the text.
The XML only has 2 elements, so I can parse it myself, but since I use XML in other places as well, I've incorporated MSXML to deal with the XML.
So I get a char* pchValue[PRESET_NUMBER] back from the 3rd party DLL which I turn into a CString for easy handling. It goes through several classes and across a thread or two before ending up in the number crunching class.
The content of pchValue looks like
<MyXMLNode>
0
1
<MyChildNode N="10">
0 1 2 3 4 5 6 7 8 9
</MyChildNode>
</MyXMLNode>
Here, I use MSXML to parse the XML. But the bulk of the information is still in a block of text. So I have to loop through it whilst looking for delimiters using CString::Find() . I chop up the string using CString::Mid(int,int) then use atoi(char*) to get each value which I pile into a member variable char* .
The question is this: is there a quicker and not so complicated way to do this?
Things that worry me are:
MSXML uses a lot of BSTR, so I'm calling a lot of CString::AllocSysString() and FreeSysString(BSTR) .
CString probably isn't the fastest way to work with strings.
But, functions like CString::Find() and CString::Mid(int,int) make my life very easy. I wouldn't know where to start if I couldn't use CString .
I use atoi to convert text into numbers, but from what I can tell this is as fast as you can do that.
So has anyone got any ideas to speed this up without making it too complicated?
Is the way I'm doing this significantly slower than other methods?
Thanks...
Almost, but not quite, entirely unlike... me...
|
|
|
|
|
Are you using MSXML also to query inside the XML , e.g. for obtaining directly the content of the text node "0 1 2 3 4 5 6 7 8 9 "?
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]
|
|
|
|
|
Yes, I do:
MSXML2::IXMLDOMDocument* pXMLDOM;
MSXML2::IXMLDOMNode* pNode;
BSTR bstrContent;
pXMLDOM->get_firstChild(&pNode);
pNode->get_firstChild(&pNode);
pNode->get_text(&bstrContent);
Then something like
CString strContent(bstrContent);
SysFreeString(bstrContent);
int iPos = strContent.Find("\t"); etc etc etc...
Almost, but not quite, entirely unlike... me...
|
|
|
|
|
Well, if the performance is OK, I wouldn't change such approach.
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]
|
|
|
|
|
CPallini wrote: if the performance is OK
That's the thing... I'm thinking it might be too slow.
But I have to balance the time it's going to take me to understand and write lower level code...
Almost, but not quite, entirely unlike... me...
|
|
|
|
|
At first, you may try to discard the CString step and parse directly the BSTR .
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]
|
|
|
|
|
CPallini wrote: parse directly the BSTR.
Sorry for being dim, but does that mean I have to check each character to see what's written?
Almost, but not quite, entirely unlike... me...
|
|
|
|
|
Well, you may consider the BSTR as a wide char string, hence you may use the corrensponding functions like, for instance, wcstok [^].
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]
|
|
|
|