|
Newmat10 is a very powerful and neat library for matrix manipulation containing many useful functions. It might be helpful to you. Go to internet download it and try it!
|
|
|
|
|
I found the phrase in visual c++ 6.0 tips.But I don't know the meaning.
|
|
|
|
|
From documentation [^]:
The display area of a tab control is the area in which an application displays the current page. Typically, an application creates a child window or dialog box, setting the window size and position to fit the display area. Given the window rectangle for a tab control, you can calculate the bounding rectangle of the display area by using the TCM_ADJUSTRECT message.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This seems quite credible.
|
|
|
|
|
jianzhuhuai wrote: I found the phrase in visual c++ 6.0 tips.
How is it used?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I want to write a contact into outlook with the hlp of MAPI can any body help me with a sample or any procedure . right now iam using Test Mapi but iam unable to understand it. thanks in advance....
|
|
|
|
|
See here[^]
The article is about Outlook 2007.
And here[^] is an article (includes adding contacts) for automating Microsoft Outlook 2000, 2002, 2003 and older versions.
I hope this helps.
Nuri Ismail
modified on Friday, October 23, 2009 4:25 AM
|
|
|
|
|
|
while rotating rectangle in c by draging mouse how can i calculate the angle ......
actually I want to rotate rectangle dynamically on mouse event like open office.
|
|
|
|
|
Your question is short, but the answer heavily depends on how much math knowledge you have.
Possibly the biggest tip I can give anyone who ever wants to deal with graphics is to go back you your end-of-school (ie A-level) math books, and learn about matrices (matrix-es) and vectors. It's fine if you don't know it now. If you are unwilling or unable to do this, quit now and start learning how to say "would you like fries with that?".
That said, the following will help, I think:
Angle between vectors[^]
For a more complex dragging about of shapes, have a look at the following, superbly written and illustrated, article:
Warping Coordinates with Matrices[^] by me!
If you don't already know about it, I'd advise you learn about SetROP2(R2_NOT) for your mouse handling code, to draw / undraw tracking lines.
I hope that helps steer you in the right direction. A more exact answer would depend on the details of your application and skill level.
Good luck,
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
to add to warrior panda's reply :p, you can try [this] to understand vectors. Once you know that, you should not have any problem calculating angles or rotating a rectangle. you just need to specify the rotate center and angle of rotation and then rotate each of the 4 vectors obtained by joining rotate center and 4 corners. easy, huh?
|
|
|
|
|
theCPkid wrote: to add to warrior panda's reply
Hey, don't insult him, he is a viking, not a panda. Carefull or you'll end up with an axe in your head...
|
|
|
|
|
Cedric Moonen wrote: Hey, don't insult him, he is a viking, not a panda
Yes, but he looks like a Valkyrie...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
1. get the coordinates of the two points on the 'top' edge. (this assumes one of them is the anchor point of the rotation)
2. find the change in x and change in y (dx and dy)
3. use atan(dy/dx) (or atan2(dy/dx)) to find the angle in radians of the line that connects them
watch out for div by 0
|
|
|
|
|
After adding the below line,
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Excel::Window), (void**)
getting compiler error: "fatal error LNK1120: 1 unresolved externals"
Complete code is given below.
#include "stdafx.h"
#include "stdio.h"
#include "windows.h"
#include "tchar.h"
#include "psapi.h"
#include "oleacc.h"
#include "iostream"
#include "string"
#include "sstream"
using namespace std;
#import "libid:00020813-0000-0000-C000-000000000046" auto_search no_dual_interfaces \
rename("DialogBox", "excelDialogBox") \
rename("RGB", "excelRGB") \
rename("DocumentProperties", "excelDocumentProperties") \
rename("SearchPath", "excelSearchPath") \
rename("CopyFile", "excelCopyFile") \
rename("ReplaceText", "excelReplaceText")
int _tmain(int argc, _TCHAR* argv[])
{
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
return 1;
cProcesses = cbNeeded / sizeof(DWORD);
for ( i = 0; i < cProcesses; i++ )
{
if( aProcesses[i] != 0 )
{
TCHAR szProcessName[MAX_PATH] = _T("<unknown>");
HWND hwnd;
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, aProcesses[i] );
if (NULL != hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod), &cbNeeded) )
{
GetModuleBaseName( hProcess, hMod, szProcessName, sizeof(szProcessName)/sizeof(TCHAR) );
if(_wcsicmp(szProcessName,L"EXCEL.EXE") == 0)
Excel::Window* pWindow = NULL;
HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Excel::Window), (void**)&pWindow);
}
}
}
CloseHandle( hProcess );
}
}
return 0;
}
modified on Friday, October 23, 2009 6:35 AM
|
|
|
|
|
Try putting this line at top of file.
#pragma comment(lib, "Oleacc.lib")
|
|
|
|
|
Did you link your project with Oleacc library, because AccessibleObjectFromWindow()[^] needs this library.
North 2009 wrote: HRESULT hr = AccessibleObjectFromWindow(hwnd, OBJID_NATIVEOM, __uuidof(Excel::Window), (void**)
Also this line contains syntactic errors.
Nuri Ismail
|
|
|
|
|
|
In the above code, I'm getting HRESULT hr ="E_FAIL".
main objective is to get value in pWindow. I might have missed some link.
Any suggestions? Thanks in advance.
|
|
|
|
|
You never set hwnd to a valid window handle.
In general, if you get an error return, you can use GetLastError() to find out why.
|
|
|
|
|
How to i send files to a network printer without opening the files.
I need to do it programmatically without too much fuss
I don't really want to use a purchased third party component - though I'd be happy to look at free or open source ones if people know of any.
I hav tried sending it to local printer with success, but i need to send it to a network printer.
|
|
|
|
|
If they have an associated application (e.g., Notepad, Word, Adobe), you may can use ShellExecute() with the print verb.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I wonder can hide the edit control box in MFC? Is there any tutorial to do it?
Thx. I'm waiting here for your reply. 
|
|
|
|
|
Use m_edit.ShowWindow( SW_HIDE ) to hide to Edit control. Just have look on various member of CEdit [^]
Величие не Бога может быть недооценена.
|
|
|
|
|
You can use the ShowWindow Function[^]
If you have a member variable:
m_YourCombo.ShowWindow(SW_HIDE);
If you do not use a member variable:
CWnd *pWnd = GetDlgItem(IDC_YOURCOMBOID);
if(NULL != pWnd)
pWnd->ShowWindow(SW_HIDE);
Best Wishes,
-David Delaune
|
|
|
|