|
Oh my, I didn't even think of that. haha. That makes sense to, about what you said about the variable l. Because until you mentioned that, I thought everything straight and didn't give that l an ounce of thought.
I will see if I can tinker with that a little and make something happen. Thanks for your sharp eye.
Brian.
|
|
|
|
|
[edit] found it - passed the wrong thingie as LPARAM. I feel so dumb, I even wish I would have used hungarian notation...[/edit]
Hi,
I'm using a virtual listview which, according to the docs, can manage selection + focus state (yippee).
However, when I send LVM_SETITEMSTATE to change the state, thing behave queer.
Moving selection+focus from one item to the next does:
- keep focus on old one
- old item has "greyed selection" (as if the lc is not selected)
- new item gets blue "selected" bar
- clicking around moves the "greyed" selection bar as usual, but the blue selection bar of the new item remains as is
LVC is: OWNERDATA, LVS_EX_FULLROWSELECT, LVS_SHOWSELALWAYS, and allos multiple selection
(single selection doesn't work better)
Anybody knows that?
"Dor säggsische Dialeggt eechnet sich wie keeen onderor für den Ausdrugg zäärdlischor Gefiehle."
sighist | Agile Programming | doxygen
|
|
|
|
|
What's wrong with the good ol' GetListCtrl().SetItemState(iIndex, LVIS_SELECTED | LVIS_FOCUSED , LVIS_SELECTED | LVIS_FOCUSED) ?
Every gun that is made, every warship launched, every rocket fired, signifies in the final sense a theft from those who hunger and are not fed, those who are cold and are not clothed - Dwight D. Eisenhower
|
|
|
|
|
No MFC?
[edit] btw - found it, I did stupid things, Windows did the same to me.
"Dor säggsische Dialeggt eechnet sich wie keeen onderor für den Ausdrugg zäärdlischor Gefiehle."
sighist | Agile Programming | doxygen
|
|
|
|
|
So I am able to GetFile(...) given a known filename. However my users will not know whats on there exactly.........they want to select some files from the site. SO I dont see how to list the contents of the dir, and allow the user to run through the list.............none of the methods do that, that I can see.
Ideas?
Thanks,
ns
|
|
|
|
|
pFTPConnect = sess.GetFtpConnection(_T("server"));
CFtpFileFind finder(pFTPConnect);
BOOL bWorking = finder.FindFile(_T("*"));
while (bWorking)
{
bWorking = finder.FindNextFile();
printf("%s\n", (LPCTSTR) finder.GetFileURL());
}
"A robust program is resistant to errors -- it either works correctly, or it does not work at all; whereas a fault tolerant program must actually recover from errors."
|
|
|
|
|
Thats exactly what I need!!!
Thanks,
ns
|
|
|
|
|
I'm writing a program in Visual C++ and I'm looking for a localization tool to help me with internationalization. Anyone knows of a good *free* localization tool? I need one that allows me to see the english text and translate it in another language in another column. I also need the tool to allow adding new strings to the list (I've seen some that only let you translate what's already there). Any suggestion?
|
|
|
|
|
i dont find any article on this topic on the whole net,
and the MSDN library! so i tryed it myself with
GetBitmapBits, and SetBitmapBits. i copyed every BYTE
from the 32bit bitmap into the 24bit bitmap, except every
4th. BYTE value, which is supposed to be the alpha value.
so, now i should have a 24 bit bitmap, isnt it?
but it does not work really....
pleas help me, is there no easy approach?
thanx a lot andreas
|
|
|
|
|
first of all u have to modify the bitmap's header!
I'm not sure about what byte is the alpha one, but i think it was the first one!
Don't try it, just do it!
|
|
|
|
|
I am looking at some sample code on a thai (!!!!) site. Cant read the comments, but see what this does:
hf=hc->OpenRequest("","/html/visualc.htm",NULL,0,NULL,NULL,0);
hf->SendRequest();
CString buff;
while( hf->ReadString(buff)==1)
{
but what does this do?
CHttpFile *hf=NULL;
hf=hc->OpenRequest( _T(""), _T(""), NULL , 0 , NULL , NULL , 0 );
hf->SendRequest();
CString buff;
while( hf->ReadString(buff)==1) {
printf("%s\n",buff);
}
Thanks,
ns
|
|
|
|
|
OpenRequest opens an HTTP connection.
SendRequest sends a request to that HTTP connection.
Then it reads the response from the server.
I can't see that this code will do anything since its not connecting to a URL.
"It is better to remain silent and be thought a fool than to open one's mouth and remove all doubt." - Abraham Lincoln
|
|
|
|
|
We recently upgraded to VC.NET 2003, and have noticed some alignment problems with some of our structures that we serialize to disk. I checked my old settings in VC6, and noticed that all the products have the "Struct Byte Alignment" set to 8 bytes. I wrote code that would check the sizes of all our serialized structs, and all the sizes were calculated correctly.
I then went over to VC7 and checked the project settings, he was also setup to 8 byte alignment. I ran the same size check code, and quite a few of the sizes are not the same as in VC6, which is causing us all kinds of headaches.
I've tried changing the alignments, and our structures are still off in VC7, even though the settings are the same. Has anyone else had this problem? Any tips/tricks? ... What kinds of things do you do when setting up a struct? Which items in the struct have to be on 4/8 byte boundaries etc?
Anything you can send would be appreciated.
Thx.
Mike.
doner@obtain.com
|
|
|
|
|
I am writing a client to access a COM server that
was apparently implemented in VB. When I use #import
on the dll, the intermediate file doesn't compile
because some of the parameters return arguments of
the form "CollectionPtr* pFoo". I can find no reference
for this type supported by C++, or ATL, or MFC.
When browsing the dll with the COM object viewer, the
IDL shown does indeed show the Collection** argument
type.
Is there a way to use these Collections from a C++
client program?
Thanks
Regs
Prakash
|
|
|
|
|
CollectionPtr is a generated type, a smart-pointer wrapper for "Collection", and will be in the .tlh or .tli file that's generated by '#import'. That leaves you with 'what is a Collection'.
Steve S
|
|
|
|
|
A Collection is a VB object that has an IDispatch interface but (as far as I recall) does not have a non-dispatch COM interface. You can use it from C++ but it is a little inconvenient since you have to use the IDispatch interface.
The things that the intermediate file shows as CollectionPtr you can generally use as IDispatchPtr.
You want to call functions through the IDispatch interface with the names _NewEnum to get an Enumeration over the items in the collection (typically IEnumVARIANTPtr), Count to get a count of items in the collection, and I think there is usually an Item function to get a particular item from the collection by index.
|
|
|
|
|
Hmm... this may be one of the most frequently asked questions but I've already searched the web and couldn't find anything, so please forgive me posting this question
Why is ASSERT in release version defined as (void)0 and not as just nothing? What will (void)0 compile to (on binary, assembler level)?
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Dominik Reichl wrote:
What will (void)0 compile to (on binary, assembler level)?
NOP
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
DavidCrow wrote:
NOP
So it's wasting time!
Why not defining it as nothing? This wouldn't waste a CPU cycle, would it?
Thanks!
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Not necessarily.
It might be optimised out in the final code...
Steve S
|
|
|
|
|
But, for example, take the TRACE0 macro. This macro is defined as just nothing instead of ASSERT. So there must be a reason why ASSERT is defined as ((void)0)...
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Dominik Reichl wrote:
Why is ASSERT in release version defined as (void)0 and not as just nothing?
Because removing code could result in confusing compiler warnings. Consider this:
if ( some_flag )
ASSERT(something_else);
Now, remove the ASSERT entirely and you get:
if ( some_flag )
;
which generates a compiler warning because of the empty statement after the if.
--Mike--
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
CP SearchBar v2.0.2 released
|
|
|
|
|
But
if ( some_flag )
TRACE0("Closed file successfully.\n");
TRACE0 is defined as just nothing, so it _is_ translated to
if ( some_flag )
;
So TRACE0 cannot be used the same way as ASSERT? Both TRACE0 and ASSERT take one parameter...
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
(void)0; is essentially a 'null' statement. It doesn't generate any code, but satisfies the compiler requirement for a statement. As mentioned elsewhere in the thread, it is not an empty statement:
; which may generate compiler warnings depending on where it is used.
Software Zen: delete this;
|
|
|
|
|
is it possible to change style of a CComboBox form dropdown to dropdown-list?
i mean: not re-create a new box.
thx.
includeh10
|
|
|
|