|
I am not sure this is possible, but I would like to create a basic dialog that serves as a template for other dialog boxes. Ideally Ill make the first base dialog with the size and properties I want.
At this point I know I could then go into the resource editor and add a copy of it and work on the copies. However, I would like to have the ability to then go back and make a change to the template and have the other dialog boxes take on the changes from the template dialog. This add copy method will not do that.
|
|
|
|
|
My gut reaction with MFC, which is all I know for UI dev, is no. The dialog script file is just plain crude and doesnt have inheritance built in.
|
|
|
|
|
What would you like on your template? ...really will depend on that... but yes, you should be able to do that, only not through the resource editor, you'll have to do it all through code pretty much.
|
|
|
|
|
I figured as much. I was just hoping there was some mechanism I did not know about. I am not sure what all I want, other than for all the dialogs to have the same size and base styles. It may change which will be a PITA if I have to redo a bunch of dialogs because someone decides they want them just a little wider or some new logo graphic of a different size.
|
|
|
|
|
If you're good with MFC or the WinAPI, should be easy to do if the constant is the size and logos. That's easy to accomplish, except when you want to use your template, anything that goes on it will have to be defined programatically rather than though the editor. That will probably only be hard the first time. The somewhat annoying issue with that is the variable text sizes on Win Vista/7 can make drawing things a pain because you have to size anything containing text according to the text size.
|
|
|
|
|
|
DeepT wrote: At this point I know I could then go into the resource editor and add a copy of it and work on the copies. However, I would like to have the ability to then go back and make a change to the template and have the other dialog boxes take on the changes from the template dialog. This add copy method will not do that.
i have done that, however i store my template in XML files and load them on runtime. Little difficult and also no UI is available for same, so you have depends on your Gut feeling and principle of coordinate geometry!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I have always wanted to design a software with a great and exotic user interface which includes non-standard and uncommon UI components such as tabs, bars, button and so on. Now, I as eager to find a professional toolkit or suite which helps me to quickly design and use marvelous and inventive user interface in another project like VC++ or Qt.
Does anybody know a product like that?
The examples for the software interfaces I really like are Kaspersky Pure 2012, Folder Lock or even Babylon. All these have a different and pretty UI which is not easy to creat when using tools such as Visual Studio or Eclipse.
|
|
|
|
|
Majid Salsal wrote: which is not easy to creat when using tools such as Visual Studio or Eclipse.
You can create anything you like in these development environments; the difficult bit is writing the code.
|
|
|
|
|
Remember that C++ (and any other object oriented language) gives you the ability to subclass, so if there's a UI toolkit that gives you something similar to what you want/need, you can always subclass the components to get a personalized or polished look and feel. For example, in MFC, there are a variety of buttons and toolbars already available, but I've derived my own classes from some of these if I didn't like my options already there. It may be a bit difficult the first time you do it, but it's actually relatively simple after that.
|
|
|
|
|
Don't. All those "fancy" UI are really hard to use for normal users.
Anyway, all those UI are based on CWnd and are all user drawn and handled.
Good luck.
Watched code never compiles.
|
|
|
|
|
Familiarity is always best for the average consumer...
|
|
|
|
|
Majid Salsal wrote: Does anybody know a product like that?
Rule one. Dont make your UI garish. People dont like it.
Rule two. Make it works like everyone else's. That way its predictable, people like that.
And as for a tool, I always liked MFC and its dialogue wizards.
|
|
|
|
|
I hate the wizards, but I do like MFC, it's nice to have consistency in a user interface. You don't want your user spending hours trying to figure out where to configure things rather than doing what the program is intended to do.
|
|
|
|
|
Albert Holguin wrote: I hate the wizards
yeah? I like them. Tying controls and data variables to the on-screen object, for me its really quick coding.
Of course you need to know how to dig into the guts of MFC a bit to make it fly, but it gives me 90% ogf what I want quick. I like it.
As for the rest of your post, 100% agree.
|
|
|
|
|
If you are designing for computer geeks, go ahead, but I would not call that "professional", just geeky.
As pointed out by others,"professional" means user friendly and not necessary flashy.
I think the software industry has accepted certain UI formats, I would not call it standards, and did it because of consumer acceptance, not by some knowledgeable geek fancy.
But whatever floats your boat...
|
|
|
|
|
Whats wrong with using the MFC Feature Pack[^]? It is available with Visual C++ 2008 Service Pack 1 and beyond and most of the cool stuff works with XP and above.
|
|
|
|
|
hello guys... I made a small application in VC2010 in Windows 7. Long story short, when I first tried to use it on Windows XP, it gave me an error saying it could not find a component (I don't remember which one). I searched for that and after couple of hours I assumed that I should install .Net Framework 4.0, and VC 2010 Redistributeable Package. I did that but now it gives me this error
Mfc100d.dll Not Found
Now installed a program which, it claimed, installed Mfc100d.dll. But still problem remains. What could be wrong? Thnx
This world is going to explode due to international politics, SOON.
|
|
|
|
|
Mfc100d.dll is the debug version of the MFC library and is not distributed by default. Rebuild your project in release mode to run on alternate machines.
|
|
|
|
|
I go with what Richard MacCutchan told. Debug binaries are not distributable. But to run the application in debug mode, you can copy Mfc100d.dll to the location where your exe and other dependent binaries resides. This will solve the problem.
When somebody is looking for a dll and complains it is not there, then dll is not available the in the application's working directory, or the directories listed in the environment variable.
http://www.mstecharticles.com/
|
|
|
|
|
sirama2004 wrote: http://www.mstecharticles.com/
Hi Buddy,
I went to your site, look full of information, however if you reduce the advertisement content it would look nice, otherwise it's look more of advertisement site then technical article site
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thanks Alok. I spend 50% of my 1 month salary on CRY at the year end. I am happy to see Supprt Cry in your Signature
|
|
|
|
|
In addition to what Richard said (build in release mode), you have a few alternatives for distributing MFC with your application (if there's a dependency there):
0. Use MFC as a DLL and distribute using Microsoft's redistributable package installer[^].
1. Built in the MFC as a static library (will make your build larger but you'll only have to distribute your exe).
2. Distribute the DLL yourself using an installer such as InstallShield (or something similar).
3. If you don't use MFC at all in your project, disable the dependency.
|
|
|
|
|
This is why I don't like the Microsoft(R) .NET Framework, users have to download an add-on to run just ONE program, then it gives them errors ....even though it's easier on the programmer's side when the purpose of that framework was to make programming easier, on the customer's side it only gives complaints, that the software is not neat and tidy.
Simple Thanks and Regards,
Brandon T. H.
Programming in C and C++ now, now developing applications, services and drivers (and maybe some kernel modules...psst kernel-mode drivers...psst).
Many of life's failures are people who did not realize how close they were to success when they gave up. - Thomas Edison
modified 22-Jun-12 3:48am.
|
|
|
|
|
I did C structs a few years ago at uni.
I am trying to avoid malloc for all structures in the tree- since I would need to be sure it has all been freed.
In the first two ways without malloc but both end up using local stack variables which ‘disappear’ and are not kept in memory.
But Only the malloc response has the correct answers after the function call.
#include <stdlib.h>
#include <stdio.h>
struct thing1
{
int n;
char* word;
};
struct thing2
{
int n;
char* word;
struct thing1 *node1;
};
struct response
{
int n;
struct thing2 *node2;
};
int getDynamicResponse(struct response* res);
int getResponse(struct response* res);
int getRefResponse(struct response* res);
struct thing1 getThing1();
struct thing2 getThing2();
void refThing1(struct thing1* out);
void refThing2(struct thing2* out);
void showThing1(struct thing1 *t1);
void showThing2(struct thing2 *t2);
void showResponse(struct response *res);
struct thing1 getThing1()
{
struct thing1 t1;
t1.n = 1;
t1.word = "thing1";
return t1;
}
struct thing2 getThing2()
{
struct thing2 t2;
t2.n = 2;
t2.word = "thing2";
return t2;
}
void refThing1(struct thing1* out)
{
struct thing1 t1;
t1.n = 3;
t1.word = "refthing3";
*out = t1;
}
void refThing2(struct thing2* out)
{
struct thing2 t2;
t2.n = 4;
t2.word = "refthing4";
*out = t2;
}
void showThing1(struct thing1 *t1)
{
printf("thing1\n");
if(t1)
{
int i = t1->n;
if(i) printf("n=%d\n", i);
if(t1->word) printf("word=%s\n", t1->word);
}
else printf("Thing1 NULL");
}
void showThing2(struct thing2 *t2)
{
printf("thing2\n");
if(t2)
{
printf("n=%d\n", t2->n);
if(t2->word) printf("word=%s\n", t2->word);
if(t2->node1) showThing1(t2->node1);
}
else printf("Thing2 NULL");
}
void showResponse(struct response *res)
{
if(res)
{
printf("response\n");
printf("n=%d\n", res->n);
if(res->node2) showThing2(res->node2);
}
else printf("Response NULL");
}
int getDynamicResponse(struct response* res)
{
printf("\nwith malloc\n");
printf("n=%d\n", res->n);
struct response *tmp;
tmp = (struct response*)malloc(sizeof(struct response));
tmp->n = 12345;
tmp->node2 = (struct thing2*)malloc(sizeof(struct thing2));
tmp->node2->n = 2468;
tmp->node2->word = "malloc1";
tmp->node2->node1 = (struct thing1*)malloc(sizeof(struct thing1));
tmp->node2->node1->n = 987;
tmp->node2->node1->word = "malloc2";
*res = *tmp;
showResponse(res);
printf("***************************\n");
return 0;
}
int getRefResponse(struct response* res)
{
printf("\nby pointer ref\n");
printf("n=%d\n", res->n);
struct response out, *pout;
res->n = 888;
struct thing2 t2;
struct thing1 t1;
refThing2(&t2);
refThing1(&t1);
struct thing1 *p1 = &t1;
struct thing2 *p2 = &t2;
pout = &out;
pout->node2 = p2;
pout->node2->node1 = p1;
*res = out;
showResponse(res);
printf("***************************\n");
return 0;
}
int getResponse(struct response* res)
{
printf("\nlocal stack\n");
printf("n=%d\n", res->n);
struct response out, *pout;
res->n = 99;
struct thing2 tmp2 = getThing2();
struct thing1 tmp1 = getThing1();
struct thing1 *p1 = &tmp1;
struct thing2 *p2 = &tmp2;
pout = &out;
pout->node2 = p2;
pout->node2->node1 = p1;
*res = out;
showResponse(res);
printf("***************************\n");
return 0;
}
int main(int argc, char **argv)
{
printf("structs\n");
struct response r1, r2, r3;
r1.n = 51;
r2.n = 52;
r3.n = 53;
getResponse(&r1);
printf("=====================\n");
getRefResponse(&r2);
showResponse(&r2);
printf("=====================\n");
getDynamicResponse(&r3);
showResponse(&r3);
printf("=====================\n");
getchar();
return 0;
}
|
|
|
|