|
Is it possible to create a class with template parameters that is derived from a CView and then dynamically create it in an MDI/SDI framework? If so, how would one go about doing this?
Thanks!
|
|
|
|
|
this is a two-part question. First, I'd like to know how I can allow the user to drop down the combobox's list without being able to select anything (because they're viewing a record and shouldn't be allowed to actually change the selection while in browse mode and I don't want the combo disabled). The second question is what function should I override to stop the user from closing the CFormView screen if they're in edit mode? I've tried the WM_DESTROY and the WM_CLOSE, but they're still able to close the form. Any help is appreciated. Thanks in advance.
[insert witty comment here]
bdiamond
|
|
|
|
|
bdiamond wrote:
...how I can allow the user to drop down the combobox's list without being able to select anything (because they're viewing a record and shouldn't be allowed to actually change the selection while in browse mode and I don't want the combo disabled).
Having a screen where some of the controls are enabled, other controls are disabled, and none of them are updateable, is a bit confusing. The selection in the combobox should be that of the current record, and the combobox should be disabled.
bdiamond wrote:
what function should I override to stop the user from closing the CFormView screen if they're in edit mode? I've tried the WM_DESTROY and the WM_CLOSE, but they're still able to close the form.
What if someone got into edit mode but changed their mind?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Okay, I think you're right about the combobox being disabled, but I just hate the way it looks when it's disabled. Is there any way to have it disabled but not have that funky color?
With most of the projects I've done for my company (mostly in VB), it has usually been policy to not let a user exit a screen while in 'NEW' or 'EDIT' mode. If they're in either one of these modes, they have to click 'CANCEL' before they can exit the app. This is just a small in-house program I'm writing, but I was trying to stay consistent with what we've been doing.
Thanks for all your help!!
BTW, are there any free online tests you know of that I could use to test my C++ knowledge? I'm the only one at my company who knows any C++, and I'm self-taught (besides what help programmers like yourself have given me the past few months).
[insert witty comment here]
bdiamond
|
|
|
|
|
bdiamond wrote:
Is there any way to have it disabled but not have that funky color?
I'm not sure to which color you are referring, but disabled controls on my machine are gray. Maybe it's my color scheme.
bdiamond wrote:
With most of the projects I've done for my company (mostly in VB), it has usually been policy to not let a user exit a screen while in 'NEW' or 'EDIT' mode. If they're in either one of these modes, they have to click 'CANCEL' before they can exit the app. This is just a small in-house program I'm writing, but I was trying to stay consistent with what we've been doing.
Understood. When in New or Edit mode, does a modal dialog have focus, with the application sitting in the back? If so, how does one go about closing down the application without first dismissing the dialog?
bdiamond wrote:
BTW, are there any free online tests you know of that I could use to test my C++ knowledge? I'm the only one at my company who knows any C++, and I'm self-taught (besides what help programmers like yourself have given me the past few months).
You could try brainbench.com[^]. I've taken one test. They last about 45 minutes.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have a problem when starting any application from my VC++IDE (running or steppping), a 30 seconds delay occurs before the program starts.
Do you have any idea ? (this is not a application defined delay )
Tx for any help.
GuimaSun
www.nexsun.com.br
NEXSUN TechZone
|
|
|
|
|
If it is a large project with lots of files, the IDE is most likely going out and checking dependencies. What keystrokes/menu are you using to start the application?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
If ur project contains more files then usaually ur workspace will be very slow
After you open ur project, close all the files, and kept open only the required file which makes it faster.
vidya
|
|
|
|
|
My current project has nearly 450 files. The IDE is fine except for the very first compile. It is at this time that a dependency check is done (and cached). All subsequent compiles behave just like any of my smaller projects.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Guys, the problem is the same with any project, even with a "hello world" with just one source file. Just typing F10/F5 after compile\link and the delay appear
Tx anyway.
GuimaSun
www.nexsun.com.br
NEXSUN TechZone
|
|
|
|
|
Hmmm, there is the remote possibility that the computer's AV software is getting in the way. If no AV software is installed, I'm out of guesses.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I have some experience programming in C# .NET but am new to C++. Could somebody please tell me what the difference between "->" and "." are in C++, which is to say:
when is it appropriate to use
someclass.whatever
and when is it correct to use
someclass->whatever.
Thanks!
|
|
|
|
|
Nevermind, I found it in the documentation. Thanks anyway!
|
|
|
|
|
crushinghellhammer wrote:
someclass.whatever
CSomeClass myClass;
myClass.whatever;
crushinghellhammer wrote:
someclass->whatever
CSomeClass *myClass;
myClass->whatever;
The "." operator is used to directly access the object's members.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
-> dereferences a class object pointer.
SomeClass
{
public :
int a;
};
So if you have SomeClass *oSomeClass = new oSomeClass();
Accessing member variable a is done by first dereferencing the pointer and using the '.'operator: (*oSomeClass).a = 5; which is equivalent to the statement oSomeClass->a = 5;
|
|
|
|
|
In VC6 when creating a CFormView-based app I could still utilize the printing capabilities of the Doc/View architecture. In .Net when I started my app I chose to enable Print/Print Preview, but since I selected CFormView as the base class for my view it told me that I wouldn't be able to have printing functionality. Does anyone know a way around this? Thanks
[insert witty comment here]
bdiamond
|
|
|
|
|
Does anybody know where I can chat with programmers or wizkidz to help me with some questions?
Please give me some links or mirc-channels, thank you very much.
|
|
|
|
|
Anonymous wrote:
Does anybody know where I can chat with programmers or wizkidz to help me with some questions?
I've heard CodeProject.com is good for this, but can't say for sure!
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi,
Sorry if this is off topic. Is there a free windows equivalent of syslog you would recommend, preferably one that also works with linux.
Maybe it doesn't exist but what I'm looking for is a library that will allow me to call a function which will do just the right thing depending on which platform it is running on.
Thanks
Hua-Ying
|
|
|
|
|
|
Thanks for the link, it is interesting to see alternatives out there.
Maybe it doesn't exist but what I'm looking for is a library that will allow me to call a function which will do just the right thing depending on which platform it is running on.
Hua-Ying
|
|
|
|
|
For a example I want to create a child dynamic ListBox control like ComboLBox.
ComboLBox is a system class and can we use it?
Or another way?
|
|
|
|
|
I have a dual monitor pc that I need to PROGRAMATICALLY turn extended desktop on/off as needed.
In other words, I need to perform the same function as RT. mouse-click Desktop,
Properties->Settings, then turn the "extend my Windows Desktop on to this monitor" checkbox on/off as needed.
Please note: I do not want to simply change my application window size to accomplish this. I must be able to turn extended desktop on/off programatically.
Can anyone help me please??????
|
|
|
|
|
Search the machine's registry (HKLM hive) for a key named TwinViewDisabled. That's where I would start.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hummm. I am using Windows XP Home. Probably should have mentioned that. I cannot find the Reg Key you are talking about (TwinViewDisabled).
|
|
|
|