|
|
Hi !
I don´t know if that would work, but IIS includes some COM thing called DONTS, and are some COM objects that let you for exmaple send one e-mail using VBScript and ASP, so if it is going to be in the server side maybe you can use that...
HTH
Braulio
|
|
|
|
|
Hello everybody!
How can I change the type of sheets (portrait <-> landscape) runtime printing in the Doc/View Architecture.
For example:
1st sheet as portrait, 2nd sheet as landscape, 3rd - portrait again and etc.
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
I think you should check "CPrintDialog"
|
|
|
|
|
In the CPrintDialog , I can select alone type sheet (or portrait or landscape).
And I need change type sheet in the OnPrint() or OnPrepareDC() functions!
How!?
Best regards,
Eugene Pustovoyt
Sonork ID 100.10002:Yaumen
|
|
|
|
|
See example in MSDN topic CWinApp::GetPrinterDeviceDefaults.
|
|
|
|
|
for example:/Play,/Close,etc.;P
justcall
|
|
|
|
|
When building a new component the Wizard offers two choices.
(1) ATL COM AppWizard and (2) MFC ActiveX Control Wizard
Why would you choose one over the other?
My initial thoughts are:
A. Our product depends on MFC so avoiding it in new components will gain me nothing.
B. Choice two seems to have better Wizard support, especially when adding Events.
Can you point me in the direction of what to read so I can compare and contrast these two options?
Do you have a preference?
|
|
|
|
|
If you want a nice thin control use the ATL COM wizard.
If you want a bigger control that also needs the MFC DLLs then use the MFC wizard.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Thin just refers to an objects size?
There is no more overhead communicating with one object than the other, is there? All that invoke helper stuff I mean.
|
|
|
|
|
How do I extract a gob of class information to an array? For example say I have a class:
class Box
{
int Right;
int Left;
int Bottom;
};
Let's say it's 96bytes in Size. There is another function that returns the class but it is now 480bytes in size. From that and doing calculations there is 5 objects of that size that was returned. How do I assign that information into an array? Or, what is the best way to extract each piece of the class?
Thanks
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Tip: always name your classes C*
class CBox
{
int Right;
int Left;
int Bottom;
};
int nSize;
CBox *p_BoxArray = (CBox *) SomeFunc(&nSize);
int NumberOfObjectsInArray = nSize / sizeof(CBox);
for (int i=0; i < NumberOfObjectsInArray ; i++)
{
cout << p_BoxArray[i]->Right << "\n";
}
why does this work? well, you can use a pointer as if it were an array (there isn't really any difference between them, in fact.). Logically speaking, incrememnting a pointer does not make it point to that memory address + 1 byte, it makes it point to that memory address + (the size of whatever object it points to).
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Jon,
Thanks for your answer! It is exactly what I needed to point me in the right direction. Well, your answer practically kicked me in the right direction because it was so detailed.
Thanks Again.
Also did some further thought wouldn't this returned memory also be defined as an array of the object? Shouldn't we be able to access the returned information as an array? Or, is an array defined internally as something different or different flags are set in the memory space that an array occupies? Just questions...
HomeNuke
----
"Nuke'd Your Home, Yet?"
Run your own PostNuke based web server from home
http://www.homenuke.com
|
|
|
|
|
Does anyone have an idea of how to hook the keyboard under Windows 98? I have to catch the character, send to ANY application running? Maybe win32 hook is the right solution, but on what application to install it???
"Needless redundancy is the hobgoblin of software engineering." - Peter Darnell
|
|
|
|
|
As far as I know there are two ways to do this:
1) Set a Journal Record Hook (use SetWindowsHookEx with WH_JOURNALRECORD )
2) Use AttachThreadInput directly (will probably lock up your computer sooner or later and create a forehead-shaped bump in your desk)
Anyway, more than keystrokes are recieved from the RIT, and you need to sort them out from other hardware messages.
/moliate
|
|
|
|
|
You can use this:
http://www.codeproject.com/dll/keyboardhook.asp
|
|
|
|
|
Is there anyway Update EXE/Dll Resources on Win9x? The Update Resources API only work on NT. Anyone know if I can do this on Win9x?
Thank you.
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|
|
There is a way. Erik Kallen wrote a superb library that you can find in his CodeGuru article Updating Resources on Win9x.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you I thought I saw this but I only checked back at CP.
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|
|
I been try the code out and when I add it to my test project I get MFC CMap compile errors
Real World Coding:
POP& BuyAPop(Money ADollar){...};
|
|
|
|
|
Hi
I'm currently developing a dialog-based app.
Everything worked fine until some minutes ago.
Now I compiled my app once more, and suddenly it crashes during startup...the dialog isn't even shown
Here's the part of code where my app seems to crash (it's MFC internal code as you can see):
int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
ASSERT(hPrevInstance == NULL);
int nReturnCode = -1;
CWinThread* pThread = AfxGetThread();
CWinApp* pApp = AfxGetApp();
if (!AfxWinInit(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
goto InitFailure;
if (pApp != NULL && !pApp->InitApplication())
goto InitFailure;
if (!pThread->InitInstance())
{
if (pThread->m_pMainWnd != NULL)
{
TRACE0("Warning: Destroying non-NULL m_pMainWnd\n");
pThread->m_pMainWnd->DestroyWindow(); <---------------------------- here it happens
}
nReturnCode = pThread->ExitInstance();
goto InitFailure;
}
nReturnCode = pThread->Run();
Any help is greatly appreciated
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Can you pinpoint the line on which the crash occurs? If not, do you get an assertion dialog box when running your program in the Debug build?
|
|
|
|
|
I don't get a debug assertion window.
I both debug and release build the typical "crash-windows" appears, when an app crashes.
But there's one more thing that's definately not normal:
BOOL CScriptEditorApp::InitInstance()
{
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CScriptEditorDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
}
else if (nResponse == IDCANCEL)
{
}
return FALSE;
}
I ran this in debug mode with a breakpoint in line "CScriptEditorDlg dlg;"
Then I went on with program execution.
The strange thing is, that the cursor jumps from line
int nResponse = dlg.DoModal();
directly to
return FALSE;
and thus the dialog box never appears
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Try deleting the Debug and Release directories as well as the .pch (precompiled header) files, then try rebuilding all. Sometimes this makes wonders.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Sometimes this makes wonders
Not im my case
This drives me crazy
modified 12-Sep-18 21:01pm.
|
|
|
|