|
Hello,
I am working with MDI application in VC++. My view is derived from CFormview. I have many controls on the form view. When I resize the form view, all my controls should be resized and this should work for different screen resolutions.
Can anyone please help me in doing this. Thanks in anticipation of information.
Madhavi
|
|
|
|
|
To test different cardreaders,I wrote a program to do the write/read data test.At first,copy a file of certain size form Harddisk to the cards,and then read the file form every card(s) and campare the data with the source file data.According to the capacity of each
card,I should choose comparative file size from a ComboBox,such as 1MB,32MB,64MB,512MB,1GB,ect.Amd what's more,I can not know what the number my user will input to the ComboBox.So,my question is:If there is a way to let me read 1GB(or some other number>1MB) data from a file(size more small and more better.)?
Thanks!
|
|
|
|
|
momer wrote:
If there is a way to let me read 1GB(or some other number>1MB) data from a file(size more small and more better.)?
Yes, but it's doubtful you can do it all at once (the memory manager is not going to be able to allocate that much contiguous RAM). I would recommend reading it 1MB at a time.
I've not tried it, but I think you can quickly create a file of size N by calling SetFilePointer(..., N, NULL, FILE_END) followed by SetEndOfFile() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
if i have a multi-select listbox that name is m_lstNumber ,how to get the user all selection ?
void GetNumberSelection()
{
int nItemsCount=m_lstNumber.GetSelCount();
BOOL flg=FALSE;
if( nItemsCount==0 )
AfxMessageBox("No Item select");
else
flg=TRUE;
if(flg==TRUE)
{
//display the all select string
}
|
|
|
|
|
Use GetSelItems() .
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
How to call the Java Methods in C++ Application? pl example.
Advance thanks
dadsadasd
|
|
|
|
|
You are talking about JNI I presume?
There's a tutorial on sun here JNI Tutorial[^] or you could stay here on CodeProject: JNI Basics[^]
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
hai,
I'm working on VC++ win32...In my program i'm reading some ascii characters in char[] from say a file. I want to convert the ascii char to decimal value...is there any easy way to do the conversion??pls help...
Thanks a lot.
|
|
|
|
|
|
Here is List of all function thats
Convert strings to double (atof), integer (atoi, _atoi64), or long (atol).
double atof( const char *string );<br />
<br />
int atoi( const char *string );<br />
<br />
__int64 _atoi64( const char *string );<br />
<br />
long atol( const char *string );
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
when we right-click on Windows explorer, we can see a popup menu.
How to add my app on the menu?
I should be something about register, what is that?
thx
includeh10
|
|
|
|
|
Are you referring to associating file types with a program?
This link might help:
msdn link
|
|
|
|
|
it doesn't talk about context help menu of Windows explorer.
includeh10
|
|
|
|
|
One of the sections is on extending shortcut menus.
Debbie
|
|
|
|
|
Michael Dunn has written some excellent articles here on CodeProject about this topic - trying looking for his articles.
What you require is a 'shell extension'.
--
Andrew.
|
|
|
|
|
Andrew,
thanks.
i did read part of his articles (1-9) before - all are in COM.
i really don't like COM.
i think there must be simple way to do that - may be we just need to modify register, similar to doing for double-clicking a file.
cheers
includeh10
|
|
|
|
|
Which file type's context menu are you interested in modifying?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
when we right click a file in Explorer, the munu pops up.
we can see WinZip or "Send to" folder on it.
file extension can be any, i.e. .mytype or .class
includeh10
|
|
|
|
|
There is no single way to do this. If you are wanting to add to a context menu that already exists (e.g., the one that pops up when you right-click a .dll or .cda file), you have one set of steps. For example, if you wanted to add to the context menu of a .dll file, you could save the following to a .reg file and merge it into the registry:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\dllfile\shell\Calc]
[HKEY_CLASSES_ROOT\dllfile\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe" If you are wanting to create a new context menu for an extension not yet registered (e.g., .mytype), you have a different set of steps.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
DavidCrow,
thanks.
does "a different set of steps" mean i must use COM as suggested in previous replies?
includeh10
|
|
|
|
|
Not necessarily. What do you have against COM anyhow?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
i am very interested in the method of "Not necessarily", any comment about it?
cheers
includeh10
|
|
|
|
|
It requires just a few more entries in the .reg file:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.mytype]
@="MyType.Document"
[HKEY_CLASSES_ROOT\MyType.Document]
[HKEY_CLASSES_ROOT\MyType.Document\shell]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc]
[HKEY_CLASSES_ROOT\MyType.Document\shell\Calc\command]
@="c:\\winnt\\system32\\calc.exe" As has already been mentioned, this sort of stuff is explained in Michael Dunn's shell articles.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
you are talking about how to use double-clicking of a kind of file.
i modified register as your comment, but i saw nothing on popup menu of Explorer.
when i double clicked some.mytype, calculator was running.
it is not right answer of my question.
i read Michael Dunn's articles again, i can not find hint about my question.
he added a program to menu folder "send to" of popup menu of Explorer by
::SHGetSpecialFolderLocation(0,CSIDL_SENDTO,&pidl)
i will try to get answer from that point.
cheers
includeh10
|
|
|
|
|
includeh10 wrote:
when i double clicked some.mytype, calculator was running.
When you right-clicked an item that had a .mytype extension, you should have seen Calc at the top of the context menu. The fact that it was bold meant that it was the default option. That's why double-clicking the item started the calculator.
My example was merely that - an example. You may need to extrapolate from the examples to get what you want. Not all shell items are the same so there is no one-size-fits-all solution.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|