|
GANsJob wrote: how to print in tabular format with 4 col
anyone know plz tell me
You may use C++ IO manipulaters for same.
for e.g. setw(size) sets the width of the stream you are suppose to output on console.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
can anybdy gimme a code snippet for implementing socket arrays...
|
|
|
|
|
shuchigo_jane wrote: can anybdy gimme a code snippet for implementing socket arrays...
Here is the Array
#define SOCKET_COUNT 10<br />
CSocket socArray[SOCKET_COUNT];
Ask the question in details you will get answers in details..
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi everybody,
I want to disable a list view item. I know that I should use SetItemState method, but I don't know how.
thank you in advance.
|
|
|
|
|
Disabled how? You can set the LVIS_CUT style so icon is grayed, and use custom draw to change the text color to gray.
If you mean disabled as in not selectable, that feature isn't built in to the control.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
Hi Michael,
Thank you so much. That's very kind of you.
I use your articles before and they help me so much. I wish best things in your life.
yours sincerely,
Roozbeh.
|
|
|
|
|
Roozbeh69 wrote: I want to disable a list view item.
Disable or deselect?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,I`m a c++ programer and newely I started to work with vc++.I have met a big problem, in windows Nt,Xp and newer versions of windows non of my programs dont work.but they work perfectly in win98 win Me and Dos os.So if it is possible, let us know about the classes and objectes in Vc++ that controls the hardware in windows.thanks
|
|
|
|
|
If u can post a code sample that is not working ,we can help you in fixing the problem.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
i think he needs to general information
whitesky
|
|
|
|
|
|
You are dealing with a security problem. I say this because you are talking about accessing the hardware and I assume that you mean directly. If you want to access the hardware then you need to call a driver to do it for you. On systems like Win2000 and XP you can not access the hardware directly (even in assembly) without it getting upset with you. It does not matter whether or not you are using VC++ or not, it is an OS thing. There is a public domain diver out there some where that will allow you to access hardware ports directly, I used it a couple of years ago and forget its name (so keep looking).
If you post a small example of the problem (in code) or explane what exactly you are trying to do, then someone here will probably be able to help you.
Good Luck,
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
I have two questions.
1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder?
2. I do not want it to be in the hard disk, but would like to include the activex control within my program as a resource and then I want to register it. I imported it as a resource. How can I proceed?
Regards,
Aljechin Alexander
|
|
|
|
|
|
NiceNaiduUse DllRegisterServer
Exactly how is this of any help outside of the ActiveX file?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
1) u can use ShellExecute(NULL, NULL, "regsvr32.exe", <path to="" ocx="">, NULL, SW_HIDE);
2) you cant keep an ocx in the resourse and use it if you are doing static linking. if u are doing only dynamic lnking then, one thing you can do is to store the binaries from reourse into the harddisk and register from there.
cheers..milton kb
|
|
|
|
|
|
Aljechin wrote:
1. How do I use ShellExecute inside my MFC program to register an activex control, say MyControl.ocx located at D:\MyFolder?
While you can use ShellExecute() or CreateProcess() for this, you could also use LoadLibrary() and GetProcAddress() to call the exported DllRegisterServer() function.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Halo sir,
I went through your article which demonstrates the usage of UpdateResource() . Nice one. But from that I am unable to understand how do I do the same when I have imported it as a Binary resource into my MFC app. Its like I have an activeX DLL imported as a binary resource and it is a part of my executable now. I need to register the control to any machine on which the executable is run. I have understood that I could do it with ShellExecute() But I do not know how to use this resource!! Is copying this data to a file on the machine and registering it the only possible way? Can I not register it from within my program itself without copying this binary and creating a replica of the actual file?
Thanks for your help.
Aljechin.
|
|
|
|
|
Aljechin wrote: Is copying this data to a file on the machine and registering it the only possible way?
It's the only way that I am familar with.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
please any ont tell me how to type cast from CString to int
actually i receive the value from user and the value is int type but
i used its datatype CString now for futhure operation i want to typecast it
to int .
so plz tell me how i convert it.
Please mail me
-- modified at 2:04 Thursday 15th June, 2006
|
|
|
|
|
yogendra kaushik wrote: please any ont tell me how to typa cast from CString to int
i get the CString type value from user now i want to convert it in to int
for any use so plz tell me how i convert it.
here is one way
int i=atoi(str.GetBuffer());<br />
str.ReleaseBuffer();
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Calling GetBuffer and ReleaseBuffer is completely unnecessary. The following will work:
CString FName = "10";
int n = atoi(FName);
It works because CString has an operator LPCTSTR .
Steve
|
|
|
|
|
Stephen Hewitt wrote: Calling GetBuffer and ReleaseBuffer is completely unnecessary
Ohh...
GetBuffer and ReleaseBuffer is mostly used where you want to modify data of the CString instead of Format.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Use _ttoi() function
Amar
|
|
|
|