|
|
The rotation will be around the origin. You're probably after a rotation around the center of the image. Try something like this.
graphics.TranslateTransform(-cx, -cy);
graphics.RotateTransform(30.0f, MatrixOrderAppend);
graphics.TranslateTransform(cx, cy, MatrixOrderAppend);
Where cx and cy are the center of the image (the point you wish to rotate around). This code builds a transformation that effectively translates the image so that the point you want to rotate around is at the origin, rotates around the origin and then translates the image back to its proper location.
Steve
|
|
|
|
|
hi,
I am using function EnumDisplaySettings to get Windows resolution
like this:
DEVMODE dm;
dm.dmSize = sizeof(DEVMODE);
dm.dmDriverExtra = 0;
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &dm);
..and resolutin is in dm.dmPelsWidth and dm.dmPelsHeight
It works fine in WinXP - I am programming it, but
i need to run it on Windows 95 and even function return TRUE
the values in DEVMODE are nonsencical and probably random.
Does anyone solved this problem?
Or know any other function to get resolution in Win95
Thank you
viliam
|
|
|
|
|
Why not use GetSystemMetrics() ?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I try to hook the window of a service with WH_CBT system hook, but it doesn't work.
|
|
|
|
|
Not many services have windows
Mark
|
|
|
|
|
you must be runing under the same desktop context in order to 'hook' a window this way. So your must be a service as well.
|
|
|
|
|
I am using CFileDialog to select multiple files. When I select single file, the member function GetPathName() . But when multiple files are selected the folder path is returned. How do I get the path of all the files that are selected.
|
|
|
|
|
Did you not read the documentation? It plainly states that:
If m_ofn.Flags has the OFN_ALLOWMULTISELECT flag set, you should call GetStartPosition() and GetNextPathName() to retrieve a file pathname.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I asked a doubt and I give 5 when I am helped. I dont know who is the fool that is giving a low rating to a person who replied to *me*. 5/5 for both of you.
|
|
|
|
|
Just ignore the voting system. It's so easily abused, the numbers mean nothing.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Use this loop ,
POSITION pos = dlg.GetStartPosition();
while (pos != NULL)
{
CString sFileName = dlg.GetNextPathName(pos);
}
-- modified at 10:05 Friday 6th October, 2006
|
|
|
|
|
|
I asked a doubt and I give 5 when I am helped. I dont know who is the fool that is giving a low rating to a person who replied to *me*. 5/5 for both of you.
|
|
|
|
|
As said by David , just ignore it.
|
|
|
|
|
Hi All,
Does anyone have idea how to get the Google PageRank using VC++?
Thanks In Advance.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks For The Information David.
I know the theory of PageRank , Searching for the API to get the PageRank.Is there any google service to provide PageRank of the URL? Is it possible with gogle Toolbar Query? If yes,How?
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
I wouldn't know their (proprietary) information. Perhaps an e-mail to Google is in order.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi all,
My application uses a spalsh screen for about 30 seconds and then the
main window appears.
During these if the user types any keyboard key ,the main window should appear immediately.
My code looks like this:
// *************** SPLASH SCREEN ***********************
// create a temp. invisible wnd. as parent of splash screen
if(m_wndOwner.m_hWnd == NULL)
{
LPCTSTR pstrOwnerClass = AfxRegisterWndClass(0);
if ( !m_wndOwner.CreateEx(0, pstrOwnerClass, _T(""),
WS_POPUP, CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
CW_USEDEFAULT,
NULL, 0) )
return FALSE;
}
int nDelay = 30000;
// Create and show the splash screen.
CSplashWnd::ShowSplashScreen(nDelay, BMP_MICATECH_BIG, &m_wndOwner);
Sleep(nDelay) ;
Can any one tell me how to overcome these problem?
Regards,
Veeresh
|
|
|
|
|
Don't use Sleep(nDelay),Sleep will block keyboard input.
Use OnTimer set delay time.
Use OnKeyDown get the typed keyboard key
|
|
|
|
|
You can use WM_KEYUP orWM_KEYDOWN did you try it?
|
|
|
|
|
how to create 3D coloured command button
|
|
|
|
|
Can you be more specific you want to create 3D bulk button
|
|
|
|
|
Hello Comunity,
i have an litle trouble wit this data type! To add an new item in this object i use:
CMapStringToOb cMap;
CString csNewKey = "First";
CMyObject* myObject;
cMap.SetAt(csNewKey, new CMyObject());
cMap.Lookup(csNewKey, (CObject*&)myObject);
myObject->csName = "John";
ok, works fine, but when i close my dialog, i recive memoryleaks!
And the debugger show in this line with -> cMap.SetAt(csNewKey, new CObject()); ?!
how to solve this, any sugestions?
regards
break;
|
|
|
|