|
|
Hello, the codegurus around the world.;)
GetParent() is one way, but not so much technically.
So, pass the handle of parent of the constructor.
CChildDlg dlg (this);
dlg.DoModal();
And the constructor of CChildDlg;
ChildDlg::ChildDlg (CWnd* pWnd)
{
ASSERT(pWnd);
m_pParent = pWnd;
}
Good Luck!
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
- Are there any Linux disscussion boards?
- Please tell me the URL.
- Regards,
Maer
|
|
|
|
|
billions of them. Thats the big thing with Linux, the information you need is spread across a million sites and in an order that the best search engines in the world can't manage.
I'm not anti-linux at all, I use it at home and at work, but I sometimes wish a proper professional company would get hold of it and sort it out a bit.
Before any Linux gurus write in to give me a hammering, I've been a unix man since 1979 (developer), and linux since it was born, my argument is not with the product but with the the well just about everything else about it.
There, I've said my piece.
http://www.mandrakesoft.com leads to some discussion groups and tutorials, there are some very good programming tutorials too.
Also, don't forget news groups, there's about 20 billion billion of those. I lie not. Not often anyway.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
Rassman wrote:
I sometimes wish a proper professional company would get hold of it and sort it out a bit.
Yeah, wouldn't it be great if somebody like IBM got involved in developing Linux...
|
|
|
|
|
Personally I'd rather see a Microsoft Linux. The only way we'll get any decent tools and resources that do things that we want them to do and not what some lame brained hacker thinks is a cool idea
Michael
|
|
|
|
|
Dead right there. A typical example was a Developer tool which was close to being like MS developers programming environment, when you first look its brilliant then you find the other half of it, the part that makes it useable, costs two arms one leg and a bag of marbles.
I am used to programming in vi editors, and having other windows open for make etc, but it would be so nice if I could do it all in one place.
But, in linux's favour I would say that, as with unix, its a very uncluttered environment. Mainly because it doesn't have to come out of the box ready to work in all environments in as automated a way as possible. So, if you do have a mojor number crunching maths modeling job to do, a Linux is great for that. Add Samba and you have an effective NT server so its easy to feed it data, let it chew it a while, then pick up the results.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
I totally agree. Microsoft makes very little money off the OS as compared to their other projects, particularly office. I think the antitrust trial should relegate them to no longer having their own OS, and everyone just uses the Linux kernel. It would help Microsoft sell stuff for other platforms, thus increasing their market, while not allowing them to leverage their monopolistic powers. I think it's a win for everyone...
But Microsoft is doing some work on FreeBSD (Rotor project: C# to another platform) FreeBSD is also not seen as a cancer because it doesn't use the GPL.
|
|
|
|
|
Linux experts are old-fashioned, we prefer mailing lists and newsgroups to WWW discussion boards. If you have already chosen a particular Linux distribution, see the distribution's home page for links to resources.
|
|
|
|
|
try linuxdoc.org - not a discussion board but full of information.
What do you need help with?
|
|
|
|
|
- Thanks pal!
- The web site "www.linuxdoc.org" is excellent!
- Are there any disscussion boards that I can use?
-Regards,
Maer
|
|
|
|
|
I've tried to register an OCX using regsrv32, but my program still won't show the control as it keep saying "An unsupported operations was attempted"
I'm using Microsoft FlexGrid 6.0 control in my program
.. anyone help meee
|
|
|
|
|
Hi all,
Currently I'm working on a program with (at this moment) 100 windows.
In the app of the program I have this code - (x 100).
m_pProg001Template = new CMultiDocTemplate(
IDR_MENU,
RUNTIME_CLASS(CDProg001Doc),
RUNTIME_CLASS(CDProg001Frame),
RUNTIME_CLASS(CDProg001View));
AddDocTemplate(m_pProg001Template);
m_pProg002Template = new CMultiDocTemplate(
IDR_MENU,
RUNTIME_CLASS(CDProg002Doc),
RUNTIME_CLASS(CDProg002Frame),
RUNTIME_CLASS(CDProg002View));
AddDocTemplate(m_pProg002Template);
etc, etc..
then ..
OnCommand (ID_MENU_001, OnProg001)
OnCommand (ID_MENU_002, OnProg002)
(x 100) etc, etc..
App::OnProg001() (x 100)
{
m_pProg001Template->OpenDocumentFile(NULL, TRUE);
}
etc, etc ..
This doesn't look good, and gives a lot of code in the app.
I have the feeling that there is a easier way to do this,
maybe with 5 lines of code , but I have no idea how to do this.
Anybody??
Greetings
Rene
|
|
|
|
|
I never criticise another persons code, afteral. Displaying your code is a bit like displaying your underpants, you never really know if there's a skid mark showing.
But, 100 windows in one application?, Lets just say it seemed a good idea at the time and tell the project leader it was only done to test the theory before going on to the release version, ok?
If you still want 100 windows, you could have an array of doctemplates,
CString sClasssName;
for( j=0;j<100;j++)
{
sClassName = ArrayofClassNames[j];
m_pArrayofTemplates[j] = new CMultiDocTemplate( IDR_MENU, RUNTIME_CLASS(sClassName), RUNTIME_CLASS(CDProg002Frame), RUNTIME_CLASS(sClassName)); AddDocTemplate(m_pProg002Template);
}
I'm sure you get the gist (sorry have to rush this my German server has just gone awal).
But, are you sure you need 100 windows? do you actually need 100 ActiveX windows displaying various information (whatever your app is) which you can create/show/hide/ etc as needed.
sh*t sh*t even i can't get in my german server. better go sort it.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
When you create your doc templates, put the pointers into an array:
m_pDocTemplate[0] = new CMultiDocTemplate(
m_pDocTemplate[1] = new CMultiDocTemplate(
m_pDocTemplate[2] = new CMultiDocTemplate(
... etc
Then for you ID_MENU_001..ID_MENU_100 id's you need to map a command range
ON_COMMAND_RANGE(ID_MENU_001, ID_MENU_100, OnNewDocument)
void CYourApp::OnNewDocument(UINT nID)
{
m_pDocTemplate[nID-ID_MENU_001]->OpenDocumentFile(NULL, TRUE) ;
}
This should then open the right document type. Your ID_MENU_001...ID_MENU_100 id's need to be numbered consecutively for this to work.
Roger Allen
Sonork 100.10016
|
|
|
|
|
Can someone please tell me what message I can capture when a MDI child window is moved by clicking on the titlebar and dragging with the mouse.
I have tried WM_MOVE and WM_MOVING and set debug breakpoints and they don't seem to get called when I move the window. It does work for WM_SIZE when I resize.
Thank you,
Confused
|
|
|
|
|
There is an OnActivate method in the MDIChildFrame class.
Try that.
|
|
|
|
|
I want to do some animation like flash type.. Something moving in the device context area. If I use OnDraw there is a lot of flickering. How can I produce smooth animation in my application.
|
|
|
|
|
You have to use a offscreen bitmap (a memory dc) write to that and them just blit it to screen. Search Codeproject for double buffer or memory dc. For example look at this cp section, Device Contexts
----
Rui Lopes
|
|
|
|
|
Hi,
What I want, is to be able to scroll a device context which is bigger than the screen.
Can anyone offer me any advice?
Cheers
Rich
|
|
|
|
|
If you are using MFC, you can use a CScrollView.
Simon
Hey, it looks like you're writing a letter!
Sonork ID 100.10024
|
|
|
|
|
Hi,
I have a dos program, developped with Microsoft C V7.0 for the DOS environnement.
I would like to recompile it with Visual C++ 6.0, but I have no idea if it is possible. Anyone already did that ? Is Visual C++ able to compile DOS programs, in C ?
Another question : In this C program, I noticed an enum like this :
enum day
{
monday, tuesday, wednesday, thursday, monday
}
...with twice the same name (monday). I believe this is not allowed in C++. Is it in C ?
Thank you for any help,
Jerome
|
|
|
|
|
If I remember correctly Visual C++ 1.52 was the last Microsoft compiler that allowed you to generate DOS apps. I don't think version 6 will allow it, it is a Windows only compiler.
Michael
|
|
|
|
|
Thanks for your answer !
I have another question, thus. What is a 'console application' with MS VC++ &.0 ? I always thought it was a 16 bit dos application ! It is then not possible to developp a 'console application' to run it under dos ?
Thanks,
Jerome
|
|
|
|
|
A console application is NOT a DOS application. It is a Win32 application that runs in a console window (which again is NOT to be confused with a "DOS window", event though it seems to be one).
Win32 console applications can be written nearly the same way as DOS applications were written, with the added functionality of a 32-bit platform. No memory problems, no f***ing segments, memory models and similar crap. You can use Win32's advanced system functions, long file names, whatever.
Such an application does NOT run under DOS, since it is a true 32-bit Win32 application, but it will run fine in either Win32 version's console window.
|
|
|
|
|