|
Can you try and use SetWindowLong and GetWindowLong to change styles ?
~RaGE();
|
|
|
|
|
Noop doesn't work.
But i've chosen not to work with Virtual List anymore because i have a file with about 7000 employees in it.
In a normal list it takes about 56 seconds to load.
In the virtual list, it is loaded into the array after 49 seconds. So almost no speed improvements (the Dbase IV database slows it down alot). I don't see any reason why i still would use the virtual list. (more memory used too).
So, i'll drop this question. (I tried in VC6 the same code and it worked already, so the problem is the VC5)
Greetings
Jens
|
|
|
|
|
JensB wrote:
In the virtual list, it is loaded into the array after 49 seconds
That's because you are not using the cache. If you do, you only have to load the item currently displayed in the listview. You put the items coming before and after in the cache (but just a few ones, actually the ones that could be displayed if the user goes up or down). The rest will be loade progressively.
but I agree. Let's use BeginWaitCursor( ); and EndWaitCursor( ); or a typical "Maunder Progress Bar" ...
~RaGE();
|
|
|
|
|
Using the task manager in Win XP you can switch to a user that is already running. (right click on the user and click connect - type in password - click ok).
What is the API function to do user switching?
|
|
|
|
|
|
Can you tell me the code to delete a file in Vc++ 6.0?
thank you very much.
|
|
|
|
|
|
You can use SHFileOperation to delete a file
or
You can use the API _unlink()
Ankush
|
|
|
|
|
I have a string, such as "Hello World!"
I want copy it to clipboard, so that, after that, when I right click in a word process application ( such as: NotePad, WordPad, Word...), there is a "paste" menu command show for me to paste that string "Hello World!"
My code is wrong (GlobalUnlock) but I dont know how to fix it (I am following code in MSDN sample)
thanks!
BOOL CopyToClipBoard(LPSTR lpszString)<br />
{<br />
LPTSTR lptstrCopy; <br />
HGLOBAL hglbCopy; <br />
INT cch; <br />
<br />
OpenClipboard(hWnd);<br />
EmptyClipboard(); <br />
<br />
cch=strlen(lpszString);<br />
hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (cch + 1) * sizeof(TCHAR)); <br />
if (hglbCopy == NULL) <br />
{ <br />
CloseClipboard(); <br />
MessageBox(hWnd,"errror on GlobalAlloc()","Error",MB_ICONERROR);<br />
return FALSE; <br />
} <br />
<br />
lptstrCopy = (LPTSTR)GlobalLock(hglbCopy); <br />
memcpy(lptstrCopy, lpszString, cch * sizeof(TCHAR)); <br />
lptstrCopy[cch] = (TCHAR) 0;
<br />
<br />
if(!GlobalUnlock(hglbCopy))
MessageBox(hWnd,"errror on GlobalUnlock()","Error",MB_ICONERROR);<br />
return FALSE; <br />
}<br />
<br />
if(!SetClipboardData(CF_TEXT, hglbCopy))<br />
{<br />
MessageBox(hWnd,"errror on SetClipboardData()","Error",MB_ICONERROR);<br />
return FALSE; <br />
}<br />
<br />
if(!CloseClipboard())<br />
{<br />
MessageBox(hWnd,"errror on CloseClipboard()","Error",MB_ICONERROR);<br />
return FALSE; <br />
} <br />
<br />
return TRUE;<br />
}
|
|
|
|
|
|
|
Here is one solution.
HANDLE cbData = ::GlobalAlloc(GMEM_MOVEABLE, STRING_SIZE + 1);
PTSTR pData = static_cast<ptstr>(::GlobalLock(cbData));
_tcscpy(pData, theString);
::GlobalUnlock(cbData);
COleDataSource *pODS = new COleDataSource;
pODS->CacheGlobalData(CF_TEXT, cbData);
pODS->SetClipboard();
Kuphryn
|
|
|
|
|
Hi,
I would like to develop a kind of news displaying app with a transparent window. Unfortunately my machine does not support alpha-blending overlays.
Therefore, I want to have an inactive always-on-top window that doesn't capture mouse events. Instead, all events shall be passed to the underlying windows, just as if my window would not exist.
Is that possible?
Thanks,
Chris
|
|
|
|
|
|
I have tried this. It doesn't work, because the currently active application still becomes inactive when I click into my window.
Any other suggestion?
Chris
|
|
|
|
|
I'm not sure - can we use the == operator on the basic_string templte, as in the following manner:
#include <iostream>
#include <string>
string s1 = "Hello" ;
string s2 = "Hello" ;
string s3 = "hell" ;
cout << (s1 == s2)
cout << (s1 == s3)
In some other languages (as in Java), == checks for equlity of memory location. Does basic_string have an overloaded == operator?
|
|
|
|
|
Yes basic_string does have the overloaded equals operator.
The reason Java checks equality of memory location is that in Java you only have references to objects - never the objects themselves (except for primitive types). In C++ you can have the object itself (in which case '==' should compare values) or a pointer to the object, in which case '==' compares memory addresses.
Dave
http://www.cloudsofheaven.org
|
|
|
|
|
|
Hiya I have been reading about com ports and sending data through them. But how do I set up a simple test, say sending one line of data through the comm port??
I know how to use CreateFile, WriteFile and ReadFile.
I have one computer. How can I do this??
Thanks.
|
|
|
|
|
If you call WaitForMultipleObjects with the bWaitAll param set to TRUE (indicating you want to wait for all, not just one, to become signaled), what is the return value if successful?
Is it WAIT_OBJECT_0?
Or some value between WAIT_OBJECT_0 and WAIT_OBJECT_0 + numobjs - 1?
Or something else?
|
|
|
|
|
Philnessosity wrote:
Or some value between WAIT_OBJECT_0 and WAIT_OBJECT_0 + numobjs - 1?
This one.
~RaGE();
|
|
|
|
|
i dont have enough knowledge of visual c++. Thats why iam here in front of the highly professional people like u to assist me.
Right now i am building an Video Conferencing application for a company. as iam heading to it what i want to know that what will be the hardware complications in the case and the prgramming one.
so i want excellent type of programmer to give me an idea actually how to head for it.what approach would be easy to use
|
|
|
|
|
I am creating an application which shares datafiles over a LAN of roughly 5 computers. I am positioning the datafiles on only one computer on this network, and allowing all the other computers access. If I were setting up a server, this would be no problem, for I could manage the files using CSemaphores, but there is no server. Can somebody let me know if there's an option using the CArchives, or any other classes, which would allow me to read and write to these files without interfering with other instances of my application? As an example, if two instances of the same application wish to write to the datafiles, I should only allow one, but I want the second application to patiently wait for access to the datafiles--the basic reader/writer problem, but over a network. Please let me know!!!
Thanks!
Douglas A. Wright
dawrigh3@kent.edu
|
|
|
|
|
No. One solution is to create (open) the files such that other processes may not write to the files or even read the files. There are no elegant solutions without a server managing a queue. The clients will need to loop through until the files are accessible.
Kuphryn
|
|
|
|
|
Hi,
I have problem adding a bitmap to the background of my SDI App.
I know how to add it in a dialog, but I have some problem adding it to a SDI App.
any ideas?
thanks
Everything's beautiful if you look at it long enough...
|
|
|
|