|
Here's another link:
http://p2p.wrox.com/content/comdev/ie5xml.asp
Also, after looking a little more closely at MSDN it is a little more thorough than I thought at first. The "XML Dom Methods" section under the XML section (Platform SDK Documentation/Data Services/XML...) should be enough to get you started. I'm up and rolling now.
"Thank you, thank you very much" Elvis.
|
|
|
|
|
Hello ,
Did anyone use the SetMenuInfo API?
I want to use it in a MFC project but all I get is:
'SetMenuInfo' : undeclared identifier message
So can you please tell me what should I include or define or what ...
Thanks!
Best regards,
X3m
|
|
|
|
|
Note: MFC already provide ModifyMenu function that can do what you want.
In case you still want to do it Yourself, here's an example:
BOOL ChangeMenuText(LPTSTR szText, UINT nID, CMenu* pMenu)
{
MENUITEMINFO mii;
memset(&mii, 0, sizeof(MENUITEMINFO));
mii.cbSize = sizeof(MENUITEMINFO);
mii.fMask = MIIM_STATE|MIIM_TYPE;
mii.wID = nID;
mii.fType = MFT_STRING;
mii.dwTypeData = (LPTSTR)szText;
mii.cch = _tcslen(szText);
return ::SetMenuItemInfo(pMenu->GetSafeHmenu(), nID, FALSE, &mii);
}
- God bless the World
|
|
|
|
|
Thank you!
Best regards,
X3m
|
|
|
|
|
|
Where is it?
Best regards,
X3m
|
|
|
|
|
Can you please tell or point me to some information about writing a CBitmap which I create in my app to a .bmp file
Thank you in advance
|
|
|
|
|
Check the Bitmaps & Palettes section here at CodeProject. There's a couple of articles that do what you want.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Are there any demos that show how a SDI program like Macromedia Dreamweaver uses multiple windows. I.e. for every new ducument a new window is opened. I have tried to implement my own attept at this and all i get is the one window that opens all documents.
.NET or not .NET? MFC is the question......
|
|
|
|
|
I'm not sure I've understood your question. If you use SDI, then by design a different app instance is launched every time you double click on a document. Could you please be more specific?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
What i mean is, The app i use has a splash screen and a few other startup features. what i want is a way of creating a new windows from the File>New menu item and when another document is opened while the app is still running.
.NET or not .NET? MFC is the question......
|
|
|
|
|
I see... Well, I have no idea myself, but I found this Usenet article that might be of help to you. Good luck!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hello,
I've got a very simple decision to your problem
Here it is:
void CYourView::OnFileNew()
{
WinExec(AfxGetAppName(),SW_SHOWNORMAL);
}
Add a handler of ID_FILENEW menu from the classwizard in your CView derived class with the above code. Enjoy!
Best regards,
X3m
|
|
|
|
|
now the app keeps re-opening itself and required the PC to be turned off. Is there a way of just re-initialising the main window each time and not the app?
.NET or not .NET? MFC is the question......
|
|
|
|
|
Are you sure you handle OnFileNew in your CView and not in your CMainFrame or CWinApp class?
I have a working code of this if ou wan't I can email it to you?
Best regards,
X3m
|
|
|
|
|
yes if you would do so that would be great. jonathann4@hotmail.com
.NET or not .NET? MFC is the question......
|
|
|
|
|
I sent it to your email.
Best regards,
X3m
|
|
|
|
|
Hi !
I need to check in a C++ app, as precisely as possible, the time spent by the processor in a function.
I have no idea where to start !
Any help will be greatly appreciated !
Jerome
|
|
|
|
|
If you have access to the source code of the program, and the version of your Visual Studio installation is Professional or Enterprise, then you can do a profiling of your code, which gives you more or less accurate summaries of the time spent by the program in each function.
You can start learning about profiling in Visual Studio with Cornell University tutorial Profiling with MS Visual Studio Tools.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi Jerome.
Here's a simple class, it's not my idea, unfortunately I don't know whose copyright it is, I think it's from somwhere at CP:
#pragma once
class CDuration
{
protected:
LARGE_INTEGER m_liStart;
LARGE_INTEGER m_liStop;
LONGLONG m_llFrequency;
LONGLONG m_llCorrection;
public: CDuration(void);
void Start(void);
void Stop(void);
long GetDuration(void) const;
};
inline CDuration::CDuration(void)
{ LARGE_INTEGER liFrequency;
QueryPerformanceFrequency(&liFrequency);
m_llFrequency = liFrequency.QuadPart;
// Calibration
Start();
Stop();
m_llCorrection = m_liStop.QuadPart-m_liStart.QuadPart;
}
inline void CDuration::Start(void)
{ // Ensure we will not be interrupted by any other thread for a while
Sleep(0); QueryPerformanceCounter(&m_liStart);}
inline void CDuration::Stop(void)
{QueryPerformanceCounter(&m_liStop);}
inline long CDuration::GetDuration(void) const
{
return (long)(m_liStop.QuadPart-m_liStart.QuadPart-m_llCorrection)*1000000.0 / m_llFrequency;}
usage e.g.:
CDuration durat;
durat.Start();
FunctionCallToMeasure();
durat.Stop();
long ms_needed = durat.GetDuration();
I think the GetDuration return gives the time in milliseconds. I try to find the docu, then I can tell you more!
Good Luck, Flo
|
|
|
|
|
Thank you a lot for your help !
Jerome
|
|
|
|
|
Hi Jerome
there you find the article, source and demo:
http://www.codeproject.com/cpp/duration.asp
what is your app made for?
mfg HintiFlo
|
|
|
|
|
Thank you for the information !
I'm working on a real-time App, which controls a machine, but we're having problems reaching the required speed of the machine. Thus, I wanted to check where, in the software, we are loosing time ! It's not easy !!!
Tanks again and best regards, (or mfg, should I say !!! )
Jerome
|
|
|
|
|
hi all
i want to read a text file from the sdk dll, the text file is saved at the same path as dll .Basically i want an alternative of App.Path of vb into c++.I have tried getModulefileName and GetCurrentDirectory but in vain.
thanks for stopping by.
cheers
jayant
Jayant Bichhal
|
|
|
|
|
I'm not sure what your problem is. GetModuleFileName returns the complete path of the specified module, so to obtain the path without the name of the module you should do something like:
char strPath[_MAX_PATH];
GetModuleFileName(NULL,path,sizeof(path)/sizeof(path[0]));
char *pSlash=strrchr(path,'\\');
if(pSlash)pSlash[1]='\0'; This gives you the path for the .EXE that loaded your DLL. If what you want is the path of the DLL itself, then replace GetModuleFileName(NULL,...) with GetModuleFileName(hInstance,...) , where hInstance is the hInstance passed to your DllMain entry point.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|