|
Steve Hazel wrote:
I'd say my .exes recompiled with vc7 come out 30% bigger on average.
be thankful... if you're writing static libs, they can grow up to 300% bigger. i talked with MS about this and in my case (no MFC, just C++ with STL), they said it's related to "locale" changes in the STL and C++ Standard Library. sucks.
-c
No matter how fast light travels it finds the darkness has always got there first, and is waiting for it.
-- Terry Pratchett,
|
|
|
|
|
Chris Losinger wrote:
it's related to "locale" changes in the STL and C++ Standard Library
Oh man. A bloated standard library, eh...
I only use sprintf... And the dorky ole strcpy, etc...
I should bite the bullet and just write my own std c library...
Sighhhh...
|
|
|
|
|
Out of interest, why do you use C style strings ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Well, primarily because I'm lazy.
Also, for a slightly smaller .exe size
I know it'll run slower and all that, but I'm just wierd that way.
When I was a kid I fit a text editor into 4K in 6502 asm on
my ole c64. If an app is just for me, it just irks me to use
TWO whole bytes for one character...
...Steve
|
|
|
|
|
My apps tend to come out smaller under vc7, though it's usually within 10%. I have no explanation.
|
|
|
|
|
Well, it appears you're using incremental linking. This will increase file size by roughly 20% in most cases.
Check your linker settings, Also make sure "Optimize for Windows 98" is turned off. This will also increase the size of your executables.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Erik Funkenbusch wrote:
Check your linker settings
Yep.
It was those fricken linker settings.
I thought I had em tweaked right, but in my defense,
there are ONLY about 10 kaJILLION of em...:/
Now my .exe sizes are even a couple bytes lower than
they were with vc6
THANKS soooo much
...Steve
|
|
|
|
|
Hello!
Is there any possybility or chance to transfer a MFC-Program into SUSE Linux?
Or exist tools? Thank you for help.
|
|
|
|
|
No. There are a number of portable windowing toolkits (wmWindows springs to mind), but I don't believe MFC has been ported to Linux. It would be a big job, how would you go about making sure you leaked as much memory as MFC does ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Christian Graus wrote:
how would you go about making sure you leaked as much memory as MFC does ?
perhaps i should write it. I'm getting pretty good at leaking memory.
Signature space for rent. Apply by email to....
|
|
|
|
|
check if it works with Wine
www.winehq.org
some guys managed to get Microsoft word, excell, powerpoint,
outlook, explorer, access, visio etc running in Linux
http://www.codeweavers.com/products/office/supported_applications.php
http://www.wxwindows.org/
http://www-106.ibm.com/developerworks/library/l-mfc/?n-l-4182
screenshot looks outdated, newer kde apps look quite nicer http://www.linuxorbit.com/modules/My_eGallery/gallery/screenshots/snapshot3.png
http://www.bristol.com/windu/
if your apps were written in Delphi or C++ Builder
you'd use their Linux version - Kylix
http://www.borland.com/kylix/
|
|
|
|
|
How do you capture a VK_CONTROL + 'A' (for example the select all key strokes) with out using the Accelerator??
|
|
|
|
|
I would capture the 'A' or 'a' key, then use GetAsyncKeyState to find out if Control is down. Be careful - the high bit tells you if it is down now or not, the rest tells you if it's been down since the last time you called it. So you need to either make sure you check the right thing, or call it twice to be sure.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
It seems that if the VK_CONTROL key is down, I cant receive any other WM_KEYDOWN messages except for the first key pressed.. I have a function to see if the VK_CONTROL is pressed down but it still seems to block all other msg's.. I have tried to catch the combos in WM_KEYDOWN and in WindowProc. Do I need to catch the WM_KEYDOWN for the control key and catch a WM_KEYUP message for the 'A'? If I use the GetAsyncKeyState where should I call it?
|
|
|
|
|
I'm sure I've done it in WM_CHAR with something like this
switch(nChar) // I can't recall where I'd get this from
{
case 'A':
case 'a':
GetAsyncKeyState(VK_CONTROL);
if (GetAsyncKeyState(VK_CONTROL))
{
// Control is down
}
else
{
}
}
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Hi,
I am creating a program that will make a graphic of a math function, but I have a problem with the LineTo function, I have to remake it, but not as:
LineTo(int x, int y) { dc.LineTo(x,y); }
but as a cycle of SetPixel.
The reason of this is because for finding the roots of the math function I need to know where the line I draw passes through the X Axis, or where y = 0.
My question is how do I write a variant of LineTo where I use SetPixel, instead of LineTo???
Thank you very much.
you can contact me on e-mail blackkattle@abv.bg
|
|
|
|
|
If I understood it right, you want to determine, prior to drawing it, at which x does a segment intersect the x axis (if it does): this can be done with a little of trivial algebra, no need to draw the line pixel by pixel. So, this function determines whether a given segment crosses the x axis, and, if so, changes its end point so that the segment ends precisely on the intersection:
bool adjust_to_x_axis(int x0,int y0,&int x1,&int y1)
{
if(x0==x1){
if(y0<=0){
if(y1>=0){
y1=0;
return true;
}
else return false;
}
else if(y1<=0){
if(y0>=0){
y1=0;
return true;
}
else return false;
}
}
int x_int=x0-y0*(x1-x0)/(y1-y0);
if(x0<x1){
if(x0<=x_int&&x_int<=x1){
x1=x_int;
y1=0;
return true;
}
else return false;
}
else if(x0>=x_int&&x_int>=x1){
x1=x_int;
y1=0;
return true;
}
else return false;
}
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
if (y1==y0) then the line never cross the x-axis, otherwise x = x1 - y1*(x1-x0)/(y1-y0).
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
The solution is x=x0-y0*(x1-x0)/(y1-y0), not exactly what you wrote. Also, the code considers whether the given segment (not the whole line) intersects the x axis.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Actually x0-y0*(x1-x0)/(y1-y0) = x1-y1*(x1-x0)/(y1-y0) = (x0y1-x1y0)/(y1-y0).
She's so dirty, she threw a boomerang and it wouldn't even come back.
|
|
|
|
|
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
BlackKattle wrote:
how do I write a variant of LineTo where I use SetPixel, instead of LineTo???
You don't have to. Just plug in your drawing (SetPixel) backend callback to LineDDA .
|
|
|
|
|
hello,
i need a matrix!!! but i have no const int values. my values are all int (because the values changed inside the programm). is there a possibility to make a two dimensional array (int array[n][m]) without const int values????
MFC
|
|
|
|
|
You must have one of the dimentions fixed, i bealive
use the operator "new"
Casa.Sapo.pt
|
|
|
|
|
You can possibly try a vector inside a vector, or a list of vectors, but your going to need VC++ 7, as I think templated templates are new to VC++.
Then again you could try Perl. It lets you do it.
|
|
|
|