|
Thank you for reply. That is a tempting solution, as it seems that MS Office is the only app that I personally use as an MDI in this way. However, for the sake of other users and unforseen uses of my software, it really should work correctly with any application (MDI or otherwise) that happens to be running. The project I'm building will monitor the time the user (currently me) spends on different projects. It will be similar to TimeTracker, but with a different UI and different set of features. The problem is frustrating because I can get the title of all child windows, but I know of no way to tell which one is the active one. This should be easy, right? Let me rephrase my question.
If I have a handle to all of the child windows in an arbitrary MDI application, how can I tell which one is active?
At the very least, this should work for Excel, Word, Acrobat, and preferably other MDIs like OpenOffice and Opera.
Sorry I didn't make this clear enough. I was trying to keep it brief, but I'm never sure what information to include and what to leave out.
Thanks!
|
|
|
|
|
Have you tried GetTopWindow() or GetForegroundWindow() ?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
For all good reasons, you must go with automation, as David already stated.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Hi,
I have a CListCtrl set to LVS_EX_FULLROWSELECT style.
Using the mouse to create a multiple selection in a list control only seems to work when you select from the empty space in the first column.
Is there an easy way to allow multiple selection from anywhere inside the list control?
|
|
|
|
|
AORD wrote: Using the mouse to create a multiple selection in a list control only seems to work when you select from the empty space in the first column.
It seems you are using Report view, but normally multiple(or single) selection is possible on any item except the empty space. Please explain?
|
|
|
|
|
|
I just run the demoproject with not even building it, it runs fine in my system, I can multiselect clicking on any item in any column, only the empty space next to time column is not possible.
AORD wrote: There must be an easy way allow a mouse drag selection from anywhere in the other populated columns?
Drag and Drop between and within a CListCtrl[^]
|
|
|
|
|
Running the DragTest.exe (not building) I can only multi select with the mouse on the blank areas, this includes the blank area in the word column, BUT not the blank area in the index column.
If you can and I can't multi select with the mouse on all of the populated columns it must be the windows file that contains the ClistCtrl?
What version of windows are you running? I'm using XP.
___________________________
Here come the machines!
|
|
|
|
|
I tested in vista, now in XP also, i can select at both the columns but not on the blank area right after index column and below the populated items. check on others machines I never faced this issue.
|
|
|
|
|
Running the DragTest.exe on my XP work tablet the same problem occurs.
I'm not sure we are talking about the same thing.
I'm only multiple selecting using the mouse left button.
I don't care about dragging at all, I just want to create a blue highlighted selection of rows.
With the DragTest.exe the Index colum only is dragable I cannot create a multiple selection of rows unless i do the following steps:
a) left click and hold the mouse button on the first columns blank area or anywhere after the last row or column.
b) then I move the mouse to highlight the rows I want. This creates a rectangle (of dashed lines)that covers the first highlighted row from the start position of the mouse to the final position of the mouse.
c) I release the mouse then the dashed rectangle disappears and a whole lot of rows remain highlighted in blue.
The problem is when I have a big list say 20,000 rows and 30 columns the user can't always use the mouse to select a whole lot of rows.
___________________________
Here come the machines!
|
|
|
|
|
hi am trying to write c++ code for impoting an mpegs file as the input , also write a code to switch of a system for few seconds
|
|
|
|
|
kamarlonaire wrote: impoting an mpegs file as the input
...
switch of a system for few seconds
Can you please explain what these mean?
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello guys,
how can I use the switch statement with a string, a vector or char[]?
Or is there an alternative to this?
Thanks and best wishes.
|
|
|
|
|
Austrian_Programmer wrote: how can I use the switch statement with a string, a vector or char[]?
string str = "abc123";
switch(str[0])
{
case 'a':
break;
}
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Austrian_Programmer wrote: Or is there an alternative to this?
The gold old if .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
There are a lot of different cases, so an if statement won't be such a good choice. Futhermore i want to switch the whole string not just the first letter.
In the worst case I've to use a map, combining the strings with integers.
|
|
|
|
|
You probably need a hash table.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
switch only works with integral types.
|
|
|
|
|
|
How to set bitmap image as Background of RichEdit on WIN32 API?
I can`t fiend any real working methods.
|
|
|
|
|
I found this guide, and I tried to use Method #2 :
http://support.microsoft.com/default.aspx?kbid=194873[^]
However, as you can guess, building the VC++ project failed:
Error 1 fatal error C1083: Cannot open type library file: 'd:\data\visual studio 2005\projects\smbus64\smbus64\bin\x64\release\smbus64.dll': Error loading type library/DLL. d:\data\Visual Studio 2005\Projects\SMBus64\VC_DLLtest\VC_DLLtest.cpp 5
Line 5 of my Cpp is:
#import "D:\data\Visual Studio 2005\Projects\SMBus64\SMBus64\bin\x64\Release\SMBus64.dll" no_namespace
Does anyone know of a similar guide that works with Visual Studio 2005 ?
|
|
|
|
|
The linked article has nothing to do with a VB.NET DLL .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
indeed, hence I am looking for a guide like it that works with VS2005
spent 4 hours searching the interwebs... and counting...
|
|
|
|
|