|
You can use the Image class to load a bitmap from a file.
|
|
|
|
|
I already load image from a file. But it displays very slow. I want to load data into memory.
Thanks
|
|
|
|
|
Hi there
Can someone please help me. I am looking for a way to measure the speed of my program's execution. I am busy writing a simulation that needs to run as fast as possible and I want to make sure that the algorithms used are the fastest possible. Is there a way or a tool that can be used to measure the speed, like the amount of CPU clock cycles needed to complete an algorithm.
thank you in advance.
Riaan.
KOM UIT DAAAAA!!!
|
|
|
|
|
Have you tried the profiler that comes with Visual Studio?
"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
|
|
|
|
|
I am not that familiar with visual studio, but I see there is a reference in the help to the profiler. It seems that it would be able to do what I want. I will look in to the profiler.
Thanks for pointing me in the right direction!
KOM UIT DAAAAA!!!
|
|
|
|
|
Not sure if this is what you want but you could use high resolution timer functions like QueryPerformanceCounter /QueryPerformanceFrequency before and after a piece of executing code and compare their values.
|
|
|
|
|
Hi
How would one use this?
QueryFrequencyCounter(Begin)
...CODE...
QueryFrequencyCounter(END)
TIME = END - BEGIN;
What is the unit of the counter? milliseconds or microseconds or clock cycles?
I will give it a try, thank you!
KOM UIT DAAAAA!!!
|
|
|
|
|
Grimes wrote: What is the unit of the counter? milliseconds or microseconds or clock cycles?
See here and here.
"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
|
|
|
|
|
|
Check the Masm32 forum. In the Laboratory there is a huge amount of information about timing, a Macro to set up the timing, and what it takes to get accurate results.
|
|
|
|
|
Thanks!!!
That counter macro seems to be counting the CPU cycles for a block of code. That does seem like the best way of determining the efficiency of a block of code, unlike time, that can vary greatly on different machines.
thanks for the help!
KOM UIT DAAAAA!!!
|
|
|
|
|
Hey
Can anyone tell what will happen if i use a HDC thats NULL?
For eg,
HDC hDc = {0};
DrawTextEx(hDc, ........);
I found that it will not throw an exception or something.
So is it OK to use like this?
Is there any MSDN documentation that talks about null HDC?
Thanks in advance
|
|
|
|
|
That depends on the function you are using it in.
For example, the CreateCompatibleDC function says that if HDC is NULL it uses the current screen as the reference.
So if there is nothing mentioned about the behavior when HDC is NULL , if sure the behavior is undefined and you should not do that.
|
|
|
|
|
I am using HDC to write to a PDF printer. But the code is so entagled that, there's pieces of a text file writing code is also between that.
So when there's a case that only a text file need to be written and no PDF, then i pass the HDC for PDF as NULL.
So far in my testing i have seen that this works perfect.
Is there any other function that will return me a valid HDC, but will not mess up any text file writing?
Can i use CreateCompatibleDC to pass an HDC that will not mess up any other part of the application? But at the same time there will be a valid HDC rather than a NULL one.
Thanks
|
|
|
|
|
I think I have too little understanding to give a reliable answer.
You will need to break up your question and isolate it from your domain if I need to understand.
|
|
|
|
|
Hi ,
While running an exe from service window , its throwing like
"The exception Unknown software exception (0x40000015) occurred in the application at location 0x781346b4."
Error 1067: the process terminated unexceptedly.
And in the Event viewer ...it is showing the message as ..
Faulting application mtserver.exe, version 6.2.86.0, faulting module msvcr80.dll, version 8.0.50727.4053, fault address 0x000046b4.
Note: its working fine in debug mode.
Please let me know ur valuable comments.
Ur help much appreciated
Regds
Jain
|
|
|
|
|
Does it fail even if the EXE is executed by double clicking from user mode?
If so try attaching a debugger to the process.
You could try running the EXE in debug mode, but without attaching the debugger (Ctrl + F5).
|
|
|
|
|
Hi everybody,
I like to find out where a function or maybe an entire library allocates a huge amount of memory.
In the task-manager I see that the application really uses 25MB of the memory and allocates a total of 166MB.
I tested already GlowCode, but it displays only the memory which is really in use.
Is there another tool or programming technique to find the call of the function?
Big thanks for any help
|
|
|
|
|
baerten wrote: Is there another tool or programming technique to find the call of the function?
"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
|
|
|
|
|
I think he meant which code calls the heap allocator?
Try IBM Rational Purify. They have 30-day license I believe. It should keep track of allocations and deallocations, leaks, etc, complete with the stack of the callers.
|
|
|
|
|
i'm so foolish, who can help me?
i got one message identification, for example, it's 0x10b3, how can i get the described information about it?
as above is just one instance, if many message identification arise, i'll jump into whirlpool
|
|
|
|
|
|
sunen wrote: ...how can i get the described information about it?
Given that you've simply shown a base-16 number, how are we to know?
"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
|
|
|
|
|
A fool is someone who fails to learn.
So, asking this question once is not foolish. Asking the same question again, will be.
So, to your actual question. Read the following blog article. I'll wait.
The Old New Thing: Which message numbers belong to whom?[^]
.
.
.
.
Back already? Wow!
So, 0x10b3 lies solidly in the class defined message category. So, without knowing what kind of window you have (or more importantly: what kind of window other code thinks you have), it's impossible at answer your question.
Without knowing a lot more, we can't help, sorry.
I wish you luck, and cleverness,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
you're a good man, thank you very much
|
|
|
|