-
October 1st, 2008, 07:15 AM
#1
Resizing Dialog Box..
Hello All...
I've one dialog box. And i need to display my dialog box on bottom right of task-bar.. It must be just above task-bar.. In a single machine one can achieve this by calculating coordinates... But if someone drag the task-bar how can i know that task-bar position has changed and i need to change my dialog box position???
Thanks..
-
October 1st, 2008, 07:41 AM
#2
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.
-
October 1st, 2008, 07:42 AM
#3
Re: Resizing Dialog Box..
Try SystemParametersInfo and SPI_GETWORKAREA.
-
October 1st, 2008, 08:51 AM
#4
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?
-
October 1st, 2008, 09:28 AM
#5
Re: Resizing Dialog Box..
That's much more difficult. I don't immediately have an idea for that problem...
-
October 1st, 2008, 01:57 PM
#6
Re: Resizing Dialog Box..
Perhaps this would be of interest to you ?
Customizable Alert Window
-
October 1st, 2008, 05:28 PM
#7
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.
-
October 2nd, 2008, 01:30 AM
#8
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.
-
October 3rd, 2008, 07:27 AM
#9
Re: Resizing Dialog Box..
Marc did you got any idea how to overcome this tool-tip problem..
-
October 3rd, 2008, 07:41 AM
#10
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 ...
-
October 3rd, 2008, 07:50 AM
#11
Re: Resizing Dialog Box..
Alright Marc...
I'll try now and get back to you with results..
Thanks.
-
October 3rd, 2008, 08:04 AM
#12
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??
-
October 3rd, 2008, 08:08 AM
#13
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.
-
October 3rd, 2008, 08:59 AM
#14
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..
-
October 3rd, 2008, 09:22 AM
#15
Re: Resizing Dialog Box..
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.
Best regards,
Igor
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|