|
Actually its nothing like that. If you research the MFC underlying infrastructure, the CPrintInfo object has default min, max page values of 1 & 0xFFFF respectively. Thus when printing it will print to those pages, until it encounters a page with no data. As far as Ive found the only way to get rid of this is to SetMaxPage to the correct number of pages. But the textmetrics & sizes that some Printer DeviceContexts return to you arent correct, so Im still having problems determining exactly how to calculate this. Also strangely, in my font, the boldface char's seem to take up barely more space than the regular ones. Im still working on this problem, so Im not sure what the solution is yet
|
|
|
|
|
Not sure if this applies here, as I don't use VC++ but anyhow...
I'm trying to use GDI+, and I've tried to apply the tips from the Starting with GDI+ article with my Dev-C++ compiler, but I get many errors on the file "GdiPlusEnums.h" like "enumerator value for" and "conversion to". Any advice? I'm using an example from the PSDK documentation, so I'm pretty sure nothing is wrong with my code...
|
|
|
|
|
using the visual c++ 6.0 & MFC library I created a propert pages resources and added them to the property sheet object CPropertySheet what happens is that the property sheet will be created as large as the largest property page what I need to do is to make this propertysheet fixed in size and make the large pages have a vertical scroll bar to fit in the propertysheet
so if the property page has many edit boxes we create a scrollable frame around those edit boxes so not all of them have to be shown at the same time.so how we can acheive this and do we have to do it with the resource editer or programmaticlly.
thanks in advance
alhaneen
|
|
|
|
|
Hello All,
I wasnt sure if this should go in the C++ or VB Board but I think it relates more to C++.
Anyway. I have been writing an app which does masses of processing using SQL. The problem is that VB is to slow.
I want to be able to write a DLL that can get the data from the MySQL database and put it in the DataGrid on the VB Form.
Is this possible? Easy to be done?
I have already optimised one piece of code someone else wrote. That took 18 hours to do the processing. The C++ dll I wrote did it in 30 seconds. I don't believe ill get this kind of speed increase with the section I need the latest DLL for because it only takes 10 seconds now anyway. But it is something that will be accessed a lot and regulary so 10 seconds is a lot of wasted time in a day.
What I really want is to be able to have every single bit of processing done by C++ and only VB used for the interface.
Any help would be greatly appreciated.
Thanks.
|
|
|
|
|
It is possible, but might not be easy.
Create a C++ DLL that contains an ATL or a COM object. Make this object to implement the C++ or MFC database support. Then use this DLL from VB. You must use COM because C++ and Basic are not directly compatible.
The easiest way for sure is to build the entire application in VC++, though...
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I'm trying to write in a file in my .cpp code:
I have a TCHAR variable szText and it should be a string so I could write fprintf( fichero, "%s\n", szText); How could I convert my TCHAR in a string?
Thank you very much!!!!
|
|
|
|
|
Hello,
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnarvc/html/msdn_mbcssg.asp
With Regards,
R.Selvam
|
|
|
|
|
If szText is a TCHAR , the correct syntax would be:
fprintf( fichero, "%c\n", szText);
I assume, however, that you meant that szText was a TCHAR* . Correct? If so, your fprintf() statement is correct.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Thank you, now it's OK
The real definition was:
TCHAR szText[256] = { _T('\0') };
|
|
|
|
|
Hi!
I've built a dialog window in Visual C++ 6 with some edit boxes and buttons and I'd want these edit boxes to show some default texts. In main window I call this dialog window just clicking a button and I know I can get the information written in these edit boxes here in main code, but I don't know how could I show something in them when I click the button in main window, before than I could write anything myself. I think I have to use UpdateData but I haven't OnInitDialog() as in main code so I don't know where should I write it.
In my own dialog window I only have some code that works when I click a button there.
Any idea?
Thank you in advance!
|
|
|
|
|
map some dialog class member variables to the edit controls in ur dialog box ... in ur main code that shows the dialog box do something like this:
CMyDialog myDialog;
myDialog.myVar1 = "hello world";
myDialog.myVar2 = "hello world again";
myDialog.DoModal();
etc etc
"there is no spoon" biz stuff about me
|
|
|
|
|
Yeah! It works now, thank you
|
|
|
|
|
Is Microsoft® Visual C++™ .NET Standard 2003 The same as Visual c++
|
|
|
|
|
.NET means that you can make .Net programs with it.
Standard specifies what kind of package you get
(better packages have more extra's and tools, I think)
2003 is the edition (or closely, the version) of the tool.
So in short, yes.
|
|
|
|
|
Simply based on what you've provided, I'd say no. Both of them are Visual C++, but you've qualified one with .NET Standard 2003, whereas the other has none.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Can i program 3d Games With C++. and simulation games. Such as "The Sims" With Visual C++
Also does a compler come with visual C++
Thank You
|
|
|
|
|
First of all restate your question? second if you do want to create games, you would have to learn something like directx or opengl programming, I myself started this a couple of months ago, started learning directx. If you just wanted to find out if YOU could then creating a game like the sims would take you.... including about a 100 people...couple of years, with full knowledge of DX or OGL. But yes you could create it lol.
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
You can program games with c++, but you would need a 3d
library (and knowledge about it, this is the hardest part)
as well.
OpenGL and DirectX are both good tools.
(DirectX is a whole family of libraries, where one of them
is 3D.)
Try looking up a bit on both, and choose one you like.
(Though most games today uses DirectX)
http://www.opengl.org/
http://msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000410
|
|
|
|
|
Yes, Visual C++ with direct X is probably the best platform on a windows box to do that. However, if you expect to do anything similar to the current games on the market I would say don't hold your breath, current games are programmed by teams of 20 or more and take over a year for a single game... And they reuse old code, graphics, sound and other things from past games that they have written...
John
|
|
|
|
|
Can i program 3d Games With C++. and simulation games. Such as "The Sims"
Thank You
|
|
|
|
|
Definitely.
Happy Programming!
WWW::CodeProject::BNEACETP
|
|
|
|
|
Help: F5 doesn't compile anymore, even if I changed the sourcecode!
The changes are saved, but Visual Studio .NET 2003 simply starts debugging the unchanged version of my code!
Everytime I have to press F7 (to build the new version) prior to F5 (to debug the new version)!
I am totally unsure if I changed anything (I really cannot think of it), so if there is an option to get back the "standard" behaviour (rebuild if changes in code), then please, anyone help me and direct me towards it...
It DID rebuild on F5 after changing code for a while, it just stopped doing so recently...
Help!
|
|
|
|
|
I don't know if there are other things that may cause this,
but try to see if this setting is ok:
From the build menu select Configuration manager.
When you select debug (and release) in the drop down box,
make sure the box "build" is checked.
sp+
|
|
|
|
|
Yup, every "build" checkbox is checked!
Thanks for trying to help....
|
|
|
|
|
Are you sure that you are chaingin the correct source code?
Are your dates/times correct on your pc and did you change it recently?
Did you try to delete the release and debug folders and do a clean build?
John
|
|
|
|