|
I've already seen it but it's written that it is running on Windows CE!!
When I try to compile the code from the URL the compiler doesn't know the structure PPERF_DATA_BLOCK, PPERF_OBJECT_TYPE, PPERF_INSTANCE_DEFINITION, PPERF_COUNTER_BLOCK and PPERF_COUNTER_DEFINITION. And I don't find it in the MSDN.
|
|
|
|
|
I'm not sure I understand your first sentence. Be careful with MSDN, there are usually two definitions when you search for something. One is for CE and one is for standard Win32. The ToolHelp API functions work under CE and 98 so you might have been looking at the CE example.
The PPERF_* structures are defined in WinPerf.h. The "PP" mean pointer to structure so if you take the first "P" off, you can see them in MSDN (look for PERF_DATA_BLOCK instead of PPERF_DATA_BLOCK).
|
|
|
|
|
I have been looking for "toolhelp" and there was only "toolhelp module" in the MSDN...
Now, it's working.
Thank you.
|
|
|
|
|
I found an "easier" way using windows hook that works both on 98 and on NT.
I create a dll to hook messages from the window and in the dll function that get the messages, i can call GetModuleFileName as the dll is maped to the process adress space .
|
|
|
|
|
Hello.
Actually I am using SQLConfigDataSource() to create a DSN User or System but now I need to create a ODBC DSN File.
I need this to connect a report made by Crystal Reports to SQL server at run time because de Server name change.
Which is the function to create a DSN File in the default common ODBC directory?.
Thanks in advance.
|
|
|
|
|
What is the way I can debug reference counting ? Can I print out a list of all AddRef() and Release() calls ?
|
|
|
|
|
#define _ATL_DEBUG_INTERFACES in your stdafx.h and rebuild. this will show you every AddRef and Release.
-c
Conservative:
One who admires radicals centuries after they're dead.
-- Leo C. Rosten
|
|
|
|
|
It seems that if compile a DLL under VS.NET, I'm no longer able to use it from an executable compiled under VS 6.0 (even if re-compiled) .
Does anybody know about the MFC 6.0 / MFC 7.0 compatibility issues ?
Exe using MFC 6.0 with a DLL using MFC 7.0 ?
Exe using MFC 7.0 with a DLL using MFC 6.0 ?
All are compiled with dynamically linked MFC libraries.
Thank you for your answers !
|
|
|
|
|
It stands to reason that if your app is compiled to use MFC 4.x and your DLLs are using MFC 7,0. you'll have problems.
Link statically.
|
|
|
|
|
i have defined a global handle to MUTEX and creating it in one funtion and releasing in the other funtion, but it won't allow me to do so. what to do for it. i need to own it. how it is possible
|
|
|
|
|
Before release it,you should unlock it first
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
You can't have one thread aquire the mutex and another release. If you are trying to do this in the same thread, then you have other problems.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
Hello friends,
for what are the 4 digits (x.x.x.x) mostly used? I mean for what should i use the four digits?
Sorry for this silly questions, but i really want to know that.
Thank you for your help!
Fiffi
|
|
|
|
|
Version numbers:
Major.Minor.Patch.Build is what we use it for.
1.2.1.53
Version 1.2A build 53.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
Hello Tim,
Thank you very much for your Help!
Fiffi
|
|
|
|
|
major.minor.patch.build
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
Hi,
I'm dynamically creating an object like this:
CRuntimeClass * p_Rt;
p_Rt = RUNTIME_CLASS(CMyClass);
m_pMyClass = (CMyClass *) p_Rt->CreateObject();
which works fine. But how can i delete this object (the m_pMyClass) ?
if i try to delete it, i get a compiler error because the destructor in CMyClass is protected (becuase thats what classwizard set it to be; part of the whole DYNCREATE thing).
if i don't delete it, i get a memory leak. I must be missing something i think.
thakns jon
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
1) Do you really need the DYNCREATE features?
2) you can freely move c'tor and d'tor to public section and call the directly:
CYourClass *p = new CYourClass;
delete p;
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Not sure if i need DYNCREATE. I need automation, which MSDN leads me to believe depends on DYNCREATE.
Jon
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
Jon Hulatt wrote:
if i try to delete it, i get a compiler error because the destructor in CMyClass is protected (becuase thats what classwizard set it to be; part of the whole DYNCREATE thing).
IIRC, that's a minor bug/feature in the class wizard. You can just change the destructor to be declared public, and voila, problem solved. DYNCREATE doesn't care about the destructor, it just needs a default constructor.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
I need to set a checkmark on one of the MenuItems in the menu of the CMDIChildWnd in a program based on the multiple document doc/view architecture. How do I do that?
I think I know how to set the check mark I just can't figure out how I get access to the right CMenu? (Untill now I've only managed to get access to the CMainFrame menu)
Hope somone can help
I also committed the crime of posting a programming question in the Lounge.
|
|
|
|
|
You'll need to handle UPDATE_CMD_UI for appropriate command and use CCmdUI::SetCheck. This will result in checkmark next to menu item.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Take a look at CMDIChildWnd::OnUpdateFrameMenu.
Cheers
Steen.
"To claim that computer games influence children is ridiculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Why not just use an update handler (ON_UPDATE_COMMAND_UI) and forget about trying to get hold of the menu item? Update handlers are an easier and clearer way of controlling the state of menu items, and have the added bonus of handling things like toolbar buttons at the same time.
But if you still insist on trying to use the menu pointer, the main reason you're having trouble is that MDI child windows don't have their own menus. Only the main frame window has a menu, it just changes its menu when different child windows are activated.
If you're still interested, have a look at the source code for CMDIFrameWnd and CMDIChildWnd (in AFXWIN.H and WINMDI.CPP), in particular at OnUpdateFrameMenu . The code responsible for swapping the main frame's menu in MDI apps is not very well documented in the MFC docs, but the source code is fairly clear (as far as MFC source goes).
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Hmmm .. I think I wasn't quite specific enough describing my problem.
My problem is this; When the menuItem is clicked a modeless CDialog box is popped up and SetCheck is called to mark the menuItem. If I click the menuItem again the Cdialog box disappears and so does the check mark, I have managed to get that far
Now my problem is that CDialog box itself also has a close button that closes the box but I cant manage to remove the checkmark when the dialog box is closed through this button ... how can I solve that?
I also committed the crime of posting a programming question in the Lounge.
|
|
|
|