|
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
|
|
|
|
|
hi
i have this code that should take the data in "m_copyed" and increment it by the value in "keyvalue".
But i seems to only increment the data by '1' and ignoring the value in "keyvalue"
radio_select=3;
for(int i=m_copyed.GetLength();i--;)m_copyed.SetAt(i,m_copyed[i]+ keyvalue);
SetDlgItemText(IDC_CHANGEDDATA, m_copyed);
i have some extra code in another area of the program shown below code this be the problem>
GetDlgItemText(IDC_EDITDATA, m_typing);
m_copyed=m_typing;
NOTE - i have 2 edit boxs "m_copyed" and "m_typing", i'm taking the text from "m_typing" incrementing it by the value in "keyvalue" and then displaying it in "m_copyed"
any help would be appreciatted
thanks
|
|
|
|
|
You've forgotten the most important thing: where is keyvalue set, and what to ?
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
ive just declared it as an 'int'
and set the edit text to m_key="ENTER KEY";
not sure where else i should set the value
thanks for the help
|
|
|
|
|
But to what value and where ? What are you trying to achieve ?
|
|
|
|
|
i havent set it at any value.
when the program is ran, the user enters a value which is stored as "keyvalue".
This value say '2' is used to move the text in "m_typed" by 2 positions. So if the word was 'SUMMER' it would become 'UWOOGT'
|
|
|
|
|
wrote:
when the program is ran, the user enters a value which is stored as "keyvalue".
You're converting the value typed in to a number, right ? Or you're calling UpdateData() before using the value if you've set it to be an int in the Class Wizard ?
wrote:
when the program is ran, the user enters a value which is stored as "keyvalue".
This value say '2' is used to move the text in "m_typed" by 2 positions. So if the word was 'SUMMER' it would become 'UWOOGT'
I just wanted to verify this is what you wanted to do. I reckon you're forgetting to call UpdateData before using the variable.
|
|
|
|
|
i have inserted a background image on my dialog by using pDC->StrecthBlt(...)
and i could not be able to set the background of my static controls into what my dialog is although i have set my Background mode to TRANSPARENT (pDC->SetBkMode(TRANSPARENT).
They still have "gray background color" and i have trouble with them.
Anyone who have an idea to solve my problem?
Thanks for ur help...
Atilla Selem
just listening to you...
|
|
|
|