|
This worked for me with list controls
from within your propertysheet class:
CMyPropertyPage m_myPage;
CButton* pButton = (CButton*) m_myPage.GetDlgItem(IDC_ENGINE_LIGHT_DELETE);
pButton->EnableWindow(FALSE);
|
|
|
|
|
That works for me, too, though I normally handle the button management local to the propertypage, so don't have the m_myPage indirection, e.g.
CButton* m_rbFile = (CButton*) GetDlgItem(IDC_BUTTON);
m_rbFile->EnableWindow(FALSE);
Debbie
|
|
|
|
|
Hi Debbie,
Thanks for the code. It worked perfectly. I appreciate youtaking the time to post help to my question.
John
|
|
|
|
|
Thanks for the sample code. It is what I needed to get over this minor hurdle. I appreciate your time and effort.
John
|
|
|
|
|
Hiya, I have a very old C Compiler( the usual NMAKE stuff!! ) that compiles very old dos based programs. The programs are very old but very good..so I like messing around with them and changing them..Sad I know but it helps me practice my programming...
Does anyone know a way of using Microsoft Visual C++ 6.0 to compile up such programs, instead of using the old C Compiler??
If anyone knew this it would be a great help to me..
Thanks,
grahamoj
|
|
|
|
|
depends how old they are, some dos staff might not be supported anymore. What is wrong with the old compiler? If all you want to do is to use VC, in VC 7 you can specify custom compiler (non MS), in VC 6 you can check "Always use custom build step"
|
|
|
|
|
Hiya using the old C Compiler is ok but abit crap because I would like to use 6.0 to be able to compile the old dos programs and my new stuff, instead of continually changing between the two ...
I know Visual 6.0 is a Windows based compiler, but surely it can do this.
Were is the "Always use custom build step" and what exactly I am checking it for??
thanks,
grahamoj.
|
|
|
|
|
1. The steps I mentioned are to use 3rd party compiler from VS 6 and 7. Project settings is the place to configure it.
2. If talking about 16-bit dos, it most probably would not compile with 32-bit MS compiler. If your code is 32-bits - just create a project and add your files there. There could be some dependencies missing (include directories, libraries etc.) but it is easy to configure in project settings.
I guess I do not understand what exactly is the problem with converting(adapting) the code.
|
|
|
|
|
Hi, can I get the height in point size (not logical size) from a font ?
LOGFONT lf;
GetFont()->GetObject(sizeof(lf),&lf);
return lf.lfHeight;
From MSDN:
lfHeight - Specifies the height, in logical units
Thx for help, Moak
|
|
|
|
|
PointSize = lfHeight * 72 / GetDeviceCaps(hDC, LOGPIXELSYS);
Kuphryn
|
|
|
|
|
thx, could you give a reference where you have this information from + how does this work?
|
|
|
|
|
Here is the source on MSDN.
lfHeight = -MulDiv(PointSize, GetDeviceCaps(hDC, LOGPIXELSY), 72);
Solution:
PointSize = lfHeight * 72 / GetDeviceCaps(hDC, LOGPIXELSY);
Kuphryn
|
|
|
|
|
Thanks
|
|
|
|
|
Hello,
Do you have any idea how to create shadow run time? I would like to generate shadow thumbnails in my application.
Thanks,
H.S.Ngai
|
|
|
|
|
draw a black rectangle, blur it, draw the image on top of the blurred rectangle.
Image processing
|
|
|
|
|
Cut off your thumbnail and hold it under a light. Look underneath the thumbnail, and you'll see a shadow...
Sometimes, I have all the right answers...
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I'm building an application that will use a XML file as a document. The application will simply load the document and allow the user to edit it - adding nodes here and there. The editing will be done in custom controls, so I'm not looking for a generic XML editor...
My question is this: would it be wise to use the DOM as my document? That is, would my CDocument-derived class simply maintain and update an IXMLDOCDocument? Or would it be better to load the XML then convert to an internal format (converting on save as well)?
J
May the bear never have cause to eat you.
|
|
|
|
|
Use the DOM, much less work. Its generaly wise to only have a single model of your data, and the DOM is about the best way to represent an XML document. It would probably be good to have your controls directly editing nodes too.
Ryan
They read good books, and quote, but never learn
a language other than the scream of rocket-burn.
Our straighter talk is drowned but ironclad;
elections, money, empire, oil and Dad.
|
|
|
|
|
Ryan S Roberts wrote:
Use the DOM, much less work. Its generaly wise to only have a single model of your data, and the DOM is about the best way to represent an XML document. It would probably be good to have your controls directly editing nodes too.
This is what I figured. Thanks for the input!
Ryan S Roberts wrote:
They read good books, and quote, but never learn
a language other than the scream of rocket-burn.
Our straighter talk is drowned but ironclad;
elections, money, empire, oil and Dad.
Hmmmm... Where is this from?
J
May the bear never have cause to eat you.
|
|
|
|
|
I need to take an input string of something like "one thousand, 2 hundred and 54" and turn that into 1254 as an integer. I know how to write an algorithm to do this, but I am hoping someone can point me to one that already exists.
Ideally, it would be C++ and non-MFC.
Thanks,
Matt Gullett
|
|
|
|
|
If you know a solution, then implement it. Originality has its advantages including experience.
Kuphryn
|
|
|
|
|
Knowing how and having time are conflicting right now. Besides, I am not one for reinventing the wheel everytime a problem arises. I agree that originality has advantages, but when I have a low priority need I always look for existing code/tools/libraries before I invest my time into coding a solution. I would much rather use someone elses code (IF: it works, is clean, looks well written, has been used by others, works, is not someting that is critial to my system, works, etc).
I am afraid, that my question may have come off as a "school problem" type question, but I assure you, that is not the case. I just have a request for a feature which is low on the priority list and was interested in a "quick" solution.
|
|
|
|
|
There is an article on here that tackles the exact problem you need solving. I can't remember where it is, but if you dig deep enough you should find it
|
|
|
|
|
I appreciate the comment, but I have searched and looked around. I have found 2 articles which do the opposite of what I want (convert a number to a string like "1234" becomes "one thousand two hundred thirty four"), but none which do what I want which is to take "one thousand two hundred thirty four" and return 1234.
|
|
|
|
|
Here's a short and hopefully easy question...
One of our designers would like me to display some items in a list view right-justified, but have the title in the column header left justified. Does anyone know how to do this?
Any help would be greatly apprecaited...
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|