|
Irfan, these articles may provide some help:/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I have been using g++ to compile C++ programs in Linux but I just got Visual Studio .NET so I have been trying to use that. When I go create a new C++ project is visual studio, however, I cant figure out which option I'm suppose to pick. Programs that worked with g++ don't work when I add them to my Visual C++ projects?? Does anyone know which Visual C++ project to create for regular C++ programs?
Another problem I am having with Visual C++ is when I try to overload constructors. Client is a user defined class I created and when I create a instance of it with:
Client c(int num, int age, int entered, char sex, int value);
and then call:
c.print();
it says that c must be a class/struct/union.
I have a pverloaded constructor with matching parameters and there is no compile error for the initialization of c so why does it say its not a class?
Thanks in advance.
|
|
|
|
|
linjc23 wrote:
I have been using g++ to compile C++ programs in Linux but I just got Visual Studio .NET so I have been trying to use that. When I go create a new C++ project is visual studio, however, I cant figure out which option I'm suppose to pick. Programs that worked with g++ don't work when I add them to my Visual C++ projects?? Does anyone know which Visual C++ project to create for regular C++ programs?
I suspect you want "Win 32 Console Project"
Kevin
|
|
|
|
|
|
I developed a new application that show images like thumbnails in explorer in a List Control. The problem is when the user clicks on a thumbnail, the thumbnails shifts right and left. I don't want this.
See these picture to better understand what I say.
Normal[^] Shifted[^]
Thanks,
A. Riazi
|
|
|
|
|
post onclick code 4 better understanding...
4apai
There're no impossible tasks. There're tasks that required infinite period of time.
|
|
|
|
|
The OnClick itself doesn't do anything. It seems that because the thumbnails are bigger than width of ListControl this behavior occures.
A. Riazi
|
|
|
|
|
hi
want to hear your opinion about the next:
how to logon remotely to the lan computer
i use following code:
HANDLE hToken = 0;
BOOL bRet = LogonUser("user", "domain", "password", LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, &hToken);
the function return 0. hToken is set to NULL. and the getlasterror return 'logon failure: unknown user name or password.'
i check all parameters for conveniency twicely.
in MSDN writes that "You cannot use LogonUser to log on to a remote computer".
i think this statement include the answer.
then my qeustion is: how to logon user on a remote machine?
any ideas?
4apai
There're no impossible tasks. There're tasks that required infinite period of time.
|
|
|
|
|
ok. i'll redescribe u what i exactly need.
i've a local station station1. (i've here an administartor account name1)
and had a remote station station2. (i've here an administartor account name2)
i logon to station1 with name1
then i need to perform some functionality on station1, which require context of administartor account on station2.
so i need to log on name2 account on station2 and then using f.e. createprocessasuser with retrieved user token run process which will perform that functionality.
a simple sollution is to add name1.dns_name to administartors group on station2.
then i dont need any additional tasks to perform. all functionate perfect.
but the problem is, that it is not allowed due to restrictions or project.
if i dont explain quite clear or u've any ideas then post me.
4apai
There're no impossible tasks. There're tasks that required infinite period of execution time.
|
|
|
|
|
Hello,
I want to create a DLL and Use it by #import
directive
(Any Simple Link or Example?)
Best Wishes,
Thanks.
|
|
|
|
|
"The #import directive is used to incorporate information from a type library. The content of the type library is converted into C++ classes, mostly describing the COM interfaces."
do you want to create COM type library?
4apai
There're no impossible tasks. There're tasks that required infinite period of time.
|
|
|
|
|
Zero_One_ADO wrote:
I want to create a DLL and Use it by #import
directive
Then you'll need a COM dll.
I recommend that you read about ATL on MSDN, as it is the simplest way of creating COM dlls without having to understand all the workings. The wizards pretty much do it all for you.
Michael
CP Blog [^]
|
|
|
|
|
hi geeks
i'm gonna invoke a dll handle which hosted in another process (i mean in another memory space ) from my process .how it could be possible .
matter of fact i'm wondering if it's possible to get a dll handle in cross process condition .
give any clue you know.
thanks in advance .
|
|
|
|
|
Invoke what ?
What handle ?
...cmk
Save the whales - collect the whole set
|
|
|
|
|
if u'r talking about hmodule handle retrieved by loadlibrary, then this handle will be invalid in context of another process. this handle is living only in virtual memory space of current process.
|
|
|
|
|
Next semester, I'm going to take Unix programming,
and I'm excited about it. However, I wonder, if
Unix supports C++? Or it just supports C?
By the way, what is the main difference between
Linux and Unix? Can I apply technique I learned
from Unix to Linux?
Thanks
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|
|
you can program c++ in unix and gain it's power.
download and make gcc 3.3 or higher version for unix environment.
|
|
|
|
|
The difference between UNIX® and Linux is that Linux isn't certified to use the UNIX® trademark. Both are based on the Single Unix® Specification standard (ISO/IEC 9945).
|
|
|
|
|
Alex Ngai wrote:
I wonder, if
Unix supports C++?
No!
Unix is an operating system just like Linux, MS Windows, DOS and CPM (ancient system), and others. The operating system is only important if you are writting code specificaly for that operating system. No matter what system you are programming for, most of the code (if not all) should work. If you are running the compler on that system, then you are probubly creating a program that will only run on that system.
Operating systems (as a general rule) do not support programming languages, but complires do.
Example: The Visual C++ compiler is supposed to beable to compile for both Windows and Macantohsh. That is if you are devloping the program on an MS Windows system and compile it for Macantohsh, you can not run the program.
Alex Ngai wrote:
Can I apply technique I learned
from Unix to Linux?
Yes! But there may be differences.
INTP
|
|
|
|
|
Hi John,
Thanks for your reply. I have another question: In your
profile, you said that you are a Software Engineer. I wonder
what is the difference between Software Engineer and Programmer?
In my University, I have an option to focus on Software engineering,
however, my final degree will still be Computer Science. I wonder
what takes to be a Software Engineer? When I graduate with a BS
in Computer Science, will I be called a programmer or software
engineer?
Thanks
-----------------------------
C++ without virtual functions is not OO. Programming with classes but without dynamic binding is called "object based", but not "object oriented".
|
|
|
|
|
'Programmer' is the broad, general term for a person who writes computer programs. There is no implied level of training or expertise. A 13 year-old kid writing script and a $100,000/year employee writing C++ for embedded systems are both programmers.
'Software engineer' is often used as a job title. A software engineer is a programmer who applies engineering practices and principles when they develop software. These engineering skills require either a university education or several years working experience to acquire. The 13 year-old kid writing script is definitely not a software engineer. The $100,000/year employee is a software engineer.
Your degree in computer science will make you a programmer. Generally, graduates with CS degrees apply for software engineering jobs. Those same jobs may be listed with a job title of 'programmer'.
Software Zen: delete this;
|
|
|
|
|
More specifically, if you study Computer Science in a university, and get a degree on that, then you, like said, become a 'programmer'.
In my country, there are schools available which educate on the B.Sc level of degrees. The line I'm on is called "Software engineering". Thus, when I graduate from this school, I get a B.Sc, and can call myself a "Software Engineer". Just like someone graduating from our school on the architectural line would call themselves "Architects" or "Building engineers".
The idea is that "an engineer" is a qualification. M.Sc with CS as primary is called a degree. Mostly a wordly issue, though, as both CS degree dudes and engineers do same jobs
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
My title is Software Engineer! What I am is a programmer++ (without a B.D. or an M.D., hence the ++)! The difference between a programmer and an engineer is fairly simple: A programmer is someone who knows the language well enough to solve the problem(s) given them, An engineer (normaly a B.D. OR an M.D.) is someone who can figures out what the problems are (or well be) before they give the problem to the programmer(s).
That does not mean the engineer is (or was) not a programmer, but it does mean that he may (or may not) know what he/she is talking about.
Enough of that!
What it all amounts to is that an engineer makes more money than a programmer!
As for your question: If you have a B.S. degree, then you are a software egineer.
Just remeber that because you have the degree, that does not mean you know more than the programmer doing the job (listen and learn).
Note: I am titled an egineer, because I have never been given a problem that I could not solve.
INTP
|
|
|
|
|
Hello
I am Aqueel. Please tell me how can i call an event or a function when mouse pointer is rolled over a button.
Aqueel
aqueelmirza@yahoo.com
we believe in excellence
|
|
|
|
|
A button is a control. A control is a window. When the mouse moves over a window's non-client area, a WM_NCMOUSEMOVE is posted. When the mouse moves over a window's client area, a WM_MOUSEMOVE is posted.
To detect when a mouse enters/leaves your button's area, answer to the first WM_MOUSEMOVE message, and call TrackMouseEvent , specifying that you wish to know when the mouse leaves the window's client area (WM_MOUSELEAVE). When the mouse does this, the tracking is automatically cancelled. Between the first WM_MOUSEMOVE and the WM_MOUSELEAVE, the mouse is hovering over the button. To prevent calling TrackMouseEvent multiple times, use a boolean variable that you set in WM_MOUSEMOVE and clear in WM_MOUSELEAVE.
Hope this helps. You should see MSDN for TRACKMOUSEEVENT structure. This documentation will tell you how you must fill the structure in order to track for WM_MOUSELEAVE messages.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|