|
Randor wrote: Heh, I remember the birth of PHP. I was not doing any Windows development in the mid 90's and was a Unix developer/sys admin. I haven't done any PHP development in over 10 years I would probably be lost in PHP5. The PHP language itself has come a long way.
So you remember it's birth as a series of Perl scripts and being called "Personal Homepage"? :P I started at the time PHP 3 was released...
Back then I was learning/tinkering in C and C++ in the 1990's, it was only when I started thinking I'd like to make a career out of software development that I looked for an easy enterance. Web site projects were plenty and didn't require a BSc. so I started learning JS, HTML and ASP. I hated ASP, looked for an open source solution and started with Perl which led me to PHP (thank god).
It's annoying to develop in, because of the lack of any standard framework (at least a few hundred available -- with new ones popping up each week) unlike MFC, to provide your application with some structure. When fixing or working on existing applications, it can be like finding a needle in a haystack.
One guys interpretaion of MVC and a front controller, actually turns out to be a extremely tightly coupled application bootstrap, front controller, routing, dispatching and more, in one monolithic class over 1000 lines.
Lots of bad practice in PHP but there is a small community dedicated developers trying to change that by introducing patterns, OO best practices, architecture and more.
Zend framework is a good start, with it's design issues and all.
Cheers,
Alex
|
|
|
|
|
Hi
I am dyanamically creating a class inherited from CScrollView.
The restore button of this view should be disabled so that the user may not be able to click on it.
Please help me.
Thanks and regards
Deepu.
|
|
|
|
|
|
I have dynamically created the window.Now I want to disable/remove the Restore button ie (Minimize,Maximize ,Close) of the window title bar.
I wish to disable/remove the restore button so that the user cannot resize the window.
The window should be in maximized state intially and
if user want,he can minimize it ,but window should not be resized.
please help me
|
|
|
|
|
Hi,
Deepu Antony wrote: I have dynamically created the window.Now I want to disable/remove the Restore button
For making non-sizable MDI window and removing maximize button:
CWnd *pParent = GetParent();
CMenu* pMenu = pParent->GetSystemMenu(FALSE);
if (NULL != pMenu)
{
pParent->ModifyStyle(WS_CAPTION|WS_MAXIMIZEBOX ,0,0);
pParent->ModifyStyle(WS_THICKFRAME, 0, 0);
pParent->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
}
Best Wishes,
-David Delaune
|
|
|
|
|
Thanks for the reply.
I have tried it.And aslo i have tried in childframe precreate function in CREATRSTRUCT structure .
CREATRSTRUCT cs;
cs ~=WS_MAXIMIZEBOX
which disables the maximize box.
But both the ways gives me the same result.That intially window is maximised and the user can press the restore button.
Once the restore button is pressed, the maximize button is disabled.But this is not the actual requirment that the user should not be able to pres the restore button in initial case also.
Is there is any method so that initially also restore button should be disabled
|
|
|
|
|
Hi,
Sorry for the late reply. The code that I showed you is working for me in VS2008 on MDI child windows. If you show me how and where you are attempting to remove the buttons I may be able to help.
Best Wishes,
-David Delaune
|
|
|
|
|
Thank you very much David for showing intrest.
I tried to do it in MDI child frame window PreCreateWindow by modifying the CREATESTRUCT
it was not working.
Also i pasted the code which you have posted in View class OnCreate function .
both was showing the same result.
Initailly the window will be displayed as maximized and restore dowm button will be enabled.
But once the user press the restore down button, the window will be resized and then the
Maximize button will be disabled. After that the user cannot click on the maximize button.
But what i want to do it is to disable\remove the restore down button in the begining itself so that the user may not be able to resize the window.
The reason is that i am displaying a graph which should be always displayed in a full window.
Is there any solution.
|
|
|
|
|
Deepu Antony wrote: Is there any solution.
First lets try to get into the same code. If you have Visual Studio 2008 and have installed the samples navigate to the following folder:
Microsoft Visual Studio 9.0\Samples\1033\AllVCLanguageSamples\C++\MFC\advanced\mtmdi
Open this project and find the Bounce.cpp file. In the OnCreate function add:
CWnd *pParent = GetParent();
CMenu* pMenu = pParent->GetSystemMenu(FALSE);
if (NULL != pMenu)
{
pParent->ModifyStyle(WS_CAPTION|WS_MAXIMIZEBOX ,0,0);
pParent->ModifyStyle(WS_THICKFRAME, 0, 0);
pParent->ModifyStyle(0,WS_CAPTION,SWP_FRAMECHANGED);
}
And in the PreCreateWindow function add:
cs.style &= ~WS_THICKFRAME;
This should cause the MDI window to be non-resizable and the Maximize/Restore grayed out. If you have another version of Visual Studio let me know and we can change samples.
Best Wishes,
-David Delaune
|
|
|
|
|
I want to create a separate class for drawing that have its own dc(device context), may be initialized from a given dc. do all drawing stuff within its dc and copy the contents on to target dc when requested.
Please guide me how to do this.
|
|
|
|
|
|
Hi all,
i want to split any file
please tell me how can i find out the maximum number in which i can split the selected file.
please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi,
I do not understand the question. There is nothing stopping you from splitting a 100 Megabyte file into 104857600 files containing 1 BYTE each. You can keep doing this forever until you run out of drive space.
Can you clarify your question? What are you trying to achieve?
Best Wishes,
-David Delaune
|
|
|
|
|
I mean if there is a 100 mb file,so what are the maximum number in which i can split this file.
so tell me this in general case for any file.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Tell us your intention.
We didn't understand what you want to achieve
so that we can tell you a better solution.
Величие не Бога может быть недооценена.
|
|
|
|
|
I provide a file to split,and provide a field where i enter the numbers in which i want to split the file.
i want to validate that number if its is exceed the maximum number of splitting.
so now please tell me the solution or suggestion according to this.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
I hope the maximum is as randor suggested.
But optimal condition may be according to your need.
if application dont bother about time but memory then split into small size and large number of file say 5-10k.
but if your application bother about time them split into 250-512k size files
Величие не Бога может быть недооценена.
|
|
|
|
|
Let me tell you the splitting of files will not be depended on the file size and the number of partitions.
I mean if you have 10Mb file if u need to divide it in to 10 files then each file will have 1024kb and 128 byte extra to identify the next file link.But as you have 128 byte*10 extra bytes to store your file size willbe more once you add the size of all files.
|
|
|
|
|
"_$h@nky_" wrote: o now please tell me the solution or suggestion according to this.
There is no maximum, except the value that you decide. As Randor said, if you have a 1MB source file you can split into 1048576 1-byte subfiles. Maybe if you explain why you want to do this then a better suggestion could be made.
|
|
|
|
|
Richard MacCutchan wrote: There is no maximum
Actually, the maximum would be the number of clusters on a given partition.
|
|
|
|
|
thanks
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Michael Schubert wrote: Actually, the maximum would be the number of clusters on a given partition.
The likelihood of reaching this is quite small, which is why I ignored it. I was more interested in trying to discover what he was trying to do, but I guess we'll never know.
|
|
|
|
|
Cluster size is very small usually, if NTFS then it can have maximum default value of 4 KB. It will be not problem to keep file size greater than 4KB. In Actual scenario, no application can create a huge amount of file, so we can ignore it as Richard said. If such a design is done then it should have a strong reason else your design is having some big problem.
Величие не Бога может быть недооценена.
|
|
|
|
|
I think his question was academic and since you can split a file into an infinite number of zero byte files (theoretically), the limit would be the number of clusters of the given partition.
|
|
|
|
|
Yes it seems to be, 5* for this guess
Величие не Бога может быть недооценена.
|
|
|
|