|
Would you like fries or baked potato with that?
|
|
|
|
|
hi all
i have programmed code to generate an .exe for drawing a plot of a mathmatic function dynamically by vc++ api.
now i am testing the stabilization of this .exe programme.
and i found that when the graphic window,drawing the plot, has been refreshed ( i redraw the plot by call InvalidateRect (hwnd, NULL, TRUE) ; ) for 12 times the .exe code will be crashed down. that is to say no response to the mouse click or close. and i have to shut the .exe down by ending its processe in task manager.
anyone has come up against this situation? please help me or give me some advice.
your help will be appreciated
|
|
|
|
|
Sounds to me like you are leaking GDI resources. Use the task manager to check how many GDI objects your app hanging on to after every draw.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
wow that is it GDI leaking. i have check my code. insert lines of ReleaseDC and DeleteObject. then the .exe is running well.
Thank you very much!! appreciate for your advice. thank you.
|
|
|
|
|
I want to know if i can use MS Detours to make system-wide hooking from user-mode .PLZ help
|
|
|
|
|
|
Yes u r right, thanks a lot. i found this article very helpful but also am still creating a dll in which
i attach a detour to system call and make it mycall, this is very clear. but how can i inject this dll into
all running processes at the same time, every example here r talking about specific process "messenger" or "notepad", i know that am very noob but i need this so much. PLZ help me again.
|
|
|
|
|
how do you seed rand() in visual c++?
|
|
|
|
|
srand[^]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
hiiiii guys...
I'm a beginner MFC programmer and currently I'm working in a dialog based application working of my application is like this... user selects a directory then in a list box I'm displaying all the subfolders
present in that directory, on selecting any subfolder there is a list control which displays thumbnails of all the images present in that subfolder and then on mouse hover on any of the thumbnail , preview of that image is generated. My problem is that when there are large number of images present in a folder list contol is taking time to display thumbnails and during that processing list control just disappears I mean list control flickering is there, I don't know what is the cause and how can I fix this problem. One more thing how can display preview of image on mouse hover event
preview should be like, it should emerge out from the center of the thumbnail and zoom in and as the mouse is moved this preview should disappear. please help me in this as it is very urgent and important for me.. I shall be very greatful to you all
Thanks alot in advance...
|
|
|
|
|
You can use of WM_TIMER or a thread for read and load images of subfolders to listcontrol for preview you can use of WM_MOUSEMOVE and then you can use of a (its my suggestion) static control for show your images.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hello,
is there a way to get file attributes(filename,size and #clusters) from volume bitmap? right now i'm using ZwQueryDirectoryFile() to iterate through the entire files which is taking lot of time. any suggestions.
Thanks
Sundar
|
|
|
|
|
Is the good old WinAPI trio FindFirstFile()/FindNextFile()/FindClose() something for you?
Rozis
|
|
|
|
|
No. On almost all file systems, the sectors, clusters and allocation tables don't know what sectors belong to what files.
Long ago, Apple's MacOS had a file system where each 512B sector actually was 528B in size, and the extra 16B helped in repairing damaged file systems, by keeping redundant back-linking information, but they abandoned that (not too many vendors wanted to support the odd sector size), and I haven't seen anything similar since.
So, yes you have to iterate your files in order to figure out which sectors/clusters belong to them.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Check out JkDefrag version 3.36 (4.0 is proprietary, but 3.36 is open source). Try it, you'll like it.
Dave.
|
|
|
|
|
I am evoking a dialog using
CDemoKeyDlg dlg();
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
InitDemoInstance();
}
else if (nResponse == IDCANCEL)
{
}
In the CDemoKeyDlg I have
void CDemoKeyDlg::Register()
{
if (Id == Key)
{
MessageBox("Enjoy","It works",MB_OK);
OnOK();
}
}
What am I doing wrong the InitDemoInstance does not get evoked, I do get the message to enjoy?
|
|
|
|
|
What happens if you call EndDialog(IDOK); instead of OnOK?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I tried both...The dialog box closes.
|
|
|
|
|
OK - what value is DoModal actually returning then?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
The control is just not returning back ?
|
|
|
|
|
Run it under the debugger. That should indicate when the application exits, if (as appears likely) there's an exception of some sort occurring.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
What value does nResponse have? That would seem to be the simplest and most basic thing to check...
edit : a fraction too slow
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
It's just not returing anything..the app just dies...
|
|
|
|
|
FISH786 wrote: It's just not returing anything..the app just dies...
In which case, you must be doing something very naughty in the dialog...
You need to step through the code in there, and see where it's going wrong. Put breakpoints in all the event handlers, and track through until you find the place it crashes.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|