|
Hi all,
i'm sorry if my request was already discussed in this site but for now i don't find the information that i need.
I'm working on a existing SDI project inside MFC VC 6.0.
I need to make a window that open with variable dimensions and fields, depending on the information that i pass to it. In other terms i need to have a window that change in accordance of different user input (objects clicked with composition defined at runtime).
The possible fields to show in the window are texts (of a variable size and font) and image (.bmp).
My ultimate target is to create a window that have a structure that can be later "simply" printed.
My problem is the choice of the object(s) to use: i have start using the Dialog wizard of MFC but it seems limited. I don't know if it is the better way to make it... I don't know if it is better to make a child frame window. I think that probably there are additional components/class/library on the net that can do that, but i don't find it for now.
Thanks in advantage for all the suggestions.
|
|
|
|
|
|
Thanks for the quick answer but it was not useful. I'm pretty sure that on the net there are answers to my question, but the problem is to find the one that works well and exactly as i need.
Now, i have modify the MFC example DLGTEMP and i have understand how to set dinamically the dimension of a Dialog, and how, where and whom string-based controls (static text, buttons, edit box,etc) to put inside it, at run-time.
My first trick is that i don't know how to set different fonts inside my dialog.
My second problem is to find a simply method to load dinamically bitmap from a file (.bmp) and to show it inside my dialog in a position decided at run-time. I see some projects, inside the CP site, to load and manipulate image file but they seems too much complex for my need.
Does exist controls that i can use inside dialogs as a dynamic container for others controls?
Thanks for every non banal suggestions
|
|
|
|
|
I have a C++ dll built in VS 6, which uses STL. I am working on a C++/CLI wrapper over this old dll because I need to used it in .NET.
In short it does not work due to some Side-by-side assembly error. So I checked the dependencies using dependency walker. The old dll requires the msvcr60* dlls. But when I load the wrapper dll instead, the system will load the latest msvcr80* dlls, which is correct for the wrapper version. However the dependency walker cannot resolve some methods from the old dll.
“Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.”
Is it possible to load 2 different version of MS C Runtime simultaneously for the same dll?
|
|
|
|
|
i want to create transparent window,but no use 'WS_EX_LAYERED' and 'SetLayeredWindowAttributes' Func
thank you
|
|
|
|
|
|
|
|
Hi...
Can anyone tell me hoe to convert _TCHAR* to long..
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
_TCHAR *csTest;
I want to convert it to long..
plz help me
thank you
manju
Hi..
I am Mnaju.I have Completed my B.E Computers Science.Lokking for a job.I am interested in VC++
manju
|
|
|
|
|
See into msdn for
atol, _atol_l, _wtol, _wtol_l functions.
Is this you want?
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
You can use this also:
TCHAR *x = "1252655";<br />
long val;<br />
sscanf(x, "%ld", &val);<br />
Manish Patel.
B.E. - Information Technology.
|
|
|
|
|
you should certainly learn what a TCHAR is.
your code has 50% of chances to crash.
manish.patel wrote: TCHAR *x = "1252655";
TCHAR* x = _T("1252655");
manish.patel wrote: sscanf()
WTF !
sscanf() is not TCHAR aware... it handles only ansi strings
|
|
|
|
|
TCHAR *csTest = ...;
long lValue = _tcstol(csTest, NULL, 10);
|
|
|
|
|
I am working on this little VC++ 6.0 simple dialog-based application.
No matter whatever I change about the styles etc I only get a combobox
that at launch being clicked shows a drop down cell (one cell) that shows one item with a spin
control on the right corner instead of a full list of items. Of course I can use
the spin control to go through all the items, but it's kind of annoying when
I can simply pick easily from a drop list that shows everything at one time.
how can I solve that problem
Trioum
|
|
|
|
|
Open your dialog in the resource editor and click on the arrow of the combobox, there you'll be able to adjust the height of your drop 'region'.
|
|
|
|
|
u can solve this by increasing the size of the combo box.
|
|
|
|
|
These days, our team will launch a new project. one of our team members suggested that we should use Borland's C++ builder to write the UI(because it's easier than VC), and Visual C++ to implement business logic code.
I'am not sure whether this is a reasonable suggestion. I always think those two compilers will generate different C++ object layout in memory , so they can't work together.
Want your ideas, very urgent. Plz
A Chinese VC++ programmer
|
|
|
|
|
I'll suggest you to use either VC++ or BC++. By mixing and matching, you'll welcome pain. And I don't think that UI designing is a real daunting task if you use MFC.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Thank you!
Yes, I learned that different compilers will generate different binary even if they compile the same c++ class.
So I object to mix IDE.
A Chinese VC++ programmer
|
|
|
|
|
You can get struct and class layouts to match by using the appropriate #pragma s, but I agree that picking one compiler is probably the best choice.
Steve
|
|
|
|
|
Hi
I want to imort dll through dynamic link in vc++ 6.0.
I know static link dll, giving the lib file in
projects->setting->link->lib path and Store the dll file in system directory. And by using “using namespace “ we can access
all the function in the dll automatically.
Now I want to know how to link dll dynamically. There are some example in google search, even I could not understand that. If you give any suggestion (step by step)or any simple example ,its very useful for me.
Regards
shakumar
shakumar
modified on Thursday, May 22, 2008 5:21 AM
|
|
|
|
|
DLLs are simple - Part 1 to 4[^]
See the DLLs and Assemblies section in this page by Hans Dietrich[^]
Also, see DLLs and Assemblies[^] under general programming.
Additionally, read in MSDN about LoadLibrary(), GetProcAddress().
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Dll's are always dynamically linked (dll stands for dynamic link library). So what's your question exactly ? Why don't you want to use the static lib provided with the dll ? (BTW this doesn't contain the code of the dll but only information about how to load the dll, basically).
You can also use LoadLibrary to load the dll and then use GetProcAddress to retrieve the address of a specific exported function of your dll. But this is a bit more complex. The main advantage is that you can handle the error when the dll is missing the way you want (and not simply have an error message saying that the dll is missing and then exit the program).
|
|
|
|
|
Thanks for your reply
As i said above ,in my programme I used shell32.dll, I import the dll through project->setting->link->giving lib path ”shell.lib”. it automatically(ctl+tab) it give the function “SHFILEOPSTRUCT.”
I want to load dll at runtime ,ie: giving the path of the dll through the code.
My doubt was when I loading dll at run time , how can I access the function from dll because at run time only dll will import, so we cannot know what are the function is available in dll. Will all the dll can import(dynamic) like this.
It may be simple for u, for me it is not understand, so give u’r suggestion.
Regards
shakumar
shakumar
|
|
|
|
|
shakumar_22 wrote: I want to load dll at runtime
It WILL be loaded at runtime. That's the purpose of the dll. As I said in my previous post, it's not because you link against shell32.lib that you are statically linking. The lib file only contains information about the way to load your dll but your dll will still be loaded at runtime.
The only thing you have to make sure is that in your project settings, you choose the runtime library as a dll: (for VC2005) open your project properties -> C/C++ entry -> "Code generation" -> "Runtime Library" and there select "Multi-threaded Debug Dll" (or "Multi-threaded Dll" if you are in release mode).
|
|
|
|