|
|
Hi all
I finished my program. Now I want to know rate of functions in the program. Anybody have a free tools for that ? thank alot.
quang
|
|
|
|
|
caoquang wrote:
...rate of functions...
What is this? Are you wanting to profile your program to find where the bottlenecks are?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
|
|
Hi rbid!
I'm very thank you for your indication !
hanhquang
|
|
|
|
|
i have a program that displays a lot of images.....these images are needed each time the rpogram runz.....but if i were to put these picturez in my exe(that is in the resourse) the exe getz huge.....i dont want it that way.....so iz there anyway i can do that by using dll(ps:i have no knowledge abt working with dllz).....
can anyone get me ideaz here??.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
Yes, you can move the images to a DLL but then doesn't that DLL become huge, too? You'd also have an extra file to ship. Why does a large EXE bother you?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
You might also consider using some form of file compression on the images and then expand them into memory. I have seen VERY large bitmaps compress down to much smaller sizes. You can store the compressed images as RC_DATA and then load them from the resources, then expand them into memory. That would save you some space.
|
|
|
|
|
Hi all.
I've written a Visual C++ 6.0 software to calculate the Italian (Codice Fiscale) say that it is like U.S. SSN.
To calculate the C.F. (Codice Fiscale) i use a text file, comma delimited, to find City codes; it works fine.
Now I wander if is possible to embed the text file in the executable to have a compact software made of only one file. Condider that the text file is 247Kb
Thanks to all
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
im study com current, so i m diffculty understand that ,,,,i use visual studio 6.0,,
so i see build error ......Unreserved symbol error,,,,
what i to use com ? library need? i m inclueded all includ file
|
|
|
|
|
|
Please give me some articles or books or sourcecodes.
Thanks!
|
|
|
|
|
|
I have searched for a way to get the instance handle of the module that my code is executing in.
AfxGetInstanceHandle function available, but only when running as an MFC dll.
GetModuleHadndle is available, but requires the path of the dllm which I don't have.
I cannot inject code in DllMain to "remember" the instance handle because I don't have
access to it.
I have a solution that is quite extensive using "Process Helper", "PE Image Helper" APIs and are quite time consuming. I hope to find a better way of doing it. Probably there exist a way for it, but I haven't found it yet.
Does anybody have a solution for it?
|
|
|
|
|
Per Nilsson wrote:
GetModuleHadndle is available, but requires the path of the dllm which I don't have.
Actually you do. First make a call to GetModuleFileName(...) .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
No
This function returns the module name of the creating process, not the dll I am executing in.
/Per
|
|
|
|
|
If you only have to run on Windows XP or Windows 2003 then look at this one GetModuleHandleEx using the GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS flag.
|
|
|
|
|
Are you sure?
http://www.mvps.org/vcfaq/sdk/7.htm
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes
"The Win32 API GetModuleFileName() is what you need. If you pass NULL as the module handle parameter, the function returns the path of the module that created the process (in other words - the application's exe file)."
|
|
|
|
|
Did you not read the last sentence for some reason?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
By default in MFC when you clicking button (CButton)
it sends message when button is up.
But I need that some of buttons on my dialog send message when button is down.
What I should change or add to button object or class ?
|
|
|
|
|
I suggest new class:
//// in header file
class CmyButton: public CButton
{
// Generated message map functions
//{{AFX_MSG(CmyButton)
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//// in cpp file
BEGIN_MESSAGE_MAP(CmyButton, CButton)
//{{AFX_MSG_MAP(CmyButton)
ON_WM_LBUTTONDOWN()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
void CmyButton::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
MessageBox("You click on button");
}
|
|
|
|
|