Get bounding rectangle for treeitem including icon - vb6

I have a requirement of getting bounding rectangle for a treeitem in a treeview. The treeview control used is a VB6 treeview (TreeView20WndClass).
I came across TVM_GETITEMRECT. But, it says that if wParam is true, it will get rectangle only for the text part and if it is false, it will get rectangle for the entire line that the item occupies in the tree-view control.
But, I want to get the rectangle the region including both text part and icon. I am unable to find a way for this.
Or is it possible to get the rectangle for the icon?
Any help is highly appreciated.
Regards,
kvk938

Related

UWP - Custom non-rectangular hit area on button. Either image or shape

I would like to define a non-rectangular clickable "hit area" for a button. I am happy to define this custom shape using a UWP XAML path, or by using a PNG with transparent areas.
The following question explains how to use an XAML path for a button's appearance, but the result still seems to use a rectangular bounding box hit area. XAML UWP Button with a polygonal shape
There are also posts explaining how to override the Image class, intercepting the 'click' event, and determining the opacity of the pixels under the mouse cursor. This would solve my problem, but this solution only applies to WPF.
Does anyone know of a solution for UWP?
It looks like I can just use the raw < path > element, and use its pointer events directly.

d3 trigger mouse click on specific coordinates

I have an issue on triggering mouse event on a svg.
I am using the library d3.js to handle some graphic tasks. Specifically, when I manually click on a position on the svg, d3 draws a red or blue (depending on the path I am clicking on) circle on it and then returns the d3.mouse coordinates of the click.
Now, suppose I have a set of coordinates and want to trigger programmatically click on the corresponding point on the svg, so that it draws a red or blue circle automatically. How can I achieve that?
I read many solutions here but none allows to click on specific coordinates (while I can easily click on a specific path, for example).
My ideal function would be:
var svgd3 = d3.select('svg#id_svg')
function d3click(x,y,svgd3){
//does the click on [x,y, x,y are relative coord. depending only svg viewBox
...
}
Any idea?
Thanks a lot!

wxToolBar changing device coordinates

Using the mouse I am drawing 2D shapes on the client area of a MDIChildFrame. Recently I have added a wxToolBar to the frame and when I now draw a shape on the client area it seems that the points have shifted by the size the toolbar. Imagine that with mouse I am clicking on (100,100) and drawing a line to (150,150); however, the line appears somewhere (75,75) to (125,125). By the way, wxMouseEvent GetPosition(); reports (100,100) to me.
Removing the toolbar fixes the problem however, I want to keep the toolbar for ease of tool selection.
I use the code:
m_ToolBar=new wxToolBar(this, wxID_ANY);
m_ToolBar->AddTool() //
m_ToolBar->Realize();
this->SetToolBar(m_ToolBar);
Any ideas will be appreciated.
You can always use wxWindow::GetClientAreaOrigin() to manually offset the coordinates by the toolbar height but normally this shouldn't be necessary, and if this doesn't happen with a "normal" frame but only happens with wxMDIChildFrame it would be a bug in wxWidgets that should be reported as usual.
It's also recommended to not draw over wxFrame itself but rather put a wxWindow into it and draw on it. This should also take care of your problem.

Table, rectangle placed on top of an image is not coming properly in preview mode in SSRS

I wanted to draw a rectangle with rounded corners in SSRS. But, after lot of research i got to know that currently there is no property for that. So, i am trying to use an image of a rectangle with rounded corners and on top of that trying to align the table and other controls within the image. But, when i am previewing it or exporting it to a PDF file, first the image is getting displayed, then below that all other controls comes. Am i doing anything wrong. Please let me know.
Why don't you try to enclose your image rectangle and other controls etc. within an SSRS Rectangle with BorderStyle = None...
Try following:
Create an image (the rectangle with rounded corners) in your favourite image drawing program. I did mine in Microsoft Paint
and save it as JPEG.
In SSRS report design, in Report Data pane, right click on Images >> Add Image and point to the image that you created in Step 1. (Untitled, in my case see the fig. below)
In SSRS report design, add a Rectangle from the Toolbox to the design surface and in the Properties Pane:
a) look for the BackgroundImage property Click its + sign. then
b) Enter values for Source as Embedded, BackgroundRepeat as Clip and the Value property , when you click the dropdown for its values, should show you the name of the image that you embedded in Step-2, select this name
Resize your rectangle to fit the shape and add your items to this rectangle.
EDIT:
Regarding the question in the Comment, I don't think that the size of the image rectangle can be increased dynamically. If that's the case then you may need to find some other work-around
HTH

BlackBerry layout: HorizontalFieldMahager with 3 items (Including an EditField)

I'm having a hard time working with the BlackBerry UI API.
What I want to do is creating a "list item" based on a HorizontalFieldManager that consists of the following childFields:
An optional BitmapField (Horizontal-Left, Vertical-Center)
A LabelField (Horizontal-left, Vertical-Center)
A rounded rectangle that contains an single line EditField. The rounded rectangle has a fixed width and height, so the EditField should scroll horizontally inside the rounded rectangle when the text becomes wider than the rounded-rectangle's width.
I've added a image illustrating the desired situation below:
Can someone help me with this?
Thanks in advance!

Resources