|
the only time i have seen this is when the caption is a separate static control that you have placed in the tab order after the group box (i think its after)
either change the tab order to the other way round or use the built in caption of the group box
situations to avoid #37: "good morning ... how many sugars do you take in your coffee ... and what was your name again?"
coming soon: situations to avoid #38: "...and the dog was there too?"
|
|
|
|
|
That's the problem, I am using the built in caption of the group box. I'm seeing it display two different ways in two different dialogs.
|
|
|
|
|
Hi..
I write a static linked MFC application and i need some advice about reducing the .exe size
I used the compiler optimization option (minimum size) but the release build is still big.
is there any other options?
also is it posible to tell if there are some coding practices to reduce the size ?
can i delete some unnecessary wizard code?
|
|
|
|
|
If it's not completely necessary, link in the MFC libraries dynamically. That should reduce your executable size considerably.
-Mike Zinni
Software Engineer
email: mzinni@rimail.com
AIM: zin9999
|
|
|
|
|
|
Search this forum for the word 'liposuction' and you will find a couple of interesting leads.
|
|
|
|
|
|
Michael Dunn wrote:
/opt:nowin98
What's that do? It removes any code required for backward 98 compatibility???
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
RTFM
But seriously - the default behavior of the VC6 linker is to make the PE sections aligned on 4K boundaries, which makes the EXE load faster after being defragged by the Win 98 defragger (which has that gimmick of placing clusters where they'll be read in faster from disk). Adding that switch goes back to the pre-v6 behavior of 512-byte boundaries, which makes for a smaller EXE (less padding within the file to get to 4K boundaries), in exchange for alleged slower loading times which no one will notice with today's hardware.
--Mike--
Buy me stuff!
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
thank u
i wish to know if it is possible to reduce the size if i make my own classes enstead of MFC
for example writing my own CFIle?
|
|
|
|
|
I need to Trap the above, so that the user has to enter a pasword to exit the program, I allready trap PreTranslateMessage but "ALT + F4" must be decoded befoer this is called
It should be easy.........
Rich
|
|
|
|
|
What about just using an accelerator?
|
|
|
|
|
Just intercept WM_CLOSE . I think that should work for ALT+F4, close button, close context menu, etc.
--------
all the modern things
have always existed
they've just been waiting
to come out
and multiply
and take over Björk, The Modern Things
|
|
|
|
|
Thanks for that, the easiest is always the best.
Rich
|
|
|
|
|
Richard Dalling wrote:
I need to Trap the above, so that the user has to enter a pasword to exit the program
Be glad I'm not a user of that program: I'd vote for more torture than the MS Explorer team should have (because they didn't do their stuff conciously malicious that you apparently do).
Now Virus writers are going to force users to write a password to get OUT of their programs?!
Why can't you just SEGV like every nice MS program?!
|
|
|
|
|
It's not me just my customer that request this function, the end software is used for process control, and they do not want the employee quitting the program to play card game ect.......
|
|
|
|
|
OK. A serious answer here would then be: replace Explorer.exe with your program. Seriously!
If you _only_ want your program to run on that machine, replace the shell with whatever you like.
But wouldn't that be wasting money for your customers, using full Windows installations as just the back-end for your program?
|
|
|
|
|
I have it sorted now, I just trap the WM_CLOSE message, and direct the user to my exit screen, its manly intended to stop the user accidentally closing the program, as they are generally not PC aware, and it would mean a call to the site engineer at 4:00am to go to site to get the system working again because we all know its always the early morning shift (that are bored) that cause these sort of problems and as the system is very expensive 1/4 mill Its a Big Machine the cost of NT4.00 is small, we usually use the policy editor to restrict access.
Thanks for the help
Rich
|
|
|
|
|
Anyone here used the enumPrinters API? Got some code or know where I can find some?
Any and all reference welcome.
Cheers!
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
|
This CodeGuru thread may provide a clue.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
The following code is for get the default printer
<br />
PRINTER_INFO_2 *ppi2 = NULL;<br />
DWORD dwNeeded = 0;<br />
DWORD dwReturned = 0;<br />
<br />
EnumPrinters(PRINTER_ENUM_DEFAULT, NULL, 2, NULL, 0, &dwNeeded, &dwReturned);<br />
if (dwNeeded == 0) <br />
return FALSE;<br />
<br />
ppi2 = (PRINTER_INFO_2 *)GlobalAlloc(GPTR, dwNeeded);<br />
if (!ppi2)<br />
return FALSE;<br />
<br />
bFlag = EnumPrinters(PRINTER_ENUM_DEFAULT, NULL, 2, (LPBYTE)ppi2, dwNeeded, &dwNeeded, &dwReturned);<br />
if (!bFlag)<br />
{<br />
GlobalFree(ppi2);<br />
return FALSE;<br />
}<br />
<br />
if ((DWORD)lstrlen(ppi2->pPrinterName) >= *pdwBufferSize)<br />
{<br />
*pdwBufferSize = (DWORD)lstrlen(ppi2->pPrinterName) + 1;<br />
GlobalFree(ppi2);<br />
return FALSE;<br />
}<br />
<br />
lstrcpy(pPrinterName, ppi2->pPrinterName);<br />
Best Regards...
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Thanks for all those who replied.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
hi:
how to chang the tooltip of the buttons on the toolbar?I use CToolTipCtrl::updateTipText() to do so,but only some buttons chang the tooltip texts,others don't,why?
Thanks
benben
|
|
|
|
|
There's a good chance these tips are loaded from resources. In the toolbar's parent window, you can handle TBN_GETINFOTIP to eliminate the default behavior.
--------
all the modern things
have always existed
they've just been waiting
to come out
and multiply
and take over Björk, The Modern Things
|
|
|
|