|
Yes, I could display that free software alternatives exist, but (A) I didn't feel like searching for it, and (B) my link was put inside < shameless plug > tags. Plus, most free software doesn't come with support, a lot of it can't be used for commercial work, etc.
Chris Richardson
|
|
|
|
|
The derived class has a deleteAllItems, so does the parent class (CListCtrl). I want to invoke the base function directly with a control variable of the derived class. Instead of
m_list1.DeleteAllItems() which is the derived class definition,
I want to call the listctrls base function: Is it possible to do that?
Appreciate your help,
ns
|
|
|
|
|
You could Cast into a base-Object:
CListCtrl* pListC = &MyDerivedListCtrl;
pListC->DeleteAllItems();
|
|
|
|
|
Thanks!
Appreciate your help,
ns
|
|
|
|
|
That would not work, if DeleteAllItems() is a virtual function. The syntax for explicitly calling a base member function is:
MyDerivedListControl.CListCtrl::DeleteAllItems();
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
hi all
how can we load a bitmap image in to a button control ,
which can change the background with the color of dialog/button control (changing the schemes through properties>>appearance tag)..
any idea..??
Regards
Renjith
A Programmer Never Dies...
|
|
|
|
|
no answer..??????????????????
A Programmer Never Dies...
|
|
|
|
|
no solution here.........?????????
ALAS...!!!!
Program The Life.
|
|
|
|
|
Hi,
I am almost an expert on system programming, so I hope this GUI related question is easy to one of you:
I have an app that installs an icon in the system tray. If the user clicks on the icon a dialog appears. Now the user may switch to some other app, so the dialog maybe active (has the focus) and in the foreground or somewhere in the background.
If the user now clicks again the tray icon, I want to do the following:
- If the dialog is not active, I want to activate it and bring it to front.
- If the dialog is active, I want to dismiss it.
My problem is to determine inside the tray notification handler if the dialog has been active or not. I already tried the following:
GetForegroundWindow() returns the handle of the system tray window. (Well, this makes sense, it is the active window during the execution of the notification handler...)GetFocus() always returns NULLGetActiveWindow() also returns NULL- Same for
GetLastActivePopup() It seems that if you click on a tray icon, the system calls the notification handler and afterwards silently reactivates the window that was active before. That's the reason why GetForegroundWindow() always returns the system tray window, but the "visibly active window" seems not to loose its focus. However, I need to know which window was active <it>before the icon was clicked.
Any ideas
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Trace the state in the dialog. In its WM_xxxFOCUS you will be notified which window actually receives the focus if it is not the tray some other app is activated.
This still leaves you with the problem when the user clicks on another trayicon first and then on your applications icon. Or clicks on the explorer bar and then on the app icon. Or does it by keyboard.
However, you should find a better design for your dialog solution.
...if you're under 8 or younger. Chris Maunder, the Lounge
|
|
|
|
|
Thanks Andreas,
However, you should find a better design for your dialog solution.
I thought a lot about it, but I don't think that a really nice design for this problem even exists. The dialog is deactivated if somebody clicks the icon and there is no chance to examine if it was activated before.
I now found a solution which is similar to what you suggested. I catch WM_ACTIVATE in the dialog and remember the current system time if the dialog is deactivated. In the tray icons handler I check the dialog was deactivated immediately before the handler was executed (less than 200 ms). If this is the case, it was deactivated because of clicking on the icon.
Not the cleanest design, but works fairly well - even on high system load.
Thanks!
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Hi,
I am currently trying to retieve the path to a CDwriter, I have the targetId of the scsi device and require the drive path. I have a solution for NT,2000 which uses the CreateFile function to obtain a handle to the disk device and then use this handle with DeviceIoControl function and a drive path to return a targetID thus correlating TargetIds to drivepaths.
Unfortunately this method does not work on 98 as the CreateFile function will is not supported for retrieving a handle to a disk volume on 98.
Does anybody know of a method to get a handle to the disk device on 98 or a completely different method which would produce a drive path from a targetId or TargetId from DrivePath.
Chris H
|
|
|
|
|
Chrish120 wrote:
Does anybody know of a method to get a handle to the disk device on 98 or a completely different method which would produce a drive path from a targetId or TargetId from DrivePath.
AFAIK you have to do it the ASPI way on Win9x. Sorry.
Btw, you do know you can do it "the other way around" even on NT-based OS'es? Grab the drive-letter and then use QueryDosDevices to find the device. Such code worked like a charm for me in the past for CDRecord (speaking of which, you might want to have a look at it since it already is a working CD recording solution).
++luck;
|
|
|
|
|
To anybody interested I found a solution on Windows 98 via the registry
reading currentdiveletterassignment key under the HKLM\Enum\Scsi\,
so coupling thhis with the CreateFile solution allowed me to match all to TargetIds to drive Paths on each of the windows OS.
Thanks for the help....
Chris
|
|
|
|
|
Hi All,
I Need to run a exe in my application which lies in the path other than the current application.To run such an application I need to specify the whole path of the exe which I wish to run.If the file exists in the location which has a space in the folder name such as "Program Files" then the exe won't run.For this if I can get the MSDOS name of the file I can run the exe.
Can anybody guide me how can I get the MSDOS name.
Thanks
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
I suppose with "MSDOS name" you mean FAT 8.3 notation, right?
You can get it by calling the GetShortPathName() API.
However, it is a not so good idea to solve your problem this way! Not every filesystem has necessary a 8.3 alternate notation. For NTFS volumes it is just a flag if they store alternate 8.3 names or not. Some network file systems may also not support this old crappy MS-DOS trash.
If your path contains spaces, just enclose it in quotation marks and everything should work fine.
Come on, boys, it's really the time to forget about this legacy 8.3 bullshit
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
I have successfully managed to split a window into two panes or views, but i'm lost as to how I can get a pane split in half again...?
I'm aware of the CSplitterWnd classes available here @ CP, but i'm interested in seeing how it's done and learning exactly whats going on....
Someone care to show me how I would get the following:
----------------
|1| 3 |
|-| |
|2| |
| | |
| | |
----------------
I know hwo to get 1 and 3, but NOT 2
heres my code so far:
m_wndSplitBar.CreateStatic(this, 1, 2);
m_wndSplitBar.CreateView(0, 0, RUNTIME_CLASS(CTaskView), CSize(100, 100), NULL);
m_wndSplitBar.CreateView(0, 1, RUNTIME_CLASS(CPlanView), CSize(100, 100), NULL);
m_wndSplitBar.SetColumnInfo(0, 146, 146);
How would I make the triple split like above from this...?
Thanx!
p.s-I'm trying to get one splitter to lock and the other to draw flat and those wrapper classes don't help much...
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Anybody knows the IncrediBuild software for reduce compilation time ?? It's really good ??
[]'s
Cris.
|
|
|
|
|
Yes,
we are testing it - it really does help if you have many PC's idle on the network
Victor Rubinstein
|
|
|
|
|
I want to hide vertical scroll bar in CListCtrl derived class
I tried this code in PreCreateWindow:
DWORD dwStyle = cs.style;
if(dwStyle & WS_VSCROLL)
{
dwStyle &= ~WS_VSCROLL;
cs.style = dwStyle;
}
and this in OnSize:
DWORD dwStyle = ::GetWindowLong(GetSafeHwnd(), GWL_STYLE);
if(dwStyle & WS_VSCROLL)
{
::SetWindowLong(GetSafeHwnd(), GWL_STYLE, dwStyle & (~WS_VSCROLL));
}
but it doesnt work, I still have scrollbar
any suggestions?
thankx in advance
nobody is perfect
|
|
|
|
|
dwStyle &= LVS_NOSCROLL;
Signature space for rent. Apply by email to....
|
|
|
|
|
I need to hide only vertical scrollbar, horizontal should stay as is
nobody is perfect
|
|
|
|
|
Hello,
I have the same problem in horizontal scroll, i am trying to make it disappear.
i tried also in the OnSize same as you and it didn't work....
i would like to know if u solved the problem, if u did can u tell me how please?
thanks in advanced
Yaron
Ask not what the application can do for you, ask what you can do for your application
|
|
|
|
|
I want to insert pictures into the talbe of a .mdb(Access 2000)
database created by DAO classes(CDaoDatabase,
CDaoRecordSet, CDaoTableDef). I find CLongBinary useful but
i don't know how to use it at all. Could anyone elaberate on
the complete process of inserting pictures? Thanks a lot!
|
|
|
|
|
Hello world.
I simply want to get a double variable from an ini file...
Currently I get an integer by using:
GetPrivateProfileInt("MY SECTION", "MY KEY", default_value, Ini_file_name)
How to get a double variable?
GetPrivateProfileDouble(...) doesn't exist!
Thanks in advance
Hello World!!!
from Raphaël
|
|
|
|