|
4288 wrote: Could it be a solution?
Depends on what you want to do. How about describing your problem from a different angle? Instead of picking a specific implementation/layout maybe tell instead about the wanted functionality and user experience.
|
|
|
|
|
Id like to muse a child window as a splitter window on the right
The problem is that this child window can be taken (by resizing right side)over another child window with controls.. and the problem above rises
Maybe moving the child on right and preventing user from moving it..?
---
|
|
|
|
|
For me a splitter window would resize controls in a window... so if the controls didn't overlap in the beginning they also will not later (after the splitter bar was moved).
If you haven't looked into a splitter window implementation here on CodeProject (or another MFC variant), I would suggest trying that.
Hope it helps
/M
|
|
|
|
|
I will try it, any problem I will let you know.
And if my project will be good, I'll post it here on cp
---
|
|
|
|
|
Mark Salsbery wrote: Mark Salsbery
Microsoft MVP - Visual C++
Mark, what is the secret behind making the nice coffee smiley? Hmm... :coffee:
|
|
|
|
|
if I told you it wouldn't be a secret *cough*java*cough*
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
:cappuccino: :espresso: :caffeine: ...
Thx
|
|
|
|
|
Is there a way to remove the maximize box from the view title bar in a multidoc app? I used DeleteMenu(*) or ModifyStyle(*) to disable the maximize button but these do not remove the button from the title bar. Thanks in advance.
|
|
|
|
|
When you create the window dont set the WS_MAXIMIZEBOX style, if your using MFC check under the CWnd::PreCreateWindow method of your windows class and you can change the style from there before the window is created.
Gavin Taylor
|
|
|
|
|
Hmmm, I tried that in the CMainFrame::PreCreateWindow(CREATESTRUCT& cs) by setting:
cs.style &= ~WS_MAXIMIZEBOX
before the call to CMDIFrameWnd::PreCreateWindow(cs) which disabled the maximize box but did not remove the button from the title bar. Am I doing that wrong?
|
|
|
|
|
|
I'm using VC 6++ and MFC. The project has some fortran modules in it.
I get linker errors like these:
dfor.lib(matherr.obj) : error LNK2005: __matherr already defined in msvcrtd.lib(merr.obj)
libc.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module
libc.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module
and more
also
BUBBC.OBJ : error LNK2001: unresolved external symbol _THEPAR@4
BUBBC.OBJ : error LNK2001: unresolved external symbol _EXPARG@4
BUBBC.OBJ : error LNK2001: unresolved external symbol _BDOSE@8
where bubbc.for is the fortran file.
Any input is appreciated.
thnaks,
sb
|
|
|
|
|
Hi,
Try changing your Fortran to debug multithreaded and then try integrate it with VC++.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi Suman,
The fortran modules are just .for text files that reside in the project. They aren't compiled separately and linked. If I make a win32 console app and include these .for files as source files, the app compiles, links and runs fine. I have Visual Fortran on the machine and Visual Studio seem to know what to do in the case of a win32 app. But for an MFC app, it gives linker errors. I dont have a separate fortran project.
thanks,
sb
|
|
|
|
|
Is this correct? What i am attempting to ensure is that the arrErrCode[i]var is being passed by reference to the TestMyStuff method. The question is by using a LPTSTR vs. an &, i should get the same result correct?
Main
{
For (int 1= 0; i<2; i++)
{
arrErrCode[i] = new TCHAR[16];
ZeroMemory(arrErrCode[i], 16 * sizeof(TCHAR))
if (TestmyStuff(arrErrCode[i]))
//do something here with arrErrCode[i]
}
}
BOOL TestMystuff(LPTSTR szCode)
{
StrCpy(szCode, TEXT("000"));
return TRUE;
}
|
|
|
|
|
LCI wrote: BOOL TestMystuff(LPTSTR szCode)
That is passing a pointer by value.
led mike
|
|
|
|
|
So if i wanted to do it by reference then i would add an &
to the function definition like :
TestMyStuff(LPTSTR& szCode)
{
}
I have never worked with LPTSTR's so i am just a tad confued with how to pass by reference using LPTSTR
|
|
|
|
|
You don't need it. LPTSTR is just a reassuring name given to a pointer type.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
A LPTSTR is a pointer to a char array. So you don't need to pass it by reference unless you want to change it size (in fact, allocating a new array). If you only wants to modify the contents, then you can pass the pointer.
|
|
|
|
|
LCI wrote: So if i wanted to do it by reference then i would add an &
Yes but the only reason to pass a pointer by reference is to change the value of the pointer (the address). Is that what you need to do? I would not guess that from the code you posted.
led mike
|
|
|
|
|
Of course arrErrCode[i] var is passed by value, anyway, since it is a pointer then things would go on smootlhy (provided you fix all the bugs: your code is a bunch of typos).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hi
There is much confusion, in particular amongst novices, about Pointers, References snd Values when used as arguments.
Using a Value is clear, a copy of the value gets placed on the stack. You can do what you want with it, it will be lost when the stack is cut down when you return from the procedure.
A pointer is also clear, You're passing on the address of some data. That data resides elsewhere, but you're given the access to the original. so Changing the data through the pointer affects the original.
The problem here is that the Pointer may not point at valid memory. This is a condition that can only be checked at runtime. There is no way the compiler can use to check the validity of a pointer at Compile Time.
When you use a Reference, you will get passed the address of the variable to your procedure, and the generated code is identical to passing a pointer. The difference is, that unlike passing pointers, the language syntax and semantics force you to enter the correct variable name.
Hope this helps.
Bram van Kampen
|
|
|
|
|
Hello guys,
I'm trying to build a simple lexical analyzer with Parser Generator 2. I wrote a Lex and a Yacc file and built a *.c and a *.h file with them. As I tried to compile this files I got strange linker errors:
error LNK2019: unresolved external symbol _yywclex referenced in function _yywgettoken
error LNK2019: unresolved external symbol _yywcparse referenced in function _main
fatal error LNK1120: 2 unresolved externals
What can I do against this errors, or do I have to use another compiler?
Thanks and best wishes.
|
|
|
|
|
Hi,
Check if your functions are having same data type for the arguments in header file and c file
Also see if you are having those functions definitions with declaration in header file or forward declaration in C file.
Thanks,
Suman
--
"Programming is an art that fights back!"
|
|
|
|
|
All the function definitions are in the main file defined with prototypes, so I don't think it's something to do with them.
|
|
|
|