|
Congratulations, you just happened to be awarded th "I post a dumb thread and answer it" prize
~RaGE();
|
|
|
|
|
It's depressing to me that people this stupid can still work out how to use a computer. Bring back 1985, that's what I say.
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not
as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
In a VC6 macro file (*.dsm), can I automatically assign a shortcut to a certain macro?
(e.g. in an "OnLoad" even or something...)
Those who not hear the music think the dancers are mad. [sighist] [Agile Programming]
|
|
|
|
|
Hi,
I added two CDialogBars to a CBRS_RIGHT vertical rebar, but neither they stretch to fit the frame height, nor the remaining space is erased. Everything is however fine when I lay this rebar onto the CBRS_BOTTOM
Are there any CCS, CBRS, RBS or RBBS flags I should additionally set?
Regards,
BB
|
|
|
|
|
1.How to find wheather the system is locked
2.how to find internet connectivity is there
Pl reply
|
|
|
|
|
hi,
1: check in network places if you can see other computers in the network the computer is not locked, if thats what u r looking for.
2: for internet connectivity go
start-> run-> ping www.codeproject.com -t will show you the real excahne of bytes and time taken. if request times out then there is no internet connectivity.
cheers,
Himanshu
|
|
|
|
|
I have a TreeView like "Favorites" in ie.
I want show the name of the web site like "CodeProject" and associate an URL "http://www.codeproject.com" who is hiding.
i think i can do this with setitemdata but the value associated is a DWORD i can't associate a CString .
if someone know how i can do ....
PS excuse my english
|
|
|
|
|
Put your CString in a table, list, vector, etc ... and save the index of the entry in the DWORD.
~RaGE();
|
|
|
|
|
thx
How can i convert a POSITION to DWORD ?
|
|
|
|
|
Maybe like this :
POSITION pos;
DWORD d=(DWORD)pos;
I'm not sure because i do not know how Windows handles POSITION, so it may be more complicated.
Why would you like to do such a thing ?
Pls note that a DWORD is a 32 bit value, so you can cast any kind of data into it and get them back after. You also can store pointers on structs into it. I consider the Data provided with CTreeCtrl to be used with indexes or pointers pointing on Data, not the Data itself.
~RaGE();
|
|
|
|
|
thx
i already try this solution but don't work
|
|
|
|
|
allocate a new CString dynamically, and store a pointer to it in the tree item
disadvantage: You are responsible for deleting the CString * when the treeitem is deleted!
CString * pURL = new CString(/*the URL string*/);
Set: SetItemData(treeItem, (DWORD) pURL);
Get: CString * pURL = (CString *)GetItemData(treeItem)
Add Notification handler OnDeleteItem, and there
CString * pURL = (CString *)GetItemData(treeItem);
delete pURL;
------------------------------------
Another version, which is nicer if you build the tree incrementally (i.e. items are never renamed / deleted):
use a std::map<htreeitem, cstring="">
Those who not hear the music think the dancers are mad. [sighist] [Agile Programming]
|
|
|
|
|
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();
|
|
|
|