|
Hi.
I am trying to make some reusable GUI components for several desktop application projects. These projects are all Windows (Win7), Visual Studio, C++ based. What do you think would be the best way to approach this problem?
Right now i was thinking about one of these 2 ideas:
- MFC ActiveX Control.
- MFC extension Dll.
So far ActiveX has the benefit of being able to be integrated directly in the VS resource editor and this would make the integration easier.
On the other hand, ActiveX would allow only 1 GUI component per .OCX (am i wrong here? is it possible to incorporate more that 1 control in an .OCX file?) and this would mean that i would have to distribute a lot of .OCX files and it would just not look right.
Can you tell me if ActiveX is still considered a "modern" way of doing things? I wouldn't want to use something that is about to be deprecated.
Thanks.
|
|
|
|
|
|
RefuseResist13 wrote: is it possible to incorporate more that 1 control in an .OCX file? Yes.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Can some one help me with a travel salesmen problem code in c or c++ , Is urgent. Thanks
|
|
|
|
|
It is not urgent, and no one is going to do your work for you.
|
|
|
|
|
hey , be kind, am here to learn.
|
|
|
|
|
Its not looking like you are here to learn.
This forum is to help you if you have any issues in the code which you have tried.
And for your information, everybody here in this forum is always kind, they are here to share their knowledge.
|
|
|
|
|
Then learn how to ask a question properly, as pointed out in your duplicate of this question below.
|
|
|
|
|
What exactly are you learning if someone does the work for you? Hint: starts with not, ends with hing.
I would suggest changing your course of study. CompSci is obviously not in the cards for you.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
give it a try yourself and then if you have problem(s) post your code with a description of the error.
Then someone will probably help.
In general, the CodeProject members will help you, but they won't write programs for you. You will learn more this way.
modified 16-Dec-14 18:07pm.
|
|
|
|
|
No, no one will write all the code for you. However, we would happily help you if you showed us where you were stuck.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Can some one help me with a travel salesmen problem code in c or c++ , Is urgent. Thanks
|
|
|
|
|
See here[^].
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
Need someone that can write and paste the code here , using Hamiltonian path , all i need to find is the shortest distance of the Hamiltonian path
|
|
|
|
|
Again, see here[^], pay particular attention to #2.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
|
|
|
|
|
According to the Wikipedia entry on Hamiltonian path problem[^] it is far from being a trivial task, I strognly doubt you can meet your urgency requirements.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite
|
|
|
|
|
No, no one will write all the code for you. However, we would happily help you if you showed us where you were stuck.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I have a mfcShellTreeControl, but I only see the folders.
I want to see is that the files in the folders within folders.
More precisely, I would see only the .txt file.
Can anyone help?
|
|
|
|
|
This is not an Italian board. Speak type English, please.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
In my CView::OnDraw function, the CDC that is passed in has its origin in the top left. Is there any manipulation I can do to reorient the origin to the lower left?
Solution: Use the SetWindowOrigin() function along with the SetMapMode() function.
The difficult we do right away...
...the impossible takes slightly longer.
modified 13-Dec-14 20:09pm.
|
|
|
|
|
Hello,
I have been using controls in VC++ 6.0 for years without any particular problem.
This time I wanted to shift to VC++ under VS2008, using unmanaged code .
I thought the same code that creates a trivial main window, and then the simplest Static control in the main window, would work well with VS2008 too.
It doesn't seem so .
I am wondering what's wrong with the following snippet :
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);
if (!hWnd)
{
return FALSE;
}
hLabelPath = CreateWindow ((LPCWSTR)"LABEL", (LPCWSTR)"Path", WS_CHILD | WS_BORDER | SS_OWNERDRAW, 10, 10, 100, 100, hWnd, 0, hInstance, &DIS);
i = GetLastError ();
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
I can see the main window appearing with the menu and all the rest, but the Static control doesn't appear.
I get a NULL handle as a return from its CreateWindow (). The error code is 1407, appearently meaning that the control class ("Static") is unknown.
I have been seaching all the MSDN documentation without finding an useful hint.
What's even stranger , the above code works perfectly under VC++ 6.0.
Any idea ?
Thanks
modified 11-Dec-14 4:04am.
|
|
|
|
|
To avoid confusion, in the original snippet the class declared in the CreateWindow is "Static", and not "Label" as stated . Sorry for the mistake .
|
|
|
|
|
You cannot simply use typecasting.
Try L"Static" .
«_Superman_»
I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) (October 2009 - September 2013) Polymorphism in C
|
|
|
|
|
hLabelPath = CreateWindow ((LPCWSTR)"LABEL", ...
You cannot use a cast to convert an ASCII string to Unicode. Use the correct form, either L"string value" or TEXT("string value") .
|
|
|
|
|
Thank you both Superman and Richard ... now the Static appears correctly ...
|
|
|
|