Re: Resizing Dialog Box..
May be i ask in another way... How can i get coordinates of taskbar.. If i get those i'll able to calculate my dialog box position according to taskbar's coordinates.. And then i can show my dialog just above taskbar.
Re: Resizing Dialog Box..
Try SystemParametersInfo and SPI_GETWORKAREA.
Re: Resizing Dialog Box..
Thanks Marc..
SystemParametersInfo works...
Well i've another problem..Sort of... Say if some tool tip occurs from taskbar and then my popup dialog comes just above taskbar then it'll overshadow that previous tool tip.. Which is i believe wrong... It should then come above that tool tip.. Is there any way to handle this kind of problem?
Re: Resizing Dialog Box..
That's much more difficult. I don't immediately have an idea for that problem...
Re: Resizing Dialog Box..
Perhaps this would be of interest to you ?
Customizable Alert Window
Re: Resizing Dialog Box..
i'm just starting with C+ and just wanted to add that i've been finding this forum very helpful with the different problems i've been facing.
Marc G ... thanks for the SystemParametersInfo link. It's appreciated.
Re: Resizing Dialog Box..
Thanks Kirants for the link... but i believe i forgot to tell you guys that i'm working on Non MFC...
But i'll see what i can extract from the link you provided..
Thanks.
Re: Resizing Dialog Box..
Marc did you got any idea how to overcome this tool-tip problem..
Re: Resizing Dialog Box..
Well ... you could try to use spy++ to find out if those balloons have any special class name or something. Then when you would like to show your box, you could search for windows with that balloon classname and use that to offset the position of your box... but that's just a wild idea ...
Re: Resizing Dialog Box..
Alright Marc...
I'll try now and get back to you with results..
Thanks.
Re: Resizing Dialog Box..
Right... Here what i found using spy++. It's "tooltips_class32". Is this the toop tip class??
Well then i did this.
Code:
HWND hTool = ::FindWindow("tooltips_class32",NULL);
GetWindowRect(hTool,&ToolTipWindow);
Hoping to get the coordinates of tool-tip.. I got some coordinates. But the prob is that it also shows the coordinates when there's no tool tip..
Am i missing something??
Re: Resizing Dialog Box..
Unfortunately, tooltips_class32 is the generic name used by almost all tooltips in windows. However, maybe we can still use it. But, you'll need to loop over all windows with that class name, check the coordinates and use all of them to position your dialog.
Use IsWindowVisible to check if a certain tooltip is currently being displayed ot not.
Re: Resizing Dialog Box..
Alright marc...
IsWindowVisible did the trick.. Manage to display my window above the tool tip..But now there is pne obvious problem..If tool tip occur anyway on the window my dialog pop's up just above the tool - tip.. No matter where it is :)
So is there any way to know that tool tip generates from taskbar only..
Thanks..
Re: Resizing Dialog Box..
Quote:
Originally Posted by techie.ashish
Well i've another problem..Sort of... Say if some tool tip occurs from taskbar and then my popup dialog comes just above taskbar then it'll overshadow that previous tool tip.. Which is i believe wrong... It should then come above that tool tip.. Is there any way to handle this kind of problem?
I ran once into the problem with my dialog window overlaying tray tooltips, in XP/2003. In fact, sometimes those tooltips never got topmost while popping up. The reason of the behavior remained undiscovered.
And I came to nothing more reliable than making my window semitransparent. :)