|
Thanks for the info. This will save my bacon nicely, as well as giving me a good excuse to finally learn how to put together a dll, and a Windows hook.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Arrggghhh....
On one of my dialogs, I've got a combo box with its type set to Drop List, and Owner Draw set to No. There's nothing unusual about the combo box, it contains four items (for now), but, for some reason, when you make the combo box drop, you can only see one item in the list. There are the usual scroll bars on the right, and all the items are there, but what I'm really after is having the box display all four items without the scroll bars (when dropped). I've tried disabling Vertical scroll, enabling Disable no scroll, and just about everything I can think off, but none of them give the desired effect.
Any ideas folks? Its such a basic thing and really doing my head in!
|
|
|
|
|
when you are in your dialog resource window (the window where you were when you first put the combobox on the dialog) click on the arrow of the combobox as if you were going to drop it down and the bottom 'handle' should turn from white to blue. Take that and drag it down and the 'mask' around the combobox should have a bunch of empty space under the box. The empty space is how far down your combobox will drop down during runtime.
Hope this helps.
-Zack
|
|
|
|
|
Zack. You should be paid more! Thanks very much.
|
|
|
|
|
Is there a good method for faking mouse movements and clicks? I want to be able to move the mouse to a specific coordinate and make it 'click' that point (not inside of my application).
|
|
|
|
|
|
|
In your configuration screen by add/remove programs you can see a list of all installed software. Now I want to make an array that does the same, show me all the installed software by name. Then together with your computer name send that information to a text file. Later on the system administrator can check the text file and send it to a database.
Can someone help me with this problem.
Thanks
Hessel
|
|
|
|
|
this is the registry key
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
enumerate its sub-keys
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
Hi Y'all
I am trying to insert a CString into a database table.
this is what I have but it literally puts the %s into the table remove the ' and I get an error.
CString CSWholesentence = "This is the whole sentence";
SqlString = "INSERT INTO Sentences (SENTENCE) "
"VALUES ('%s')", CSWholesentence;
database.ExecuteSQL(SqlString);
Any help greatly appreciated.
Cheers
Tryhard
|
|
|
|
|
use this instead
SqlString = "INSERT INTO Sentences (SENTENCE) VALUES('";
Sqlstring += CSWholeSentence;
SqlString += "')";
Nish
Sonork ID 100.9786 voidmain
|
|
|
|
|
Thanks Guys.
Sorted.
Tryhard
|
|
|
|
|
The % replacement only works in sprintf(), CString::Format(), and their variations. It is not a feature of C++.
CString sql;
sql.Format ( _T("INSERT INTO Sentences (SENTENCE) VALUES ('%s')"), (LPCTSTR) CSWholesentence ); Note that you need to cast a CString to LPCTSTR (as I did above) when it's being used as the string for a %s substitution.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Note that you need to cast a CString to LPCTSTR (as I did above) when it's being used as the string for a %s substitution.
Why would this be? I have used format without the LPCTSTR cast quite successfully in a number of projects.
|
|
|
|
|
You don't have to cast to LPCTSTR. CString contains only the actual pointer to the null-terminated, C-style string. If you pass CString by value, two things happen
- a space on the stack is reserved. It has a size of 4 bytes on 32-bit Windows, b/c sizeof(CString) == sizeof(TCHAR *)
- CString copy c'tor is called (it's cheap, b/c CString uses refcounting and copy-on-write)
From the Format/*printf (and all other functions expecting char *) point of view, the CString on the stack looks exactly the same as plain old char* pointer - that's why this works.
The only thing you can worry about is that in VC 8 they'll change internal representation of CString, but I'd say it's *very* unlikely - too much code is written using the assumptions above.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Because a CString is not a LPCTSTR. It may work now, but it's still wrong to leave out the cast. I'll keep doing it.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Is there a way to set the color of a list controls column headder?
Thanks,
Rob
|
|
|
|
|
It's easy to do with custom draw. Check out NM_CUSTOMDRAW in MSDN (and be sure to read the header control variety, NM_CUSTOMDRAW works differently for different controls).
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Thanks Mike.. I'll take a look.
Rob
|
|
|
|
|
I know it is late but can someone help me with this, I know sh*t about c++ but I have to have this stupid course and have to get his assignment done can someone
|
|
|
|
|
A couple of things.
1/ No-one can help you if you don't post the question.
2/ Hopefully no-one will help you if you just post your assignment and expect a free ride. I'm sure everyone will be keen to help if you post your attempt at the problem and explain where you are stuck. If you 'know s*it' about C++, then it probably means you need to study more. Unless you're *never* going to look at C++ again, there is no point us helping you pass something you know nothing about. You're only going to find the cost of entry in terms of learning what you're supposed to know will increase the further you go without knowing your stuff.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I understand what you are, and I respect that. My problem stems from a teacher who can't teach and when he tries he confuses the sh*t out of the class. Now I'm not trying to blame it on the teacher. but right now I am so lost I'm stuck at start, and I'm not sure what to ask as my question. I know this should be a simple assignment but I am finding it hard at the moment. I think all I need is alittle help getting started in the right direction and I can take it from there!
|
|
|
|
|
If your teacher is a moron you should complain, you have a right to be taught well. Either way, you should buy some books and teach yourself instead.
That being by the by, I'd be happy to give you some pointers, but you're yet to say what the assigment is. I assume you need to write something ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
Write a program that evaluates simple mathmatical expressions. the program reads one expression at a time from the user, evaluates it,and stores the result in an array. sort the expression and result in descending order of result values, and print them out. allow for a maximum of 25 expressions. ther will be three source files: main,eval and ch2int.
|
|
|
|
|
In other words a calculator ? Do you know how to do the following:
1/ read input from the user
2/ create an array
3/ parse a string ( I presume this is what ch2int will do, parse for an operator and a number )
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|