|
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.
|
|
|
|
|
Claudius is right. But all is not lost.
For your situation (if you simply want your DOS ap compiled to run in a windows box) I would create a console ap, then add your dos ap files to it (taking care to use the new main()).
Depending on what your dos ap does and needs to access, most if not all your code should compile. I did a similar thing a while ago with a dos comms ap and a few of my old maths libs, the only thing I changed was the way it actually captures the port (other direct hardware stuff and Windows will clip your ear and make you stand in the corner).
As for any display part of your ap, the Win console actually handles that quite well, fixed fonts etc, line graphics is ok. If you used any of the old graphics lib extensions I'm afraid your compiler or Windows (depending on which parts you used) will tell you where you can stick 'em.
The apps/libs I brought to Windows generally had very little to do with the display, but a bit of tidying up sorted some minor screen printing problems, except one.
That was with hardcopy printing itself, in my case alignment was based on fixed fonts (I'm a UNIX man ok!, only tthe very young use variable fonts in UNIX). Windows tried to make it prettier with TT fonts, hardly a major thing, unless your ap has to print reems of stuff in a legible way.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
Thanks to all of you who helped me with this problem !
I learned a lot with your answers !
Thanks again,
Jerome
|
|
|
|
|
just tip: try search borland, watcom or similar sites (gnu.org?)
they can give free older or command-line-only compilers (but dos ones? send reply if you will find any)
(enum - i think it has to be wrong everywhere, minimaly strong "redefinition warning" (or it was old-compiler's bug?))
t!
|
|
|
|
|
If I have a main dialog box, and On the click of a button I want a child dialog box to appear...what do I do?
I created a dialog box (with type child) and in the BNClicked method of the button I wrote.
void CMainDlg::OnAddChild()
{
CChildDlg* ChildBox = new CChildDlg;
ChildBox->DoModal();
}
But the images of the Main and the Child dialog boxes got superimposed (and got mixed up) during runtime. So someone suggested the following, but it still does not work!
void CMainDlg::OnAddChild()
{
CChildDlg* ChildBox = new CChildDlg;
if(!::IsWindow(GetSafeHwnd())) ChildBox->Create(IDD_AJOUT, this);
ChildBox->ShowWindow(SW_SHOW);
}
Please tell me how do I get my child dialog box to show properly?
|
|
|
|
|
That's because you made it a type child, which means embedded in it's parent as opposed to a seperate dialog box. The suggestion you got was idiotic - it creates a modeless dialog and assumes it deletes itself ( because it's a pointer it won't die when it goes out of scope, nor do you have the address to interact with it or clean it up )
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
|
|
|
|
|
I have dynamically linked MFC DLL. This dll works fine under my VC++ project but there is a problem when I'm trying to use it with Delphi app. All functions work fine except one (and only one) that use MFC. Here is the code:
DLL_EXPORT BOOL Configure(HWND hWnd) {
int iRes;
COptionsDlg dlg;
HINSTANCE h = (HINSTANCE)::GetModuleHandle("briz2.dll");
ASSERT(h);
HINSTANCE hPrevious = AfxGetResourceHandle();
AfxSetResourceHandle(h);
dlg.DoModal();
AfxSetResourceHandle(hPrevious);
return (iRes == IDOK);
}
Linkage and calling are fine. It crashes at DoModal(). It's seems like dlg isn't created.
Does anyone know the solution? (I don't wanna use API calls like DialogBox...;P)
Nev
|
|
|
|
|
Add this as the first line in the function:
AFX_MANAGE_STATE(AfxGetStaticModuleState());
Look up the technical note on AFX_MANAGE_STATE for more details.
--Mike--
http://home.inreach.com/mdunn/
#include "witty_sig.h"
your with and
|
|
|
|
|
Works! Thank you!
Nev
|
|
|
|
|
Hello,
I am planning to write a program that can record a sound from the mic.
I have no idee where to begin, what to learn, ... no idea! This mean any help/suggestion is welcome.
I thank you in advance.
Where there is a WISH, there is a WILL.
|
|
|
|