|
How I can disable the item in list control.
Thanks!
|
|
|
|
|
Hello, the codegurus around the world.;)
I don't understand cleary what means "disable the item".
But, I guess that you want to make the mouse click on some itme on the list disable?
Maybe, after you subclass CMyListCtrl, and create struct value like ItemProperties,
and keep the record of which index item will be disabled (kill the mouse clicking).
If you disable one all row, colum or one special cell, these are different stories and
you need more codes to do these.
You also add the code to show how this item is disable, and must redraw the index disabled.
But, this kind of the code seems to be very interesting.
If someone creates this kind of the control, please post your new class to Codeproject.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
Hi
I want to create a window that will stay on top of the screen. It should be as width as the screen and as height as the taskbar (may have a constant height). The user shouldn't be able to move the bar.
How should I start? Do I need to create deskband, or does a simple dialog based app teh same job?
Any suggestions or links are greatly appreciated
|
|
|
|
|
What you want is an app bar. Look up "application desktop toolbars" in MSDN.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
A dialog based app will work. Just use a CDialog without a caption bar.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
|
I am looking for a way to use the TRACE macros without adding MFC to my project. Does anyone have macro definitions to do this?
But if you do wrong, be afraid, for [the one in authority] does not bear the sword for nothing. He is God's servant, an agent of Wrath to bring punishment to the wrongdoer -- Romans 13:4
|
|
|
|
|
void RDTrace(const char* fmt, ...)
{
#ifdef _DEBUG
char buffer[1024];
va_list argptr;
va_start(argptr, fmt);
_vsnprintf(buffer, 1024, fmt, argptr);
va_end(argptr);
OutputDebugString(buffer);
#endif
}
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thanks Chris, I just about got this far, but where is the OutputDebugString function declared?
I'm currently using <fstream> to dump my TRACE output to a file, but I would prefer it to come into the IDE so I can see it while it runs.
But if you do wrong, be afraid, for [the one in authority] does not bear the sword for nothing. He is God's servant, an agent of Wrath to bring punishment to the wrongdoer -- Romans 13:4
|
|
|
|
|
OutputDebugString is a Win32 API function. #include Windows.h to get it. (it's actually in winbase.h).
it's what TRACE ends up calling. ODS will even dump stuff in release mode, hence the #ifdef _DEBUG.
you can even use the lovely WinDBG32 app to capture these message outside of the IDE.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thanks, I gave it a try and it worked. This is the first time I've actually had a question. It's great the speed with which this community answers questions.
But if you do wrong, be afraid, for [the one in authority] does not bear the sword for nothing. He is God's servant, an agent of Wrath to bring punishment to the wrongdoer -- Romans 13:4
|
|
|
|
|
You can just grab the code for AfxTrace() from the MFC\src directory and copy it to your program, too. There's also ATLTRACE if you are using ATL.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
When I set a WH_MOUSE hook,how can I get the class of the control which was clicked by leftmouse?
|
|
|
|
|
If you have mouse coordinates, try with WindowFromPoint() and ChildWindowFromPoint(), then use GetClassName() to know which control it is.
Hope this helps,
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hi !
Before use any command from NetApi32.DLL ( NetAPIFreeBuffer and all that stuff), I check if the version is not 95/98, .... but anyway if I try to run the EXE in a machine with 95/98 it gives me an error ( I think when tries to load the DLL or... ? I´m not sure).
Is there anyway to avoid that ? ( If I can run the program in 98 the specific NT functions never will be executed, because of the checking...).
Thanks, Bye !
Braulio
|
|
|
|
|
Use DelayLoad feature or explicitly call LoadLibrary/GetProcAddress.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
|
Hi,
I've experienced the strangest behaviour of my VS 6.0. I have project with multiple, hierarchially dependent sub-projects (each one comprising a dll). I added some code to a header file of the most basic sub-project and compiled it. The compilation went fine, VS went into linking, I heard a beep and the compilation froze! I tried to shut down VS but was told that I had to stop the compilation first, but stopping it from the menu or the button didn't have any effect. I eventually had to cold-boot my Win95 system. I removed the coded I had added, and it went fine. I added it again and compilation went fine. I made some other (very small) changes, it crashed on compilation again!
Does this ring a bell for anybody? Any suggestions?
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Are you running Norton AntiVirus on 9x/Me by chance? There's a known bug with NAV 2000/2001 (maybe 2002, I haven't tried it yet) that'll lock VC when it either runs the help compiler or regsvr32. Disable Auto-Protect to work around this.
--Mike--
http://home.inreach.com/mdunn/
"Listen you footwarriors, can you hold down a bit with the firing? I've just got three impromptu weddings breaking out behind me!" -- Arthur Dent
your with and
|
|
|
|
|
Wow, thanks! Yes, I'm running NAV on Win95, with autoprotect on. I'll try to disable it and see if the problem goes away. BTW, VC doesn't really lock, it just never finishes the build (but the UI works fine).
Do you know if NAV causes any problems with Adaptec CD Creator as well? Creator won't recognize my CD writer (although Direct CD works fine!)
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Hi,
disabling Auto-Protect certainly did the trick, thanks again. However, the compilation froze (with Auto-Protect on) either during the creation of the browse database or during invocation of a post-linking step (a file copy). So this bug is not just when running help compiler or regsvr32.
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Yeah, the IDE will hang when launching any external program. Regsvr32 is just what most people get the hang with since that's used so often.
As for your CD writer, I don't know. Check Symantec's knowledge base and Adaptec's site.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
As for your CD writer, I don't know. Check Symantec's knowledge base and Adaptec's site.
Did that. Since the Adaptec sw came with the writer it's OEM and out of Adaptecs (actually it's Roxios) hands. I'll have to contact the writer producer (Samsung). But I'll upgrade my PC and install win98 instead one of these days, and I'll install NAV as the very last program. I'll check that everything works before NAV, and if anything breaks after NAV I'll fry their support.
thanks for your help
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
How to get the file property dialog box?
Like "File-->Property" in IE and Word.
Thanks.
Maer
|
|
|
|
|
I'm not sure, but you may use ShellExecuteEx() with a special Verb.
I don't know which one though, you may have to do some research.
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|