|
Chris Losinger wrote: might look a little scary, if you're coming from MatLab...
just very-little bit scary
|
|
|
|
|
Introduction to SSE Programming [here].
Fast SIMD Prototyping [here].
Matrix/Vector Multiplication Optimization [here].
|
|
|
|
|
Hi,
would anyone know if there is any kind of plug-in to the Visual studio debugger which tracks heap storage
Thanks
|
|
|
|
|
Are you looking for memory profiling tools?
If affirmative, you can have a look at Purify Plus etc.
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
I have been using CMemoryState
|
|
|
|
|
I would like to know a way to change the view of a particular pane in a splitter window.
It should be something like an explorer window. Where on click of any tree branch on left side of window right hand side view updates.
Similarily i would like to update my view. On click of any tree node a new pane should be displayed at the same position overriding the previous pane.
sample code would be highly appreciated.
|
|
|
|
|
There are lots of samples of code such as you describe; take a look in the articles section[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
these examples describe how to use a tree control.. what i want is to update the SPLITTER pane with a new view on click of any tree item..
|
|
|
|
|
Rishav Prabhakar wrote: what i want is to update the SPLITTER pane with a new view on click of any tree item.. Then you need to handle the notifications from the TreeView [^] side and take some action, like redrawing the window in the other pane, when the selection changes.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
HI,
Is there any API available to Pan a window, as we can in autocad/pdf file/Pro-e.
If not, how pan a window using C++ code.
Regards,
Maha
modified 17-Aug-12 2:22am.
|
|
|
|
|
What do you mean on panning? Moving? Or scrolling the contents of the displayed stuff?
modified 13-Aug-12 10:36am.
|
|
|
|
|
Yes, just need to move content and not the window.
|
|
|
|
|
There is an article about that right [here].
|
|
|
|
|
I want to pan the client area using left button of mouse. As one that works with PDF file.
And i want to implement this using MFC/WIN32
-Thanks in advance.
|
|
|
|
|
I guess I know what you mean: You press down the pan mouse button while the cursor is over the view and then you pan by moving the mouse cursor until you release the pan mouse button. This panning basically scrolls the visible portion of the stuff you can see in your view. There is no API to do that, you have to implement it by yourself by handling primitive mouse events like mouse button down, mouse move, and mouse button up events. Custom implementation makes sense because its totally dependent on the program which parameters should be modified by the panning operation.
In a 2D pdf viewer the program stores some position data about which part of the pdf should be drawn to the view. This position is changed when you are panning. In a 3D CAD program there is a 3d world in which you can find an active camera as well with a position and rotation parameter (and also with horizontal and vertical fov). This camera is used by the rednerer to decide which part of the world should be rendered, the camera is like an eye and you see in the view what this eye looks at in the 3d world. This camera has an up and right direction that defines a plane. When you pan with your mouse you basically calculate a 2D offset from the mouse movement and you add this 2D offset to the camera position on the plane that is defined by the up and right vectors of the camera rotation (maybe not right but left if you are using left handed coordinate system...). Even if you are not good at 3D, the answer to your question is: Those pan functions are implemented by those programs, its custom code in them and not some operating system provided api function calls.
How to implement panning: When panning starts (mouse button down) you store the actual pan-start position of the mouse cursor, and also the position value (the 3d cam pos, or the 2d pos in the pdf file) in your program to some variables that wont change during panning. When a mouse move event comes you always calculate the delta between the pan-start mouse pos and the current moved mouse cursor pos, and you use this 2D offset to calculate the pan offset in your world (you can leave it as it is, or any simple transform can do the job, for example multiplying it with something to set panning speed...). When you have your pan offset you add the resulting pan-offset to the stored pan-start position and set the result as the current position.
The panning operation is a kind of dragging operation so you should consider implementing it with correct mouse capturing: Using SetCapture() and ReleaseCapture() correctly (usually during a drag n' drop operation).[^]
Omitting mouse capture is not the end of the world, but try to be always perfect when possible!
|
|
|
|
|
Hello!!
Thank you very much for all your reply.
Mr pasztorpisti - Thank you much for detailed explanation. I will try to implement this and let you know about the same.
-Maha
|
|
|
|
|
|
HI Pasztorpisti,
What the code you have give is to move the window, but what i need to move the client area.
I know if there is a api to capture the client area and move it.
Regards,
Maha
|
|
|
|
|
You have to do exactly the same. You handle the mouse events, and depending on the offset of the mouse move you change an internal variable in your program. In my example program the internal variable to change was the position of the window, but it could be anything else, for example the offset in your picture or pdf file for drawing on the client area of your window. All you have to do is using/changing something else, not the window position, for example the position where you draw your picture on the client area.
|
|
|
|
|
In your program you have used SetWindowPos() to change the position of window.
But to move the client area, which API should i use.
Say,
Mouse button down
1) capture initial position of mouse using GetCursorPos()
Mouse move.
2) Calculate the difference of x and y coordinates using previous cursor position and current cursor position
Mouse button UP
3)After calculating the latest value as said about, which api should be used to move the client coordinates. (in your program you have used SetWindowPos())
-Maha
|
|
|
|
|
What do you mean on moving the client area? You can't move it. All you can do is drawing something on it and changing some of the parameters of the drawing when you are panning. Alternatively you could change the positions of some child controls on the window but that has not much usefulness.
|
|
|
|
|
I cant achieve this still, can any one of you give me a sample code. To pan the client area of a window.
Thanks in advance.
|
|
|
|
|
Hi,
I am working on an application where I have to change the text in a text box while user enters from the keyboard. I have an edit box on a dialog in MFC. I want when user enters any character in the edit box, a text box should be created on the dialog and the typed character should also be displayed in the text box. As user types the characters, at the same time it should be displayed in the text box. And how to make that text box movable after user has entered the text.
Can anybody have an idea about this.?
Thanx & Regards,
|
|
|
|
|
You need to capture the EN_CHANGE [^] notification, and copy the text from the edit box to the text box. I'm not sure about moving the text box, something along the lines of capturing the mouse (using WM_LBUTTONDOWN [^]) and then using MoveWindow() as the mouse moves.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
hi,
I need to generate some reports using Crystal Report in my VC++ application by this week
I am using VC++, Visual Studio 2008 for my development. And I could not find any Crystal Report template for me to add into my VC++ project.
I am new to Crystal Report development, and I have checked through the articles and forum here. Most of the Crystal Report were developed using C#.
Would greatly appreciate if any of you could offer some advice or sample VC++ codes for me to kickstart the development. Your help is much appreciated!
Thanks!
|
|
|
|