|
You may want to consider using a CListCtrl instead of a CListBox . That way you could call its EnsureVisible() method to scroll a specific row into view.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I didn't understand half the things you said.
Could you simplify it.
I already coded most of it, and it would break my heart to recode it.
I just want it simply to autoscroll down
Please help me.
|
|
|
|
|
|
I could only make it CListBox::SetTopIndex, without the (). And I couldn't even add the GetItemCount()-1
Even the CListBox::SetTopIndex didnt work...
What do I do?
|
|
|
|
|
You can post your code for starters....
Bikram Singh
|
|
|
|
|
I rather not, (i'm making a game (closed source))
I just want a normal everyday listbox to scroll down everytime a message is put into it
Any ideas?
|
|
|
|
|
I want to have a home made arcade wheel, stick, or control panel plugged into a printer(lpt?) port, and have a program that takes the signals from the printer port and converts them into keypresses so that games like MAME, Half-Life, GTA3 and the like can benefit from having custom made controls.
The only problem is creating an artificial keypress so that the game thinks the up arrow key is pressed I want it to.
Someone told me to code a driver, way over my head, and im not sure if its totally necessary. The other windows API's ive tried work in applications like notepad, but not with games, that probably have a more direct access to the keyboard.
So I looked also int Windows Hooks, but I dont totally understand how they work, or if you can insert data into the keyboard stream, all tuts and discussions on this just read keyboard input.
So please help with any ideas, or knowledge that can solve this problem, thanks.
|
|
|
|
|
Look into the SendInput() and keybd_event() functions in MSDN.
Bikram Singh
|
|
|
|
|
I tried SendInput() and its not 'root' enough to send a keypress to the games im wanting to work.
Anyone ever create somthing or hear of anyone who has created somthing that can insert a keypress to where its inserted at the earliest possible point in the line?
Thanks anyway bikram
|
|
|
|
|
so you mean you want to sent keystrokes to a game such as Need For Speed and suchlike? Created with the DirectX library? Or do these games run in a DOS window?
For DirectX-based games, I dont suppose SendInput() would work, cos DirectX probably works much closer to the keyboard driver, i'm guessing. So, look into MSDN dox on DirectInput...
For DOS based games, I havent a clue as to what could be done... maybe a TSR ?
Bikram Singh
|
|
|
|
|
No dos games, only windows, but yes, ones that proably use direct input, so it needs to be very root.
|
|
|
|
|
do a google search for "build your own arcade controls". Also search for MAME. There are a bunch of people into doing things like this, and you will find most of them by some form of the above searches. Their goals are not exactly yours, but they can help you out a lot anyway.
For starters why are likely to recomend that you not use the lpt port (though they can tell you how to make it work), as there is hardware designed for this purpose, most likely (but not always) with the drivers you need already made! Just a matter of figuring out what to buy and what to make.
|
|
|
|
|
Ok, ill do that, thanks for a point in the right direction
|
|
|
|
|
The standard left and right buttons generate well-known window messages.
The wheel does so too.
How about the back/forward buttons?
Anyone has any idea how to write code to capture events from those two.
Be well
|
|
|
|
|
|
Is WM_XBUTTONDOWN what you need ? Never used a 5 button mouse, so im shooting in the dark here...
Best way is probably to fire-up Spy++ on some app's instance, and press the 4/5th buttons n' see what Spy++ shows you...
Bikram Singh
|
|
|
|
|
Thank you both.
I have try to implement the WM_XBUTTONDOWN through PreTranslateMessage but the message itself is undeclared and aborts compilation.
It should be obvious but the documentation is taking me nowhere.
Any thoughts?
|
|
|
|
|
You need a newer version of the SDK files.
Give Google a try sometime!
#define WM_XBUTTONDOWN 0x020B
#define WM_XBUTTONUP 0x020C
#define WM_XBUTTONDBLCLK 0x020D
#define MK_XBUTTON1 0x0020
#define MK_XBUTTON2 0x0040
Bikram Singh
|
|
|
|
|
I'll give google a try, worry not
Thanks again Bikram, you are the man.
Be well.
|
|
|
|
|
Hello,
I've the following problem, I like to have to system-wide keyboard shortcuts
(I know how to do that) that to the follwowing thing:
If I press shortcut_1 I like to copy the actual Excel cell-data into the clibboard
change to my application and paste it there.
If I press shortcut_2 I like to copy the actual data from my application and paste
it into the actual excel cell.
How to I automate Excel to achive my goals.
Thank you
Mario
|
|
|
|
|
I think visual basic would allow you to achieve your goals more easily. vb6 is the best to use, you can create extended functions to their tools to improve their use-ability. If you have bought microsoft visual studio package, you'll find it with that.
|
|
|
|
|
char open[80];<br />
<br />
cin >> open;<br />
<br />
if(open != "!")<br />
{<br />
}
when I type ! for open it still does whatever is in the if statement...
PLZ help!!!
THX
|
|
|
|
|
chars (null terminated strings) are being compared with strcmp . This will return 0, when the strings compared are equal.
if(strcmp(open, "!") == 0)
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
THX for the quick reply (under 1 minute after posting)
|
|
|
|
|
also try this
if(open != '!')
{
// Do something here
}
|
|
|
|