|
Hi Cedric
Thanks for your advice
Just done this in VC++ 6.0. It took a bit of digging to find the pre-compiled header settings , but I got there! Deselecting this resolved this issue (introduced other though, which I have now fixed) and heh presto, got my release version.
The size is a 1/4 of the debug version. Does a 'Release' version run faster than a 'debug' version?
Thanks for your help
69 Bay
|
|
|
|
|
69 Bay wrote: Does a 'Release' version run faster than a 'debug' version?
Normally yes but in general it is not really noticeable. Except if you do some heavy computing, then the difference is obvious.
|
|
|
|
|
69 Bay wrote: fatal error C1010: unexpected end of file while looking for precompiled header directive
Most of the time when you forget to include your precompiled header file then you get this rather cryptic message.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
69 Bay wrote: Is there any issues in supplying a debug version to a customer as opposed to the release copy?
No, but keep in mind that you cannot distribute the debug version of the DLLs (e.g., msvcrtd.dll). Have you considered statically linking with the libraries?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I would like to display a small icon in a dialog box.
For this, I use an icon control, i.e. a static control with the styles SS_ICON and SS_CENTERIMAGE. I then load the small icon and associate it with the static control using the following code :
int cx_smicon = ::GetSystemMetrics(SM_CXSMICON);
int cy_smicon = ::GetSystemMetrics(SM_CYSMICON);
HINSTANCE hInstance = g_hInstance;
if (szResource == IDI_WARNING ||
szResource == IDI_ERROR ||
szResource == IDI_INFORMATION)
hInstance = 0;
HICON hIcon = (HICON) ::LoadImage(hInstance
, szResource
, IMAGE_ICON
, cx_smicon
, cy_smicon
, LR_SHARED);
::SendDlgItemMessage(hWnd, IDC_ICON
, STM_SETICON
, (WPARAM) hIcon
, (LPARAM) 0L);
The above code displays custom icons correctly (with the desired size 16x16) but standard icons are always displayed using the standard size 32x32.
I don't understand what I'm doing wrong.
Have someone already encountered this problem ?
Thanks for your help.
|
|
|
|
|
Are you supposed to use LR_SHARED with images loaded from a file?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
When I use VC6.0,I find that:
float value=33.4;
DWORD temp=33;
value=value-(float)temp; or value=value-temp;
Then value will be 0.4 in theory. But in face it is 0.400002 in vc 6.0.
Why is it? is it a bug of VC6.0 or CPU?
|
|
|
|
|
Because,in fact,the float or double is not always preciously number when it store in the memory.
|
|
|
|
|
That's life with floating point arithmetic. Just like 1/3 can't be represented in decimal without an infinite number of decimal places not all numbers can be represented exactly in base 2 with a fixed number of binary places.
If you use double s to get more precision the answer comes to 0.39999999999999858 which is closer to the ideal.
On a sererate issue, lose the float cast: it's not needed and is bad form.
Steve
|
|
|
|
|
Hi~~~ I have a question about Clipboard.
WM_DRAWCLIPBOARD message is notified when the clipboard data is changed.
Then how do I sniff that the message of paste is sent to clipboard??
Please help~~~
C++
-- modified at 3:03 Friday 29th September, 2006
Alpha and Beta
|
|
|
|
|
I dont think it is possible as the paste operation shud be strictly b/w the paster and the pastee. As for copy and cut they are notified as the clipboard is a common data repository for all the applications and seriously i fail to understand the usage.. anyways if someone know anything about this enlighten me too!
|
|
|
|
|
What is wchar_t used for? How can I create a wchar_t string?
modified 9-Mar-17 17:09pm.
|
|
|
|
|
Daniel Kanev wrote: What is wchar_t used for
A variable of __wchar_t designates a wide-character or multibyte character type. By default wchar_t is a typedef for unsigned short.
Daniel Kanev wrote: How can I create a wchar_t string?
Use the L prefix before a character or string constant.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
wchar_t is a keyword in C++ and is used to designate wide-character type(not multibyte).
In VC7 there's an option to set whether to treat wchar_t as a built-in type or unsinged short .
-- modified at 3:53 Friday 29th September, 2006
|
|
|
|
|
fefe.wyx wrote: (not multibyte).
I Checked this out from MSDN.
The exact lines are:
A variable of __wchar_t designates a wide-character or multibyte character type. By default, wchar_t is a typedef for unsigned short;
fefe.wyx wrote: set whether to treat wchar_t as a built-in type or unsinged short.
Yes I have read about it. It's also mentioned in MSDN.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
For Example,When you want to process Chinese font,you have to chose the wchar type in your programer.
|
|
|
|
|
Daniel Kanev wrote: How can I create a wchar_t string?
The STL class wstring deals with wchar_t 's. You can use it just like you would the string class (with the wide versions of other STL classes, that is).
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
hi,
i have a editbox control in a dialog box.
on entering the string in the editbox and clicking the button
the string have to be inserted in the listbox of the already opened other dialog box
can anybody help??
thanx in advance,
zari
|
|
|
|
|
keep a pointer of the list box in the first dialog( dialog which have the edit box). Then on pressing the button call the AddString function of that pointer.
nave
|
|
|
|
|
You may right the interface function for setting the value in the second dialog
On the button click of first dialog
{
Dlg->SetDataToListBox( m_Edit.GetWindowText()); //Where Dlg is the second dialog class object
}
In the second dialog
2ndDlg::SetDataToListBox( CString EditData ) // SetDataToListBox function the dialog class of the second dialog
{
m_ListBox.AddString( EditData );
}
Rinu Raj
|
|
|
|
|
zareee wrote: : Re: Listbox control
You can take the text of the edti box on the click of the button using the GetWindowText.
For list control you can then use CListCtrl::SetItemText()which Changes the text of a list view item or subitem.
BOOL SetItemText(
int nItem,
int nSubItem,
LPCTSTR lpszText
);
zareee wrote: string have to be inserted in the listbox
For List box you can use
CListBox::InsertString() / CListBox::AddString()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I guess zareee can insert text to listbox,right?
|
|
|
|
|
Yes...
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Sorry for posting OpenGL question here.
I have not read the fine print in my OpenGL book, but can one modify
list of vertices after it is compiled?
I was hoping to do some simple animation and have build a list ( mainly cyclinders) and now need to "move it around".
Can that be done with list?
Thanks for reading.
|
|
|
|