|
Thanks, but that's no good as I want to trap the event when the user hits the ENTER key. lbuttondown is easy...
swine
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Is there a way to get the physical disk number from a logical drive letter?
For example, there are 3 hard disk drives:
IDE 0 Master - the first HDD, containing C:, D: and E: logical drives
IDE 1 Master - the second disk, containing F: and G:
IDE 0 Slave - the third disk, containing H:.
For example I want to determine the physical disk, on which drive F: is located. This should be the Master HDD on IDE 1.
Thanks!
|
|
|
|
|
|
GetDriveType() returns DRIVE_FIXED for all the the logic volumes in the system, because all of them belong to the fixed drives. It doesn't work for me
|
|
|
|
|
unsigned short a;
unsigned long b;
b = 0x987666;
a = b;
Hi! I am using VC6.0, and I notice sometimes the compiler give me the following warning message for the code above, "warning C4244: '=' : conversion from 'unsigned long' to 'unsigned short', possible loss of data",
sometimes(mostly when I added another project to workspace), it gives me nothing even I rebuild all files in the same project, and I can never recover the warning message after I lost it.
Can anybody tell me how to let compiler generate warning messages all the time?
|
|
|
|
|
The project that reports that warning has the "Warning level" set to 4, at other times you must have the "Warning level" set to lower value, the most common being 3.
Open the project goto the Project -> settings on the menu, select the C/C++ Tab, and use the "Warning level" combo-box to set it back to 4 again.
|
|
|
|
|
Thanks!
With the 'Warning level' set to 4, I got the 'type conversion' warning message back plus tons of other warnings.
But surprisingly, in my previous project, the warning level is 3, and I can get some of the 'type conversion' warnings as well, but much less than level 4.
|
|
|
|
|
hi,
i have done word automation using vc++.i am getting the details from the
database and filling the data in the table created programatically by word automation.
i was able to generate the report.But it is taking time(5 minutes for a 35 records)
can any one suggest some steps to increase the speed of generation of reports
using word automation
with reg
magesh
|
|
|
|
|
I want to ask few questions regarding my server side application using Winsock API.
My server accepts new client using accept(). This function returns a new socket descriptor. This socket descriptor has input and output buffers.
1) Can anyone tell me that how much resources this new socket descriptor required. What is the size of its input and output buffer by default and how can we change the queue size of input and output buffer.
2) My server application will run on Win2K machine with 512 MB RAM and 1 Ghz processor. How many connections can i accept, if the work load is low. (Server only calculates factorial of a number and return to client)
|
|
|
|
|
I made a Turkish / English dictionary that can be minimize to system tray. I want to restore my application with a keyboard shortcut. But how can I catch the WM_KEYDOWN message when my application in systray mode. Can anyone help me?
kozlu
|
|
|
|
|
Write a funtion to handle the WM_HOTKEY message. Then assign a system-wide hotkey to use for restoring your app from the system tray.
|
|
|
|
|
Kemal OZLU wrote:
But how can I catch the WM_KEYDOWN message when my application in systray mode. Can anyone help me?
See if this article helps.
http://www.codeproject.com/useritems/nishhotkeys01.asp
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
Heh, that's the article I used to I learn how to use HotKeys!
|
|
|
|
|
Hello!!
We can enable or disable Hibernate support by using the setting in the control panel-> Power options-> hibernate tab. when this check box is checked the system makes a file hiberfile.sys in the operating system root dir and reserves memory. if the check box is unchecked the system deletes the file. I want to do this programatically. I have used the function NtCallPowerInformation() using SystemReserveHiberFile, but this is not working. Can anyone tell me if it is working at their end and if I am missing something or there is some other method to do this.
Thanks in advance.
|
|
|
|
|
Hello!!
There is a setting in the control panel -> Power Options-> Power schemes tab, for setting Standby and Hibernate time. i.e. after what unit of time the system should go into stand-by state and similar combo box is also present for hibernate state.
I have tried to use the API GetCurrentPowerPolicies(). In this, a structure is filled for POWER_POLICY->MACHINE_POWER_POLICY. In that, according to MSDN, values for stand-by and hibernate should get filled , but it does not.
I am getting the time for disk spindown and video time out and also the Power Scheme, but I am not getting the standy-by and hibernate time.
Can anyone of you tell me how to obtain the standby and hibernate time.
Thanks in advance.
|
|
|
|
|
I HAVE NOTICED WHEN TYPING IN A ENTRY BOX MY CURSOR DISAPPEARS. WHEN I TAB OFF THE CURSOR COMES BACK
THE PROBLEM THAT I HAVE NOW IS IF I TAB FROM AN ENTRY BOX TO A COMBO BOX ( I HAVE SET IT AUTO OPEN)I LOOSE THE CURSOR AND CAN NOT GET IT BACK UNTIL I SELECT AN ITEM FROM THE COMBO LIST. IS THERE A WAY TO BRING THE CURSOR BACK.
THANK YOU.
|
|
|
|
|
THIS IS DEFINED BEHAVIOUR IN WINDOWS
P.S. DON'T SHOUT.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
hi all,
i met a bug that appear after my program run for few days. my program is monitoring a CAN card with a thread.
it run in win98. i found there is access violation for my code after it run for few days.
do you have any experience to check with such bugs? i really have no idea how to check for these error.
thanks,
jim
|
|
|
|
|
If you can, run the program in the debugger for a few days. If you don't have that option, then take a look at this article.
http://www.codetools.com/debug/postmortemdebug_standalone1.asp
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
IME, things that break after running for a while almost always have to do with resource (Memory, GDI, etc.) leaks.
Next time the thing crashes, take a look at the registers: If "EAX" is equal or close to 0x00000000, or 0xFFFFFFFF, then I would bet that you are experiencing a leak-related problem (and a pointer/return-value checking problem, as well).
If you can get a development environment on the machine it crashes on, build and run a debug version (standalone, do not run it under the debugger), and attach the debugger to it when it finally crashes. That should give you a start in locating the problem areas. Why not run it under the debugger at first? It adds another variable to the mix (as if the debug version would not be enough changes).
Peace!
-=- James.
"Some People Know How To Drive, Others Just Know How To Operate A Car."
[Get Check Favorites 1.4 Now!]
|
|
|
|
|
There is an interesting behaviour, in that when I repaint something twice with the same string in GDI+ it becomes brighter, so I was wondering if the way that it paints the same string is not consistent.
I tried to test this by setting the background to black, and repainting the string with the background color, then repainting another string. If you look closely you can see the residue of the first DrawString(alot more aparent if you set background to brighter color).
Code Snippet:
<br />
Graphics g();<br />
SolidBrush b(Color(255, 0, 0, 255));<br />
SolidBrush bk(Color(255, 0, 0, 0));<br />
<br />
<br />
g.DrawString(A2CW("100"), -1, &font, pointF, &b);<br />
g.DrawString(A2CW("100"), -1, &font, pointF, &bk); <br />
g.DrawString(A2CW("101"), -1, &font, pointF, &b);<br />
So question is: Is this a feature, or am I missing something basic, or is it something so obvious that I should just rest, and think about it when I am up to speed again?
Side Note: Don't really consider this a VC++ question though posted here for a lack of a more suitable forum...
|
|
|
|
|
If you're drawing using smoothing, there may be some alpha blending going on, which would account for the brightening.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Went back and rechecked my assumptions, realized the default wasn't high quality. I take that to mean the algorithim used to fill doesn't always produce the same pixels.
Thanks for the input, that made me even more eager to look around tonight. Wish MSDN docs were more detailed on this subject.
|
|
|
|
|
I'm new to MFC, so forgive me if this is a dumb question, but I'm playing with the idea of creating my own Super-Toolbar class and I figured that the best way to go about it might be to derive a new class from "CRebar" or "CControlBar". However, if I go into the MFC ClassWizard and try to add a new class, neither of those classes are listed in the "Base Class".
What up with that?
-John
"Ask me about my vow of silence"
|
|
|
|
|
The base class list is not terribly complete. You're going about it the right way, but you'll need to manually derive from those classes. Also, do you realise the code for CToolbar is installed with VC ? So you can look at what they do if you need ideas.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|