|
Hi
How can we retrieve the listcontrol entries are selected are not
#sanroop#
|
|
|
|
|
Hi,
GetItemState(
int nItem,
UINT nMask
);
-----------
Mila
|
|
|
|
|
Hi,
The easiest way is to use GetNextItem :
INT nItemIndex = GetNextItem(
-1,
LVNI_ALL | LVNI_SELECTED
);
Regards
|
|
|
|
|
Hi, I am making one application in VC++.NT using WIN32 APIs. Is there any way to find which edit box has a keyboard focus right now using WIN32 APIs? I need handle of the edit box when some one type in that edit box. Thanks in advance. Priyank.
|
|
|
|
|
priyank_ldce wrote: Is there any way to find which edit box has a keyboard focus right now using WIN32 APIs?
GetFocus(); to get the window that has focus, then use GetClassName or IsKindOf to find out whether the window is a CEdit .
|
|
|
|
|
thanks for your reply. But I can use GetFocus(); only if that edit control is in the same application. but I want to get handle of edit control that is in another application. Is it possible?
|
|
|
|
|
priyank_ldce wrote: only if that edit control is in the same application. but I want to get handle of edit control that is in another application. Is it possible?
GetFocus returns the window with the keyboard focus for the current thread's message queue. If GetFocus returns NULL , another thread's queue may be attached to a window that has the keyboard focus.
Use the GetForegroundWindow function to retrieve the handle to the window with which the user is currently working. You can associate your thread's message queue with the windows owned by another thread by using the AttachThreadInput function.
|
|
|
|
|
priyank_ldce wrote: I want to get handle of edit control that is in another application. Is it possible?
Your code can reside within a DLL (Global hook) in this case.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Anyone please assist on the available algorithms that can train neural networks t predict budgets.
Regards.
|
|
|
|
|
Hello, Nice to meet you.
I'd like to know how to check the state of the tray with program.
When we push the button of CD drive, its tray operates like a toggle switch.
If now it was open, then it will be closed.
And it was close, then it will be opened.
Please help me~~~
mailto:theanssi@naver.com
Studying English...
|
|
|
|
|
Hi,
IIRC it could be done with use of DeviceIoControl with IOCTL_STORAGE_CHECK_VERIFY and IOCTL_STORAGE_EJECT_MEDIA functions.
Anyway, you should find some information about it in DeviceIoControl function reference and its related articles.
Regards
|
|
|
|
|
anssi wrote: If now it was open, then it will be closed.
And it was close, then it will be opened.
Try mciSendCommand . I remember doing it sometime back, don't remember exactly how I did it.
anssi wrote: mailto:theanssi@naver.com
You are inviting spam by putting your mail ID like this.
|
|
|
|
|
Thanks for giving a reply, but I already know MCI command.
What I want is how to detect the state of which the tray is open or close whether there is a CD in the tray.
I also tried the method using MCI command, but the method was restricted because could check the state only there is a CD in the tray.
Please help me in detail as possible~~~
Studying English and Programming...
|
|
|
|
|
Hi
In MSDN:
MapUserPhysicalPages:
The MapUserPhysicalPages function maps previously allocated physical memory pages at a specified address in an Address Windowing Extensions (AWE) region
AllocateUserPhysicalPages:
The AllocateUserPhysicalPages function allocates physical memory pages to be mapped and unmapped within any Address Windowing Extensions (AWE) region of a specified process.
So sorry for this question but i really don't know what is the difference between "allocating" and "mapping" memory.
Until now i supposed that they have same meaning but i think this is not true.
Can you please tell me what do these word indicate in win32 jargon?
|
|
|
|
|
sawerr wrote: So sorry for this question but i really don't know what is the difference between "allocating" and "mapping" memory
To "map", "something" should already present. That can be done by "allocation".
|
|
|
|
|
Thanks but still i don't understand it.
Please a little more detail.
|
|
|
|
|
Does mapping mean:
Translate (from realtive to physical or physical to relative)?
Matching?
or directing?
Which one? or none of them?
|
|
|
|
|
|
Well, in general terms mapping memory pages means that you assign them memory. This is usually done by the operating system, since different processes have independent address spaces wich reside in the same physical memory. So memory of two different processes can be mapped to the same physical memory (of course that requires some complex administration eg. swapping pages etc.). So if you allocate memory it means, that your process declares to the OS that it wants some memory. Some free memory within your process adress space is then mapped to some free physical memory by the OS. The OS guarantees that you can use that memory as if you owned it exclusively, wich is not necessarily the case. Now you can map that memory again to some Address Windowing Extension, wich means you tell the extension "here's some memory you can use", but you are still the owner of that memory.
Long story short - allocate means to tell the OS you need memory - mapping means to map (e.g. virtual addresses of your process's address space) adresses to other (e.g. physical addresses of your machine) addresses. I have no clue whatsoever on AWE, but i think the idea should be the same. This may not be what you wanted, and it may not be complete, but i think it describes the idea.
Hope that helps a little.
|
|
|
|
|
Thank you Mr.Brainley.
Thanks for help...
Good works...
|
|
|
|
|
Hi
I want my application in VC++ should display unicode characters in menu,messages and captions so for this i want to make setting for unicode during OS installations.
abbmmm
|
|
|
|
|
M. Atul wrote: so for this i want to make setting for unicode during OS installations.
During OS installation ??
I really don't understand what you are trying to do, but if you want to enable Unicode support in your application, there a preprocessor flag you can define in the project settings (sorry, I'm not an expert at all in unicode but other people might be of help here).
So, can you describe your problem more in detail ?
|
|
|
|
|
I want my VC++ application Unicode enable. i.e. I want to diplay menu ,messages,captions in Indian languages.For this someone send me reply from code project that first i want to install OS which is unicode enable so for this i want to make setting during OS installation.So please guide me Mr.Cedric Moonen.send ur yahoo email id.
Thanks and Regards
M.Atul
Atul
|
|
|
|
|
Atul, Have you checked article, posted in reply to you last post.
Dont be so impatient.
|
|
|
|
|
Click here[^] and read the article. It explains what you need to do. Don't create threads every now and then asking the same stupid stuff
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|