|
Secrets of the game programming gurus is a good one for gaming, and for C++, it depends - C++ in 24 hours or C++ for dummies, if you're a dummy. Otherwise, the Stroustup books are obviously good.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
I want to know if i want to pass a COM object in a method of a COM in the parameter list. Is it just pass the IDispatch interface pointer ?
Can anyone show me examples ?
I've a SerMessage COM and a SerConnection COM. In SerConnection's SendQMessage(), it has to pass in SerMessage
|
|
|
|
|
Send it as an IUnknown, then you can call IUnknown::QueryInterface() on the IUnknown pointer, and get a pointer to the COM Object...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
I am looking for a free, 0 $, small, downloadable, resource editor.
Don't tell me that the Microsoft and Borland development packages have integrated ones! It should be an "external" resource editor.
Do you know a good one?
Thanks!
Dominik
|
|
|
|
|
For what ?
I have written a Menu editor as a ActiveX. If you want, I'' send you
Email me: dlhson@zapo.net
|
|
|
|
|
|
What an excellent tool, thank you for bringing it to us!
|
|
|
|
|
It's not me who made it, I just posted a link to it
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Thank you very much! ResourceHacker is GREAT!
|
|
|
|
|
Hi,
I am a newbie in VC.
Can anyone instruct me how to install a icon for a program on the desktop, and later delete it (in Visual Basic or Visual C++) ?
Besides, if I want to make my program automatically run when Windows starts, I will have to create an registry entry for HKLM\Software\Microsoft Windows\..., how should I create such a key using Visual C++ ?
Thanks
|
|
|
|
|
|
|
In my application, i have some struct definetions. Such as,
typedef struct
{
int x;
double y;
unsigned char name[128];
........
}MYSTRUCT;
and then, i use this struct with global two-dimentional array like this;
MYSTRUCT mystruct[300][500];
With this definition, there is no memory allocation fot it.
My problem is how to free the memory or delete it when it is not used or
application will exit?
Thanks in advance!
chen
|
|
|
|
|
I'm not sure what you mean by "there is no memory allocation fot it." That declaration creates a 2D array with 150,000 elements total. Since it is a global, the memory is freed automatically when the process exits.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi all,
I have a basic question. I want to write a GUI application and I have to choose between ATL/WTL and MFC.
Which one should I choose and why?
I just compiled an wizard Dialog-based application with both WTL and MFC and the resulting generated code and *.exe for WTL is bigger than MFC, my guess was opposite why it is so?
any help in this regards
regards
/rsasalm
|
|
|
|
|
Actually, there is little chance the executable for WTL is larger. What you are missing is that the MFC version requires the MFC DLLs. These DLLS must be distributed with your application to insure that everyone can run your software.
I am a huge fan of WTL. But in many ways it is more basic than MFC. But that also means that it doesn't get in your way as much as MFC.
IMHO, more experienced programmers should move to WTL. But if you are just creating applications that fit well with MFC, it works just fine. It is really hard to say which would be best to use.
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
I have an SDI application with a single CformView view. I only want the view to be visible in diagnostics mode. Otherwise it should be invisible to the user.
I can hide the app with
CMainFrame::m_pMainFrame->ShowWindow(SW_HIDE);
In the OnInitialUpdate().
But the app still shows up and then goes away. Is there a way to hide it either sooner or all together so the average user never sees it?
Thanks
|
|
|
|
|
Modify the window style in PreCreateWindow() by adding this line:
cs->style -= WS_VISIBLE;
|
|
|
|
|
Thank you. That is perfect.
|
|
|
|
|
How can I authenticate a user in a n-tier application made of a C# Client, a XML Managed C++ Web Service and an SQL Server Database.
The database is 2 tables with each rown contains:
the users table contains the columns:
-username
-password
the personal data table contains the colums:
-username (with a relationship with the first table)
-name
-surname
-address
-phone
The XML Web Service consists of two methods:
Login(username, password)
GetData(?)
UploadChanges(?)
Now It's start to be confusing for me!
I want that only the correct user, authenticated using the data in table Users, can modify the corresponding row in the PersonalData table.
How I accomplish this?
I could setup a cookie like mechanism that asks username and password, gives them to the Login() method, that returns a SessionVariable, and stores them in the PersonalData table. After when a user wants to GetDataFromDatabase of UpdateChanges, it has to give the variable back, and the update is made with a SQL statement like (SELECT FROM PersonalData WHERE CurrentSession = XXX)
Is this method reliable?
Is there a simpler method that I don't know?
Is there any kind of serverside security? Maybe in the SQL Database?
Thanks to anybody who will answer me.
"Nelle cose del mondo non e' il sapere ma il volere che puo'."
|
|
|
|
|
Easiest is to use windows authentication everywhere.
Step back, rub your eyes, take a deep breath, stretch a bit, and reflect on the relative importance of CP, CG, the age / travel time sustained by supposedly 'fresh' cheese curds, and Life in General. - Shog9
|
|
|
|
|
A good way of doing it is ensuring that the SELECT statements are executed against the entered username and password.
For example, on the page where they can edit their details, you could change it so that it will only fill out the form with details from the DB where the user + pass = what was entered. By doing a join with the two tables you can return all the information in one query, and by filtering it this way if the pass or username is wrong, it won't be returned.
Likewise when returning the data back, only update the rows where the user + pass match, for example create a view which joins the two tables (in effect returning user details) and limiting it based on user + pass.
Another way is to store the username in a cookie, as well as a hashed version (with some random text appended). Then, everytime a page is loaded, check that the hashed value matches a hash generated at the time the page is executed. This way, you can be sure that its been issued by you, and not hacked. Then you just have to check its a valid username, if it is, then all is well.
Let me know if there's something I need to explain a little better.
|
|
|
|
|
Can anyone tell me what are the steps to create components that used in IE (without GUI, just like ADO components) ?
Thanks so much ^^
|
|
|
|
|
|
I'm using .NET now. I tried creating a COM control 2 years ago using VS6, but now completely forgot all the stuff.
When I created a ATL Project, it has two projects created, one is MyProjPS and the other one is MyProjPS (supposed to be proxy & stub, right). Then what's next, I should right click on the MyProj and choose Add-New Class, right ? Then what should I choose from the ICONS ? What next then ? ...
I forgot the steps ...
|
|
|
|