|
Hi all,
Have some basic questions related to MFC….
1. Which are the DLLs that are used in a simple application that I created thr VC++6.0.? I know MFC42.DLL which are the other important ones?
2. In which DLL the definition of WinMain(),DefWindowProc() is provided? I know that I can’t edit it but just to have basic information…
3. What is the effect of various setting under ProjectSettingsGeneral tabMicrosoft foundation classes
i. Use MFC in a shared DLL,
ii. ii. Use MFC in Static library,
iii. iii. Not using MFC
Thanks
Sameer
|
|
|
|
|
1. Read the documentation
2. I don't know and don't care
3. Using MFC shared DLL's allows your application to use the MFC classes and minimizes the size of your EXE. Static linking of the MFC libraries results in linking the MFC libraries into your EXE build. Therefore the EXE is larger but not dependent on MFC being installed on the machine. Not using MFC means your application cannot use the MFC classes.
led mike
|
|
|
|
|
To add to mikes reply,
Sameer_Thakur wrote: 1. Which are the DLLs that are used in a simple application that I created thr VC++6.0.? I know MFC42.DLL which are the other important ones?
Use dependency walker to check dll's used
|
|
|
|
|
What do you need exactly?
|
|
|
|
|
Hi Iam using Grid control in my application.
how to delete the multiple rows in the Grid.
currently if i select multiple rows to delete but the last selected row is getting deleted.here iam sending the code what i have used to delete the rows.but it is working
pls any body can help in this
CCellRange cRange;
int nCount = 0;
UINT unSel = 0;
INT_PTR nSelctedDMItemsCount = 0;
cRange = m_Grid.GetSelectedCellRange();
nCount = cRange.GetMaxRow();
bool bFlag = false;
for(int nDMIdx = 1;nDMIdx < nCount;nDMIdx++)
{
bFlag =false;
bFlag = m_Grid.IsCellSelected(nDMIdx,0);
if(bFlag )
{
m_Grid.DeleteRow( nDMIdx );
}
}
|
|
|
|
|
reddy harish wrote: Hi Iam using Grid control
What Grid Control?
led mike
|
|
|
|
|
Iam using CGrid control.in this iam facing the problem
|
|
|
|
|
|
Hi,
I created a CDateTimeCtrl control on my view. It is a 24 hour time format. But it still displays AM/PM . If it is 24 hr clock them AM/PM is not necessary there. SO I want to remove the AM/Pm text from control. How can I do this?
Regards,
Hemant Kulkarni.
|
|
|
|
|
use CDateTimeCtrl::SetFormat to change this behaviour
nave
|
|
|
|
|
Thanks!
I got the solution
It is just to change the SetFormat() finction and not to pass tt t options in string
|
|
|
|
|
Hello,
porting my sipmle (hope, C++ standard conforming) console programs from VC++ 2003 to VC++2005 I found out that I can't read unsigned int from the stream if there is a comma after it.
...main...{
unsigned int ui=2345;
cin >> ui;
cout << ui; // still will show 2345 on input "1,1"
}
Input "1,1" prevents reading 1 to ui. The reason is that deep inside the num_get class of the VC2005 iostream library thinks that in the current locale comma is thousand separator. But there is no reason for it. (I don't even mention locales in my program, so it should be standard "C" locale.)
Any sensible suggestions? I want (and could before) reading
// This also affects boost::uBLAS library at matrix input.
Regards,
Alex
|
|
|
|
|
wrote: (I don't even mention locales in my program, so it should be standard "C" locale.)
That's a bold (and invalid) assumption. The locale is set by the OS. It's up to the programmer
to ensure that locale-specific functions are behaving as expected.
|
|
|
|
|
Well, thanks for your answer anyway.
In fact, it was a sort of VC2005 bug. Service Pack helped me.
As far as I know, the C++ program should start with standard "C" locale no matter the OS reports.
Best regards,
Alex
|
|
|
|
|
|
Thank you very much for the info!
As I mentioned in prev message, SP1 fixes the bug.
Regards,
Alex
|
|
|
|
|
Could any1 plz tell me how can i get current time in milliseconds.
thanks.
|
|
|
|
|
ikbahrian wrote: get current time in milliseconds.
SYSTEMTIME st;
GetSystemTime(&st);
I hope this helps.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Hi. Im using VC6 and trying to swap byte as the file is little endian.
<br />
while (j < 20)<br />
{ <br />
array[j] = file.get();<br />
j++;<br />
}<br />
<br />
j = 0;<br />
<br />
for (i=0; i<10; i++)<br />
{<br />
swap[i] = ((int)array[j+1] << 8) + array[j];
j = j + 2;<br />
}<br />
Is the swapping method correct? Coz I cant seem to get the correct ans.
|
|
|
|
|
array is a char array ? and swap is an int array ? int is four bytes, not two. Try a short array, or just swap in place
for (i=0; i<10; i+=2)<br />
{<br />
byte temp = array[i];<br />
array[i] = array[i+1];<br />
array[i+1] = temp;<br />
}<br />
<br />
That's more efficient than doing shifts as well, I would presume.<br />
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
yeah. array is a char array and swap is an int array.
Im opening a file stream to read in some bytes like: 2E FA CC F6 9F FC and store it in array. So since its little endian, I want to swap the position of the first element of array with the position of the second element of array. And then store both array[0] and array[1] into int swap[0] to do some calculation.
That can be done right? since int is 4 bytes which is equalvalent to 2 char.
What is the best way to do that?
|
|
|
|
|
ReturnRain wrote: since int is 4 bytes which is equalvalent to 2 char.
No, a char is always one byte.
|
|
|
|
|
ReturnRain wrote: What is the best way to do that?
As Mike said ( and I said before him ) a byte is a char. They are the same thing. Do what I suggested in the first place.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Say I have a string key from an INI file. What is the best way to instantiate an object depending on this key? Something like:
if (strKey == "cat") m_pPet = new CCat();
else if (strKey == "dog") m_pPet = new CDog();
else if (strKey == "monkey") m_pPet = new CMonkey();
...
When the list of classes getting longer and longer, the above way is too tedious and hard to maintain. I thought about runtime information but don't know how to tackle this problem with that.
__________________________
S.C.
|
|
|
|