|
There is a great article here:
Printing Class Library[^]
on how to print. I have read the article since 1999 and am hoping there are others out there
that use this class. There is this function:
pPage->PrintRotatedText(2.30,0.72,0.50,0.85,TEXT_NORMAL|TEXT_NOCLIP,9,"some text",90*10);
which will rotate the text 90 degrees. My problem is, the text is rotated and left justified
and I need it to be rotated and right justified. If I try changing the flags to TEXT_RIGHT
or TEXT_CENTER, the text still is left justified.
Any chance, any one knows how to rotate text and make it right justified. Im trying to rotate
these numbers and it looks silly having them left justified.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina
|
|
|
|
|
I haven't tested this, but a quick look through the source suggests that the line
m_PrtDesc.uTextFlags = flags;
is missing in the PrintRotatedText function.
If you vote me down, my score will only get lower
|
|
|
|
|
I just tried adding that code and recompiled and it still is left justified.
Any other ideas and I'll try them. Please any response any one can give me will
be greatly appreciated.
|
|
|
|
|
Good evening to all;
I have a small problem that I can not solve:
from a C program must call weka classes and accurately Apriori algorithm,
I use this syntax
system ("\" C: \ \ Program Files \ \ Weka-3-6 \ \ weka.jar \ "weka.associations.Apriori");
In this way I can just start the program and I have to do everything manually.
you tell me where the mistake?
Thank you all for the help.
|
|
|
|
|
salv03 wrote: In this way I can just start the program and I have to do everything manually.
As opposed to what?
salv03 wrote: you tell me where the mistake?
What's the problem?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
|
|
I have an application that is based on TabControl (CFormView), but for now, it appears as the dialog box that did, and I would like that it occupy the window into the framework.
How can I do it?
|
|
|
|
|
You'd call the SetWindowPos[^] member function.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
Yes I know. This is the method that resize the tabControl
[code]
void CMyTabCtrl::SetRectangle()
{
CRect tabRect, itemRect;
int nX, nY, nXc, nYc;
GetClientRect(&tabRect);
GetItemRect(0, &itemRect);
nX=itemRect.left;
nY=itemRect.bottom+1;
nXc=tabRect.right-itemRect.left-1;
nYc=tabRect.bottom-nY-1;
m_tabPages[0]->SetWindowPos(&wndTop, nX, nY, nXc, nYc, SWP_SHOWWINDOW);
for(int nCount=1; nCount < m_nNumberOfPages; nCount++){
m_tabPages[nCount]->SetWindowPos(&wndTop, nX, nY, nXc, nYc, SWP_HIDEWINDOW);
}
}
[/code]
But I dont know how to get the size of the framework. What parameter I have to change?
|
|
|
|
|
What do you mean "the size of the framework"?
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
|
First, you're calling GetClientRect() in the wrong context. GetClientRect() gets "this" windows client rectangle, not the parents'. If you want to get the parents' client rectangle (the framework as you call it), in the context of the child, then call GetParent()->GetClientRect().
The way I would do what you're trying to do is the following:
1. Using the ClassWizard, add a WM_SIZE and WM_CREATE message handler to your View class, or
2. alternatively add ON_WM_SIZE() and ON_WM_CREATE() to your View class's message map and add the following overrides to your View class's header file:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
4. add the following code (if you used the ClassWizard to add the WM_SIZE and WM_CREATE handlers, then cut and paste the code as appropriate).
void CMyTabExampleView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
m_myTabs.MoveWindow(0, 0, cx, cy);
}
int CMyTabExampleView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
CRect rect;
GetClientRect(&rect);
m_myTabs.Create(0, rect, this, 9999);
m_myTabs.ShowWindow(SW_SHOW);
return 0;
}
Of course, the style and ID of the "m_myTabs" window needs to be what you need them to be. Adjust accordingly.
Hope this helps. Good luck. Call if you need more help.
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
Hi
How to load ICON file in Dialog application client area in VC8.
|
|
|
|
|
Hi,
Just use the LoadImage function[^] and cast the return HANDLE into a HBITMAP. Then you would just BitBlt[^] the bitmap onto the dialog.
Best Wishes,
-David Delaune
|
|
|
|
|
Or insert a PictureControl and change the "Type" property of PictureControl to "Icon", then assign an ICON resource to "Image" property of PictureControl.
|
|
|
|
|
Use the ICON [^] resource control.
|
|
|
|
|
I read the characters from local file compressed by gzip, and want to uncompress the characters into another bytes buffer, not into local file.
How can I get it.
|
|
|
|
|
Perhaps with the zLib library?.
It is what gzip used in the first place, after all. With the added advantage of not needing to load the file first, and the additional bonus of being able to seek/read from a compressed file as though it were a standard non-compressed file. zLib gzip file access functions[^]
|
|
|
|
|
Using managed GZipStream[^] class. For unmanaged apps check CGzip[^] class found in codeproject.
|
|
|
|
|
Back to my MimeMap Question, but with more focus on the issue
If I get the value of the key that doesn't exist, comm return an empty array in the format I need, (I think so) which is empty. Maybe I can create a new safearray in the exact format, or just add my values to the existing array.
What do you think?
mimeMap | safearray of VARIANT = [0]()
VARIANT mimeMap;
VariantInit(&mimeMap);
hr = pADs->GetEx(CComBSTR("MimeMap"), &mimeMap);
|
|
|
|
|
I could find your MimeMap question. But even so, I can't make heads or tails of what you're saying...
What are you on about????
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
I was brain dead when I posted the question, I read again and it didn't make sense to me either.
I'm frustrated with the mimemap and ADS. I get the error -2147463156. I decoded the error to my input data not being in the correct format of a safe array.When I examine &var in PutEx, it looks like a safe array to me, but putEx just rejects it. I've googled the subject, but it looks so complex, in which articles talk about a pointer in the package, that points to a record in the safe array, BSTR's, VT's. I found 1 vb example of a successful add to MimeMap, if I could just package my data correctly, I could add the data to the key. Just looking for help again.
LPWSTR pszMimes[] =
{
L".application, application/x-ms-application",
L".deploy, application/octet-stream",
L".flv, video/x-flv",
L".manifest, application/-x-ms-manifest",
L".msp, application/octet-stream",
L".msu, application/octet-stream",
};
DWORD dwNumber = sizeof(pszMimes)/sizeof(LPWSTR);
hr = ADsBuildVarArrayStr(pszMimes, dwNumber, &var);
if ( SUCCEEDED (hr )) {
hr = pADs->PutEx(ADS_PROPERTY_UPDATE, CComBSTR("MimeMap"), CComVariant(var) );
VariantClear(&var);
if ( SUCCEEDED (hr )) {
hr = pADs->SetInfo();
}
}
|
|
|
|
|
Well -2147463156 == 0x8000500C == E_ADS_CANT_CONVERT_DATATYPE (Generic ADSI Error Codes[^])
So there's something in the var that can't be converted.
Have you tried calling VariantInit(&var) before calling ADsBuildVarArrayStr[^]?
IADs::PutEx[^]
If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams You must accept one of two basic premises: Either we are alone in the universe, or we are not alone in the universe. And either way, the implications are staggering” - Wernher von Braun
|
|
|
|
|
Yes Sir.
I'm convinced that I have a safe array. it works on many other keys just fine. It's just the MimeMap Key, I really need to figure out how to decode the HRESULT numbers.
-2147463160, -2147463156
I give up. Going to put this on my ELance list and farm it out next week.
Thanks for the help, I got most of it written myself.
|
|
|
|
|