|
May I get the coordinates of the hot spot of the cursor? If yes then how?
Best regards,
Eugene Pustovoyt
|
|
|
|
|
::GetCursorPos( ) ?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
I was seeking the gethotspot api few months ago and never found it. it should be in the CURSORINFO struct but it isn't.
If someone know a way to get this hot spot i'm very interested in too. I need it to remove a define in my code.
Dimitri Rochette
|
|
|
|
|
Hi,
I want to create an application which gives a certain amt of the system disk space for global sharing. Is there any mechanism for that? How can I do that? Also other client machines should be able to store their files, if required, to this shared storage space and retrieve it later.
How can I restrict the shared space to a fixed amt?
Kindly help.
Regards,
|
|
|
|
|
I would like to create a class much like a CListCtrl for file selection on a Pocket PC. I don't like the file dialog that's ready-to-use.
BUT, I'd like it to have a simple interface. So my thought was that I could use protected inheritance to derive a class (CFileListCtrl) from CListCtrl, so users of my custom control wouldn't be able to mess with any CListCtrl methods that could "mess up" my custom control.
Does this seem like a reasonable approach? Do any of you know if I have to do anything other than set up my custom methods (which will then use the methods of CListCtrl), and registering the custom control class as per one of the tutorials on this site on custom controls?
I'd appreciate any input. Thanks.
- Kati
|
|
|
|
|
Hey fellas,
Right now I am pretty much stuck at a point I am modifying a device driver and well I don't really have much prior experience doing such stuff. For debugging reasons I need to write some data to a disk file. For this purpose I am using the following code :-
NTSTATUS Status;
LARGE_INTEGER ByteOffset;
IO_STATUS_BLOCK IoStatusBlock;
OBJECT_ATTRIBUTES InitializedAttributes;
UNICODE_STRING ustr;
HANDLE handle;
WCHAR fname[] = L"\\??\\D:\\Output.txt";
RtlInitUnicodeString(&ustr,fname);
InitializeObjectAttributes(&InitializedAttributes,&ustr,0, 0, NULL);
Status = ZwCreateFile(
&handle,GENERIC_WRITE|SYNCHRONIZE,
&InitializedAttributes,
&IoStatusBlock,
0,FILE_ATTRIBUTE_NORMAL,
0, FILE_OVERWRITE_IF, FILE_NON_DIRECTORY_FILE|
FILE_WRITE_THROUGH|
FILE_SYNCHRONOUS_IO_ALERT,
NULL,0);
ByteOffset.QuadPart = 0;
ZwWriteFile(handle,NULL,NULL,NULL,&IoStatusBlock,
data,512,NULL,NULL);
ZwClose(handle);
My problem is that the file is not getting created at all! Can anyone tell me what I doing wrong here?
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Hi Nish,
if u have win2k ddk(ntddk) ,there u can find a sample at the following directory.
root\ntddk\src\kernel\parclass\debug.c
this file debug.c has a sample on how to create a file from the kernel device driver..u can compare u r program with this and check out where u r going out of wrong..
regards,
shiv
|
|
|
|
|
I have developed my application using DirectShow for play MP3 file. I developed with DirectX 8.1 SDK.
How can I know which minimum version of DirectX runtime does my application require?
|
|
|
|
|
Is it possible to obtain the main window handle of a running application if I have the process ID?
I actually got the handle by enumerating the windows and searching by the window title. But, I feel like there must be a better way.
Thanks for any help
|
|
|
|
|
You can make the invert process using GetWindowThreadProcessId..
But for find that you need go to "Process and Thread Functions" in MSDN....
Carlos Antollini.
Pi Five[^]Creator
Sonork ID 100.10529 cantollini
|
|
|
|
|
I actually want to do just the reverse of what GetWindowThreadProcessId does. But, that gives me an idea, thanks..
|
|
|
|
|
It can't be done since it isn't unique (one process having 2 or more main windows). But if you are sure you have a unique window, the brute force method should work.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
hi,
if i have thread A, B to access variable C, so, i need to used CCriticalSecion to lock it, right?
however, if thead A, B access variable C in a structure and some other variables D,E,F in the same structure will only accessed by thread B. so, do i need to lock when thread B access these variables D,E,F?
my worry due to they are in same structure. but, some are public resource from multi-thread but some are private resource...
thanks,
jim
|
|
|
|
|
You only have to lock access for C, not DEF if they are truly independent. It doesn't really matter if they are all in the same structure.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi,
I have been working on this program for quite a while and have been doing quite well. Somehow, however I seem to have done something wrong. Being new to this I am at a total loss trying to decipher this error message. I checked MSDN and got something that doesn't seem to help me. I'd really appreciate it if someone could please tell me what this error might mean. The program worked yesterday, and today it doesn't, with no changes by me in between.
Project4 error LNK2019: unresolved external symbol "protected: __thiscall CProject4Doc::CProject4Doc(void)" (??0CProject4Doc@@IAE@XZ) referenced in function "public: static class CObject * __stdcall CProject4Doc::CreateObject(void)" (?CreateObject@CProject4Doc@@SGPAVCObject@@XZ)
Thanks a lot
Garry
|
|
|
|
|
Most likely you have not defined your function. You have in your .h file something like:
class CProject4Doc {
CProject4Doc();
.
.
.
};
But in your .cpp you do not have this function/constructor defined.
Thats the most obvious though unlikely reason. The fact that it worked one day and not another without code change... well ..... something had to have changed. Or maybe your compile yesterday was not a rebuild all and the file dates were kind of screwed up so the compiler did not pick the file in question and so the error did not show up.
|
|
|
|
|
WOW!!!! As unlikely as it mat have been I must have somehow deleted the constructor/destructor. I don't remember doing it but must have somehow. THANKS INCREDIBLY!!!!
Garry
|
|
|
|
|
i use CHtmlView to laod a html page which includes a swing.class object, the page is ok (text etc. are shown) but swing.class (extends JApplet)is not shown.
do u know how to use CHtmlView to display a JApplet.class object?
thx
includeh10
|
|
|
|
|
|
How does one get the processor speed from windows -- without actually testing it myself?
Windows seems to know it, but how can I get the same info?
|
|
|
|
|
From the registry:
HKEY_LOCAL_MACHINE > HARDWARE > DESCRIPTION > CentralProcessor > 0 > ~MHz
If you just want to know, use regedit.exe. If you need an application to read it, use the windows registry access functions.
|
|
|
|
|
Sorry, I forgot that my previous answer is only good on NT/2K/XP.
Check out the CPUTest article here on CodeProject:
http://www.codeproject.com/system/cputest.asp
I believe this should work on 95/98/Me, but only with CPUs that have the RDTSC instruction. Also, the code in this article does actually measure the speed, but it allows the measurement to be done rather quickly.
Win95/98/Me probably also stores the CPU information in the registry. I just don't happen to know where. I suggest doing a search here on CodeProject, on Google, or on CodeGuru.
- Kevin
|
|
|
|
|
|
How do I get the hwnd of the edit control portion of a combobox?
In a dialog I need to know if a certain control has focus.
CComboBox m_cLookup;
if(GetFocus()->GetSafeHwnd() == m_cLookup.GetSafeHwnd()){<br />
}
Doesn't work for a combobox, but works fine for a CEdit, so I'm assuming the hwnd of the edit control portion of the combobox is different from the hwnd of the combobox itself.
Ed
|
|
|
|