|
The App Wizard will generate a non doc/view app for you. Its default architecture will have a MainFrame containing a child view.
a two cent stamp short of going postal.
|
|
|
|
|
Rick,
You are correct. However, I think there's a need for something that explains what that means in practical terms. How are you intended to change that child view to a form view, which is probably what most of us who work off of CDialog want to do..? App/ClassWizard is helpful, but not if you don't know how to work in the architectural style (MFC, no?) that it was written to be built off of.
(I tried creating my own form (via New Form...) for the app - this worked out well, except that the generated formview is intended for dynamic creation, and so you can't just swap its class name out with the child view member that AppWizard created, which does not appear to use dynamic creation)
Put another way... there is good documentation on many of the parts of MFC. I have not yet found good documentation on how the designers intended you to put these parts together to create, for example, a CFormView-based application.
Adam
|
|
|
|
|
Adam, this[^] MSDN link may help if you haven't already seen it.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
You can have formview type interface in sdi application without doc/view architecture...
One simple solution is to create a dialogresource provide a class, set the styles as no clientedege, no caption(just the way the formview dialog will look like)
Then in the OnCreate event after the Cwnd is successfully created, create the dialog as modeless and resize it to client area.
Then handle onSize Event and resize it to the clientarea.
This way you can get it to work.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
Visual C++ 6
can anyone send me a useful link about
1. the hWnd class and its usage .
2. GetDlgItem() and its reverse (i.e, SetDlgItem() if found!!)
|
|
|
|
|
Oriented wrote:
1. the hWnd class and its usage .
hWnd is not a class, it's a window handle.
Oriented wrote:
2. GetDlgItem() and its reverse (i.e, SetDlgItem() if found!!)
Have you checked MSDN?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
You beat me to it....
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
hWnd is not a class, it's a HANDLE. In other words, it's a number that uniquely identifies a window on the system. CWnd is a class in MFC which wraps a hWnd.
There is no such thing as SetDlgItem, from memory you put a control into a window by making that window it's parent.
http://www.msdn.com is a more up to date version of the MSDN than came with your VC6, but the VC6 one just might be better for you. Install it now.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
I want to know how can i assign infinity to a variable?
|
|
|
|
|
infinity is not a number, so you can't!
you can just use very big values using custom libraries for very big numbers.
Don't try it, just do it!
|
|
|
|
|
Since infinity doesn't exist (i.e., there's always one more number after the biggest number you can think of), how can you assign it to a variable? You can, however, assign a maximum value to integral types like:
int i = INT_MAX;
char c = CHAR_MAX;
unsigned long ul = ULONG_MAX;
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
It's easy, just use the infinity symbol. If you can't find it, take your keyboard back and demand a replacement.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Brilliant!!
Don't try it, just do it!
|
|
|
|
|
Where is the any key?
INTP
|
|
|
|
|
It depends.
If you value is a float or double , then it may be possible, take a look at:
numeric_limits<float>::infinity()
If your variable is an int, long or anything like that, then it is NOT possible to do - no matter what you set the value to, you can add to it and change it. (Although if it goes beyond the maximum value it can hold it will wrap around to a really big negative number!)
Now, if you want to know how to create an infinite loop, I've done that many times before...
Remember, even if you win the rat race, you're still a rat.
|
|
|
|
|
Navin wrote:
if you want to know how to create an infinite loop, I've done that many times before...
Maxwell Chen
|
|
|
|
|
Wouldn't assigning infinity to a number require an infinite amount of time? If you every figure it out, I'll be glad to test for a small hourly wage
The maximum characters for the signature is five hundred. I was wondering how long a five hundred characters message would be, so I decided to make my signature 500 characters long. I'm sure if I had some cool html stuff in my signature, I could eat up five hundred characters, but just typing five hundred characters takes quite some time. The trick I think is finding something to say, but I'm usually a man of few words. So I guess I'll tell you what I've discovered is the secret to life. It
|
|
|
|
|
These functions are driving me nuts. They work about 90% of the time, then fail unexpectedly the other 10% (especially on Windows 98.) In particular GetExpandedName often seems to bomb, and there is no extended error information.
So are there any alternatives or other implementations? I need to be able to expand files compressed with the "compress" utility (typcially, the ones named something like "somefile.ex_")
Thanks.
Remember, even if you win the rat race, you're still a rat.
|
|
|
|
|
These files are compressed in a CAB file.
So two easy ways:
Take a custom CAB lib or call the compress command to decompress them
Don't try it, just do it!
|
|
|
|
|
Well, you have to call "expand" to uncompress them, but that won't work for my situation - many systems don't come with expand.exe (98 systems in particular), so we'd have to distribute it, and not sure if there are any strange licensing agreements.
Custom CAB lib? Tell me where to find it, that's what I'm looking for.
Remember, even if you win the rat race, you're still a rat.
|
|
|
|
|
|
Hello All,
Can anyone tell me that what is the different when declare function like
const char* f();
and
char* const f();
I would like to know what does this two function signature means.
Thanks!
Nachi
|
|
|
|
|
easy, the second don't exist ! lol
in fact, you might want to say
const char* f();
char* f const();
that's simple. the first one returns a const char* when the second one returns a simple char*.
What does the second const mean, you'll ask me !? In fact, that is used in object programming, when you read values in an object, where you don't alterate that object... In brief, it means that you don't modify the members of your objet... you don't need this in pure C so...
see you
TOXCCT >>> GEII power
|
|
|
|
|
Ummm,
You said the second one
char* const f();
does not exist, but if I write this in Visual C++, the compiler does not complain. Also, for the first one, I can actualy return something which is not a const, eg,
const int f()
{
int i = 10;
return i;
}
and it also works in Visual C++ too. And would you mind to tell me why's that?
Thank you very much!
Nachi
|
|
|
|
|
Stop playing silly games in here, returning a const value doesn't make any sense!
Don't try it, just do it!
|
|
|
|