|
As above,
is there any thing i need to follow in order for it to work?
Sometime it works sometime it does'nt.
Thanxs
|
|
|
|
|
Get Visual Assist from www.wholetomato.com. It fixes and enhances it.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
Thanxs. it's really a good addon for visual c++.
Thanxs again!
P.S. I think i'm getting spoilt by Visual Assist
|
|
|
|
|
Hi,
I have the problem with the ListControl printing. I can print out the contents of the ListControl but I "can not print" the Header Column titles. I can read the them and print as text, but the Font, size, tab and spacing are too hard for matching with the ListControl contents (because the ListControl frame can be position differently and print out (Client) also different method! Here is my print out the ListControl program
==========================================================================
void CNewDlg::OnBntPrint()
{
CPrintDialog dlg (FALSE);
RECT rc;
DIBSECTION ds;
if (dlg.DoModal() == IDOK)
{
HDC hdc = dlg.GetPrinterDC();
CDC dc;
SaveDC(hdc);
DOCINFO docinfo;
memset(&docinfo, 0, sizeof(docinfo));
docinfo.cbSize = sizeof(docinfo);
docinfo.lpszDocName = _T("CDC::StartDoc() Code Fragment");
dc.Attach(hdc);
if (dc.StartDoc(&docinfo) < 0)
{
MessageBox(_T("Printer wouldn't initalize"));
}
else
{
if (dc.StartPage() < 0)
{
MessageBox(_T("Could not start page"));
dc.AbortDoc();
}
else // ***> actually do some printing
{
int oldMapMode = dc.SetMapMode(MM_ISOTROPIC);
CSize ptOldWinOrg = dc.SetWindowOrg(-30, -30);
CSize ptOldWinExt = dc.SetWindowExt(1, 1);
CSize ptOldViewportExt = dc.SetViewportExt(4, 4);
m_report.Print(&dc, PRF_OWNED);
m_report.Print(&dc, PRF_CHILDREN);
m_report.Print(&dc, PRF_NONCLIENT);
m_report.Print(&dc, PRF_CHECKVISIBLE);
m_report.Print(&dc, PRF_CLIENT); // print the ListControl contents!
}
dc.EndPage();
dc.EndDoc();
RestoreDC(hdc,0);
}
}
}
==============================================================================
Is there any way to print the Header Column titles? Did I miss some thing here?
Thanks for all advices,
ThanhChau
|
|
|
|
|
I've never tried doing this, so i can only guess, but - have you tried calling m_report.Print(&dc, PRF_CHILDREN); after the call m_report.Print(&dc, PRF_CLIENT); ?
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Hi Shog,
I did and the result is the same, for now it prints like this:
- ListControl frame including Horizontal scroll bar (without the Header column frame)
- Whatever contents inside the ControlList Dialog (print inside the ListControl frame)
Thanks, might be you have any other suggestions,
|
|
|
|
|
So you see the frame, then a space where the header should be, and then the list contents?
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Hi Shog,
Not like you said: Imaging you see the ListControl on the Monitor Screen with its Header Columns & its contents (as it is supposed to be)! Then when I print, it printed just like that ... except there is no Header columns
Hints: If you use in MFC a ListControl dialog, then goto its property, select Style --> Select View --> Select "Report"! Then you should see a ListControl with a Header Column (default title "Color")
***> If in the Style property, you check "No Header column" option then that Header column row ("color") disappeared!
My print out just do like that (even I "did not" check the "No Header column" option!
I hope this Hint will explain what is my problem!
Thanks,
|
|
|
|
|
Replace all the print lines you have now with one that combines the flags:
{
int oldMapMode = dc.SetMapMode(MM_ISOTROPIC);
CSize ptOldWinOrg = dc.SetWindowOrg(-30, -30);
CSize ptOldWinExt = dc.SetWindowExt(1, 1);
CSize ptOldViewportExt = dc.SetViewportExt(4, 4);
m_report.Print(&dc, PRF_NONCLIENT|PRF_CLIENT|PRF_CHILDREN);
}
This will work. BTW: you may want to play with your size calculations a bit - the list prints fairly small...
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Whats the best way to keep track of any number of regions at one time so that I can move them when ever I need to? The number of regions I'm dealing with can be any number.
|
|
|
|
|
That's sort of a broad question... You could use an array, a list, a map... It really depends on what your needs are in storing and retrieving them.
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Well what I'm trying to do is create some regions that
I will paint a bmp into. Then I need to move them based on the user's selection and their mouse click. Doing all that I know how to do. Since their can be any number of regions at any given time which is pretty much random, keeping track of each one is the problem - I knew I'd hate programming graphics!
What I'm thinking, off the top of my head, is defining a class say
class CMyObject
{
CBitmap bitmap;
CRect bmprect;
float iXAxis;
float iYAxis;
};
CArray < myobject, myobject > m_myarray;
Question is how do I get the bmprect, bitmap, iX and YAxis and will it be different for each myobject that is created.
|
|
|
|
|
Jay Beckert wrote:
Question is how do I get the bmprect, bitmap, iX and YAxis and will it be different for each myobject that is created.
So, these will all be rectangular, but possibly rotated? I guess i still don't really understand what you're trying to accomplish...
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
They will each take on a new position within the client view depending on where the user will move them. Just like those 2D games that move sprites over the top of a background. I need to keep track of each object so when it moves to a new location within the client view, just grab whats behind that region paint that piece then repaint the object in it's new location. This way I can test if a point is in a region and adjust the mouse cursor. I'm sure it's the obvious easy thing I'm missing.
|
|
|
|
|
It was the obvious and basic programming design. It's as easy as defining a structure of the data including the HRGN and storing the structs in STL or CArray or what ever you choose. Then traversing that list checking to see if a point is in a region. I always make it complicated to later realize it's not as hard as it seems. Make sense??
|
|
|
|
|
Jay Beckert wrote:
I always make it complicated to later realize it's not as hard as it seems.
Heh, i know the feeling!
--------
The real problem is that you don't have to be religious to be a religious fanatic,
you just have to be a fanatic. -- Stan Shannon, the lounge
|
|
|
|
|
Hi,
I have succesfully compiled my project in debug mode which extensively uses HtmlHelp calls.
Of course I included "HtmlHelp.h" in StdAfx.h and linked against "htmlhelp.lib" in both debug and release mode.
Now I switched to release mode and was quite surprised:
All HtmlHelp() calls were recognized as unknown.
Thanks for your help.
R.
|
|
|
|
|
|
Yes, absolutely.
In debug mode it compiled and run (!) OK.
I switched on release mode and all these calls
HtmlHelp(m_hWnd, "c:\\x\\uploads\\help\\eehelp.chm::/main.htm",HH_DISPLAY_TOPIC, NULL );
were not compiled:
C:\x\Source...cpp(334) : error C2065: 'HtmlHelp' : undeclared identifier
C:\x\Source...cpp(334) : error C2065: 'HH_DISPLAY_TOPIC' : undeclared identifier
again: in Debug mode it not only compiles it even runs well...
R.
|
|
|
|
|
Looks like you may have added the the HtmlHelp include and library paths for the "Debug" configuration only.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
I've noticed a lot of questions dealing with the registry. However, none of them seem to relate to my particular problem.
I need to specify exactly where my program's data goes. My problem is that when you call SetRegKey(), it automatically makes a folder for your program within the folder that you specified using SetRegKey() and I don't want that. I wish to put my data in another program's folder.
Thanks in advance,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
|
I hate to be slow, but could you give an example of the RegCreateKeyEx (I've not looked at the others). One of the "out" parameters confuses me.
Thanks,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
Selevercin wrote:
I hate to be slow, but could you give an example of the RegCreateKeyEx (I've not looked at the others). One of the "out" parameters confuses me.
HKEY hKey;
DWORD dwDisposition;
RegCreateKeyEx(HKEY_CURRENT_USER,"A Dummy Key",
0,"",REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,
NULL,&hKey,&dwDisposition);
RegCloseKey(hKey);
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
|
|
|
|
|
Never use KEY_ALL_ACCESS! If you do, the call will fail on NT if the user is not admin. If you need full read/write privs, use KEY_READ|KEY_WRITE instead.
Happy b'day BTW
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|