|
Naveen R ,
I have this problem(But I have derived CListCtrl and I use this way in the NM_CUSTOMDRAW)
anyway I think you can use
int nImage=GetNextItem(-1,LVNI_SELECTED);
|
|
|
|
|
I don't think that you can get the index for a sub-item image, since the iImage member of LVITEM structure is specifically described as the index of the item's image, and not the index of the sub-item's image.
Maybe you must manually store the sub-item's image index in the lParam of the item and retrieve it from there.
Best,
Mike
|
|
|
|
|
Hi there,
I have a program written in C++. I need to convert it to Matlab. I have use mex to run my C++ program, but I do not understand what is mxarray? Do I need to change my C++ program to fit the mxarray?
Zaara
|
|
|
|
|
|
I have a Visual C++6 project for extracting WMI information from machines
across the network. I am using the IWbemLocator::ConnectServer method with the WBEM_FLAG_CONNECT_USE_MAX_WAIT flag. The flag prevents the app from hanging and will timeout the call if not sucuessful after 2mins. But this flag only works for XP pcs and no other like 2000 etc and also is fixed at 2mins.
how can a timeout be implemented so i can kill the ConnectServer method say after 20seconds.
|
|
|
|
|
Hi,
This is kind of thing I would use another thread for ...
Regards
Ray
"Je Suis Mort De Rire"
Blogging @ Keratoconus Watch
|
|
|
|
|
I’ve been creating C/S application but I’ve been wondering how to install client module direct by network from server module (I don’t want to install it manually).
Main problem is, how to send/copy installation files by network from server module.
It is possible to take advantage with administrative shares i.e.:
Connect to the host (WNetAddConnection2),
Check, if ADMIN$ is available (i.e.: NetShareGetInfo ),
Copy files,
Execute install file or something else to do,
Disconnect (WNetCancelConnection2).
Problem is, when administrative shares are disabled. What can I do then ?
Any ideas ?
-----------
Mila
|
|
|
|
|
If ADMIN$ is unavailable there is nothing you can do. Sorry for that!
|
|
|
|
|
hi friends,
i want to display a static object on screeen(like rectangle, circle etc).
Problem arises when static objects are overlapped.
how to avoid that flicker when objects are overlapeed.
The drawing routine is continuosly called thro' OnDraw() or OnTimer metode.
plz help me
Thanksin advance
Rahul here
|
|
|
|
|
you need to use double buffering. In your OnPaint you need to use an extra HDC. The process is pretty simple.
1. Create a compatibleDC with the window HDC to be used as a buffer.
2. do all your drawing to the buffer.
3. draw it back to the window DC in one call to BitBlt.
|
|
|
|
|
This annoyance has been bugging me for a long time now.
Lets say I have a class called cParse contained in a .h and .cpp. Now a member of this class is a vector, declared as a member "std::vector<short> S_data;" in the header file.
Now normally with vectors and similar when you typr the name followed by a period you are shown a menu for all the functions/variables. But when it's declared as a class member in a header file you are not.
Is it possible to add something to the top of the source file which will enable this feature? It would cut down on typing errors if you can use the auto-complete feature of these menu's.
|
|
|
|
|
I tryed the same and I think it's a IDE bug. Sorry for that! Good luck!
|
|
|
|
|
1st of all, what IDE do you use ??
then, show us a piece of the code, because i suspect you to forgetting something in it...
one last thing ; when posting for template code, use < instead of < and > instead of > otherwise, the browser will try to interpret then as html tags, and not show them then...
ps: you've been asking so many easy questions these days, that i wonder if you are OK with C++... maybe you should learn for it a bit more deeper
|
|
|
|
|
v2.0 wrote: ps: you've been asking so many easy questions these days, that i wonder if you are OK with C++... maybe you should learn for it a bit more deeper
Hey I'm sorry if my questions are too easy for you. Maybe if I made them a bit more difficult you would actually answer some of them. Perhaps I should take my easy questions over to the easy C++ message board.
|
|
|
|
|
not what i said... ;P
you are always welcome to ask C++ questions on the C++ forum
but if you're new to it, or need more subtle needs of the language, then you should look at a technical book or something (my favorite, The C++ language form Bjarne Stroustrup - but ok, i know it's not that easy to start with for newbies)
now, you can answer my previous questions :->
|
|
|
|
|
v2.0 wrote: ps: you've been asking so many easy questions these days, that i wonder if you are OK with C++... maybe you should learn for it a bit more deeper
Diplomacy is my first name
~RaGE();
|
|
|
|
|
Rage wrote: Diplomacy is my first name
ok, since then, i'll have to name you "Diplomacy" then
|
|
|
|
|
v2.0 wrote: i'll have to name you "Diplomacy" then
What about Diplomat
|
|
|
|
|
He said "Diplomacy", so...
|
|
|
|
|
v2.0 wrote: v2.0
you changed you name, Why?
|
|
|
|
|
shhhh
i'm incognito brother
i'll be back on May 2nd
|
|
|
|
|
I've had reasonable luck in VC6 with auto-complete for std template container declarations by wrapping them as trivial classes.
Example:
<br />
class CStdVector_BYTE : public std::vector< BYTE ><br />
{<br />
};<br />
<br />
class CMyClass<br />
{<br />
CStdVector_BYTE m_vecBytes;<br />
};<br />
Regards,
Dan
Remember kids, we're trained professionals. Don't try this at home!
|
|
|
|
|
From what I remember of typical compiler behaviour, include files are inserted into the main file at compile time. If you want the IDE editor to understand structures and such, they have to be in the main file.
I suggest you move the declaration of the vector to the main source file while you are doing the serious code-writing, and once the program is more-or-less finished, move the declaration to the header file? If you use the header in various places, you may need to use IFNDEF, etc.
|
|
|
|
|
I hope someone can help with this...
I am trying to select a bitmap into a device context. When I do this by creating a handle to the bitmap as follows everything works fine
*pm_hBmpNew = (HBITMAP) LoadImage(AfxGetInstanceHandle(), // handle to instance
filename, IMAGE_BITMAP, // image types
0, // desired width
0, // desired height
LR_LOADFROMFILE);
And then later on I select the object by doing
VERIFY(*pm_hBmpOld = (HBITMAP)SelectObject(*pm_dcMem, *pm_hBmpNew));
HOWEVER if I create that handle by creating a bitmap by calling CBitmap::CreateBitmap like so
p_cbmME->CreateBitmap(256,256,1,32,imagedata);
*pm_hBmpNew=((HBITMAP)*p_cbmME);
and then Select the object like before
VERIFY(*pm_hBmpOld = (HBITMAP)SelectObject(*pm_dcMem, *pm_hBmpNew));
then it works if I select a file(and create imagedata by reading in the file) the first time. But if I then press the same button again and select then another file without closing the application the application just hangs!
Also, I don't know if this is relevant but I am calling this function with two different buttons. And if I first call it with Button1 and then with Button 2 there is no problem. But if I then again press either of the buttons the application just stalls.
Can anyone help with this? Also is there any reason why AfxMessageBoxes should not work in my application? I am happy to explain my problem further, but just did not wanna put people off with long code if it is not necessary. I hope I explained my problem ok. Please someone help!
|
|
|
|
|
Hi Laughing Buddha ,
You wrote then it works if I select a file the first time. But if I then press the same button ...
I guess that your problem is p_cbmME->CreateBitmap(256,256,1,32,imagedata); I think that you need
to detach first HBITMAP from CBitmap and again use createbitmap
maybe it is some helpful to you
|
|
|
|