|
thx
I try your solution...
|
|
|
|
|
Thank you very much !
it is the good solution it's work fine !;)
|
|
|
|
|
I am having a virtual list control which can load a large number of file items.
I have noticed that main speed issue here is file icon calculation, so I created the separate thread to calculate icon index in background.
But, my problem is following:
- how to communicate changes between the threads
(I used to PostMessage for each calculated icon, but this was slowing down my icon thread enormously)
- how to add icon calculations priority (if the user scrolls to the bottom of the list, those icons must be calculated first)
I welcome any good idea or code pointer.
Thanks in advance.
Miroslav Rajcic
|
|
|
|
|
PostMessage blocks the calling thread untill the window you sent the message processes it..
try SendMessage..
|
|
|
|
|
I think the oposite is the truth
Miroslav Rajcic
|
|
|
|
|
Yes..Miroslav I checkd it and I was wrong..
thank you..
|
|
|
|
|
You will probably need to "batch" the updates (e.g. load 10 icons, then update) anyway. Then, PostMessage is not an issue.
You could call InvalidateRect from the worker thread, causing a new LVN_GETDISPINFO in the main thread (and they'd batch nicely). However, I see no chance to get the icon rect without stalling the main thread. You might use this for better prformance if the list is in Report Mode, though. (You need to invalidate the entire icon "column")
I'm not sure if you need to set call SetImageList again after adding icons to it. Just try it, and don't if you don't need to.
You probably need to keep a separate tracking file / icon, and track which icons are already loaded.
in the LVN_GETDISPINFO handler, specify an empty / dummy icon id when it's not yet loaded.
To prioritize:
Share a variable iNextFileIndexToProcess, between the two threads, indicating the index in the list of the file who's icon is next to load. If an icon is already loaded, just skip to the next. If you arrive at the end of the list, start with the first one again. (You need a separate indicator that you have loaded all icons. e.g. break on iIconsLoaded == iFilesInList)
Add a handler for WM_HSCROLL, where you set the iNextFileIndexToProcess to the first displayed item (LVM_GETTOPINDEX)
This is just a rough outline, but I believe it's good
Those who not hear the music think the dancers are mad. [sighist] [Agile Programming]
|
|
|
|
|
Thank you for your effort. Your coments have been very valuable.
I'll try them and see.
Miroslav Rajcic
|
|
|
|
|
Hello all
i have created a dialog application by means of the application wizard (VC7) without the html help support (when I started i didn't enable that option in the wizard).
Now How can I attach it to the existing application? Infact i'd wish, if possibile, to not recreate my application again as i have added many sources and resources to it.
I have tried also to create from scratch another similar dialog application to watch what code was added for the help hooking purpose but it seems a little bit too complicated to track down all the changes needed.
I have already created the .hhp .hhk, and .hhc help files with the html workshop.
thanks for any info/tip about
best regards
|
|
|
|
|
Hello,
Please check following for adding Help to the application, may be helpful to you:
http://www.codeguru.com/controls/index.shtml
|
|
|
|
|
thank you very much
I actually found helpful documentation at the following page:
http://www.codeguru.com/help/index.shtml
best regards
|
|
|
|
|
Hi world...
I've created a MDI project.
I want to open more than 1 Doc when the user open a specific file with the menu File->Open... (this file informs the number of Doc the app should open).
Each Doc can open more than 1 View.
An only CDocTemplate manage its Doc.
Any idea to do that?
Thanks in advance for your help...
Hello World!!!
from Raphaël
|
|
|
|
|
Compiler returns me this :
C:\Programme\Microsoft Visual Studio\VC98\INCLUDE\xmemory(10) : fatal error C1083: Include-Datei kann nicht geoeffnet werden: 'new': No such file or directory
(Understand the german sentence as : Include File cannot be opened)
Actually, I compiled this at home with VC++ 6.0 under Win ME, worked perfectly, brought the source at workplace, tried to compile it under VC++ 6.0 too, but seems like it does not know about STL since this happens when i use STL and disappears when not (and i guess xmemory is used only in STLs).
What's wrong ?
~RaGE();
|
|
|
|
|
i guess you need to have STL at workplace search for it and place it in visual studio, i guess thats it. If not then earch for the particular file it needs and showing doesn't exist and cut paste the code into a file and add it to project. that's it. u r done..
cheers
Himanshu
|
|
|
|
|
xxhimanshu wrote:
search for it
Well, that's precisely what i need to know. Where is it ?
xxhimanshu wrote:
cut paste the code into a file and add it to project
In french, this is called a "bulldozer solution" More seriously, the error is caused by an #include<new> which is precisely different from new.h, i guess, and i do not where it is.
I definitely think i'll have to compile at home
Thanks very much for your help.
~RaGE();
|
|
|
|
|
Rage wrote:
Well, that's precisely what i need to know. Where is it ?
It is in "<visual studio="" dir="">\VC98\Include"
Maybe one of your comuters is in urgent need of a newer platform SDK?
Or the "ProjectSettings-Tools-Options-Directories" settings are broken?
Hope this helps / Ich hoffe ich konnte Dir helfen!
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
jhwurmbach wrote:
Maybe one of your comuters is in urgent need of a newer platform SDK?
Yep, must be the point.
jhwurmbach wrote:
Ich hoffe ich konnte Dir helfen!
Ja, vielen Dank
~RaGE();
|
|
|
|
|
In the Development of ActiveX control using VB we have a property called "EditAtDesignTime", is there any similar property like this in VC++ ActiveX control ?
|
|
|
|
|
i dont know what u r exactly looking for,, but i have a trick.. you know the length of your edit box, i mean how many chars it can hold, then calculate the length of the strig it contains, now minus the length of total string that is the actual length you can see use CSting and getright(this value) you get the char at this position from right.
cheers
Himanshu
|
|
|
|
|
I want to scan ports and if they are open on a certain computer than i want them to be displayed as either closed or can't access. Can anyone help me out here..Any suggestions are welcome..Plzzzzzzzzzz I am trusting you fellas out there to help me..
thanks in advance
Cheers
|
|
|
|
|
<code>
for(int i = 0; i <= 65535; i++)
{
if(CanOpenPortOnHostUsingWinsock(lpszHost, i))
{
ShowMsgPortIsOpen(lpszHost, i);
}
}
</code>
Check the docks for info on Winsock functions.
Note that portscanning is considered bad maners by most admins...
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
thanks a lot but these functions are not listed anywhere, are they ur own.if yes then can you tell me how to implement these functions. Also there is one more problem, if once it is notified that a prticular mode is open than i want it to appear close if anyone else checks this port or just say unauthorised access and deny. can you help me???? waiting for ur response..plzzz
thanks in advance..
Himanshu
|
|
|
|
|
lol, ehhhhhhh, he was just giving you an idea for how it would work. I'm pretty sure there is an article around the site that has details about port scanning, just search and ye shall find.
|
|
|
|
|
Hey,all...
My current Win32 application would do some background job while Windows enters the "screensaver" status, and it would shows a top-most dialog outside the screensaver's screen for displaying the working status and progress.
But now I encounter a problem: while the option "On resume, password protect" is set on the screensaver setting dialog in Win2K/XP, the dialog box on my application cannot be showed outside the screensaver screen, but if this option is not set, it do.
Does anyone can tell me how to solve this problem? Thanks!
|
|
|
|
|
The screen saver runs in its own desktop, so windows created by programs running as your account are not visible. It's the same with the Winlogon desktop (the one you see after you stop the screensaver), it's a separate desktop and your windows won't appear there either.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|