Archived

This topic is now archived and is closed to further replies.

Sheltem

Hiding the cursor in a win32 console app

Recommended Posts

How do you hide the text cursor in a win32 console program using VC++ 6.0? What I have puts the cursor at the top of the character cell but doesn''t hide it like the function is supposed to the way I have it set up. What am I doing wrong? This is what I have: #include "windows.h" void main() { HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cursor; cursor.dwSize = 1; cursor.bVisible = 0; SetConsoleCursorInfo(handle, &cursor); } Thanks in advance...

Share this post


Link to post
Share on other sites
Strange. It doesn''t work on my win98se (Gateway OEM) machine. This computer I have here exhibits some really f-ed up behaivor so could someone with win98 or win95 compile and run this code and see if it hides the cursor for them to see if it''s just my computer or every win9x OS that it doesn''t work under? If it just doesn''t work under Win9x for some reason does someone have another way to do this or is there another way to do this, period? Thanks again for the input mordell and for any hopefully forethcoming information....

Share this post


Link to post
Share on other sites
So, when you say works you mean you don't see a cursor at all? Just a blank screen? If so, it's official. Something is really wrong with my computer. My other main problem is I can't get Direct X to work anymore. It worked perfectly for a long time on this computer but then suddenly now any Direct X program just freezes on the startup screen display a blank window even if it's supposed to display graphics. The program never stops "responding". Just sits there for eternity.

This happened suddenly while in the middle of programming a Direct X game. I compiled a small game and ran it fine once. Made a few changes and a few minutes later compiled and ran again and got a blank screen and it's been doing it ever since. I've gone as far as to take out my modem and sound card and swap out my TNT2 video card with an old Voodoo Rush and my View Sonic PF790 monitor with an old piece of crap monitor I had and then delete my hard-drive partitions and then re-create them and format the partitions and install win98se as clean as I can possibly get but I still get the same results. A blank window with any Direct X program ; Ones I make or any commercial Direct X games.

Now this problem with the cursor (among some other weird things). Anyone have any idea what could wrong (I know there's not a whole lot to go on)? My hardware is as follows: Pentium 3 500, Us robotics 56k modem, SB live sound card, tnt2 ultra video card, 128 MB RAM. I don't know the motherboard or chipset. This is a Gateway computer with win98se. I've tried updated drivers but same thing. And Direct X worked perfectly on the drivers that came with this computer for many months and many, many hours of playing and programming Direct-X. I know this isn't a tech support forum but I'm getting desperate, sorry. I'm pretty competent when it comes to troubleshooting Windows (it's what I do for a living) but when you get into the BIOS or hardware I am alot less knowledable to say the least. help!

Edited by - Sheltem on 4/7/00 2:08:14 AM

Edited by - Sheltem on 4/7/00 2:14:21 AM

Share this post


Link to post
Share on other sites
Sheltem: If you have DX7, go into the DX Diagnostic Tool (there's a shortcut in c:\program files\directx somewhere), and try disabling AGP, and all acceleration on the Display 1 tab. Then, use the test buttons to test DirectDraw in fullscreen. Repeat for Direct3D. If it works now, then something is definitely wrong with your drivers or hardware. Try re-enabling acceleration options one-at-a-time until it stops working. If your AGP settings are incorrect (which is my guess), then it will fail when you re-enable AGP support. If it is, contact Gateway and have them help you through formatting your hard drive and re-installing Windows.

Also, another problem I have had in the past is bad memory, from no-name companies to companies like Dell, and cpus that go bad (had an AMD K6-2 where the MMX unit went bad, and it couldn't do DX or some movies that had MMX acceleration). The only sign of this is out-right not booting, or little errors that pop up here and there, usually in the same program because Windows often assigns it similar memory addresses and resources. To check this, do a Safe Mode boot and HIMEM.SYS will check the memory.

If you think it's a real hardware problem, try downloading BCM Diagnostics -- best shareware program that test memory, cpu, mouse, keyboard, ports, DX drivers, etc. in both Windows and DOS mode (DOS mode can't test DX drivers though ). The site for that little shareware program is:

http://www.bcmcom.com/(not a typo)

It is EXTENSIVE!





- null_pointer
Sabre Multimedia


Edited by - null_pointer on 4/7/00 7:47:06 AM

Share this post


Link to post
Share on other sites