|
yes - A single document can have many views open on it simultaneously. Not all views need to be the same type for any given document. I can have 'spread sheet' document, but a view with a spreadsheet, a view with some charts, and another view with statistics all open on the 'spread sheet' document's data.
|
|
|
|
|
one Doc can have many views
one View can be associated with only one doc
one App can have many docs.
If the app is SDI, can display only one view of one doc at a time
If the app is MDI, can display many views of many docs at a time
|
|
|
|
|
georgemarios wrote: If the app is SDI, can display only one view of one doc at a time
Are you sure about this point ? I think that in a SDI the limitation is that you can have only one document but several views can be used to display the document... Am I wrong ?
|
|
|
|
|
ooops, my mistake
certainly, you can have several views of the same doc in SDI at the same time (using splitters for example)
|
|
|
|
|
Blast! And right after I gave you a 5 for your very short and very precise answer.
SDI: Single view, Single document.
Using splitters does not change that, each split reprsents a seperate view. Which would make it an MDI.
Of course there are ways around that minor detail.
INTP
Every thing is relative...
|
|
|
|
|
thanks for the 5
well, think of a 3d modeler like 3dmax
you have the same doc shown in 4 diferent views (top, left, front and perspective). Its still the same document.
Many views at the same time doesn't make the app MDI, MDI=multi-doc interface....
A splitter can be used in both SDI and MDI. The difference is that in SDI you put it in CMainFrame whereas in MDI you putit in CMDIChildWnd.
Still, I may be wrong. Please, somebody correct me...
|
|
|
|
|
Alright, you are correct!
I was thinking in terms of how MFC uses it (thru the wizards), I sort of spaced on the fact that we still have to add those other views manualy and can show them via splitters (the tricks I mension earlier).
SDI realy means a single document at time, not necessarily a single view.
I was thincking in terms of having mutiple views in multiple windows, which SDI does not support.
Thanks for the readjustment!
INTP
Every thing is relative...
|
|
|
|
|
so what are the other questions??
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
Hi to all,
I am having one table having 2 BLOB fields and one varchar2 field in Oracle. i am implementing my code vc++ using ADO to connect to Oracle. i am using Stored procedure to retrieve BLOB data from Oracle.
I am able to store BLOB data with Insert Command. but there is problem while using stored procedure to retrive image data.
This is my code how i am using ADO
paramUserid= pCommand->CreateParameter("p_UserID",adVarChar,adParamInput,50,_bstr_t(userid));
pCommand->Parameters->Append(paramUserid);
paramLICODE= pCommand->CreateParameter("leftcode",adLongVarBinary,adParamOutput,retLsize+5);
pCommand->Parameters->Append(paramLICODE);
paramRICODE= pCommand->CreateParameter("rightcode",adLongVarBinary,adParamOutput,retRsize+5);
pCommand->Parameters->Append(paramRICODE);
pCommand->ActiveConnection=m_pConn;
pCommand->CommandType = adCmdText;
pCommand->CommandText="{ Call getIrisCodes(?,?,?) }";
pCommand->Execute(NULL,NULL,adCmdText);
It is giving error like "Syntax error or Access violation"
I have tried that stored procedure in Oracle. it works fine. because i am able to get the length of the images. but unable to get the image data.
What should i do. Can anybody help me. Its very urgent. My whole project depends on this only.
Thanks in advance.
|
|
|
|
|
sir,
i am using edit control in my program .i want it is work as Time contol so i want to resrict it so it take only integers value and colon( ,how it is possible
|
|
|
|
|
|
if its only for integers, then check the 'Number' property in 'style' tab of the control's properties .
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
Then why not use a control that is specifically designed for this?
CDateTimeCtrl
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
|
GetVolumeNameForVolumeMountPoint() is available on Windows 2000. What makes you think otherwise?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi
I have an application which i run it as a service in win2003 . But I am able to terminate the application from the task manager . Is there anyway by which this can be prevented
Thanks
|
|
|
|
|
Hi,
In my SDI appplication, I have a dialog window which is a child of the view.
The dialog is working perfect, except that the caption is never painted activated. Why this might be so??
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
Very strange! Try recreating the problem, in as few lines of code as possible and then posting it.
INTP
Every thing is relative...
|
|
|
|
|
Hi,
This is what i'm doing, in VS .net 2003:
1. Create an SDI application.
2. Add a dialog to resource named IDD_DIALOG1 and make the Style as Child.
3. Add a Dialog class from that resource, say CDlgTest .
4. Add a member variable, say m_dlgTest to the View class of the application.
5. In the WM_CREATE message handler of the view class, I add the following two lines,
m_dlgTest.Create( IDD_DIALOG1, this );
m_dlgTest.ShowWindow( SW_SHOW );
The dialog window which shows up is never painted as activated. In my application, I'm having several such windows, so there is no way for the user to know which window is he working upon?
Please help.
Thanks in advance.
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
Does anybody know where I can find information on the
IImageDecodeEventSink and the IImageDecodeFilter interfaces that are declared in ocmm.h ?
Best regards
Carsten
|
|
|
|
|
I am developing an application which explicitly loads a .dll (using LoadLibrary) and ideally I would like to access a static class member in the loading .exe from code in the dll.
The static member appears to be there, but is at a different address and is uninitialised.
Directly accessing the static data from within the .dll causes an exception.
It looks like the problem is the address space that the .exe and the .dll occupy - I'm presuming that it's the same if the .dll is implicitly load, but not if explicitly loaded
is there any way of calling from the .dll back into the .exe ?
any help appreciated
|
|
|
|
|
DaveDrPop wrote: is there any way of calling from the .dll back into the .exe ?
have the EXE give the DLL a pointer to a callback function in the EXE that the DLL can call whenever it wants. ex.
in the DLL:
typedef double (CALLBACK* MyCALLBACKPTR)(int param1, int param2);
MyCALLBACKPTR globalCallback = NULL;
void SetDLLCallback(MyCALLBACKPTR p)
{
globalCallback = p;
}
...
if (globalCallback!=NULL)
{
double v = *(globalCallback)(a,b);
}
in the EXE:
double CALLBACK foo(int a, int b)
{
return 3.14156;
}
SetDLLCallback(foo);
the parameters on the callback function are completely up to you, of course.
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
How to detect wether USB drive is writable or not!I have tried CreatFile and GetLastError with the value of ERROR_ACCESS_DENIED.But creating a dummy file is not friendly gesture. Is there other ways around?
|
|
|
|
|
Create a HANDLE to the drive, then use this code:
BOOL IsDiskWriteProtected(HANDLE hDrive)
{
DWORD dwRet;
BOOL bWritable = DeviceIoControl(hDrive,
IOCTL_DISK_IS_WRITABLE,
NULL, 0, NULL, 0,
&dwRet,
NULL);
// If you don't have the SDK, IOCTL_DISK_IS_WRITABLE is a DWORD
// with the hex value 0x00070024
if(bWritable == TRUE) return FALSE;
return TRUE;
}
To get a HANDLE to the drive, do this:
BOOL OpenDrive(char drive)
{
char NtDriveName[10];
char m_drive = drive;
if(hDrive != (HANDLE) 0) CloseDrive();
// Open and Lock the drive
//
m_drive = (char) toupper((int) m_drive);
sprintf(NtDriveName, "\\\\.\\%c:", m_drive);
hDrive = CreateFile(
NtDriveName,
GENERIC_READ | GENERIC_WRITE, // Possibly just GENERIC_READ
0,
NULL,
OPEN_EXISTING,
FILE_FLAG_NO_BUFFERING,
NULL
);
if ( hDrive == INVALID_HANDLE_VALUE ) {
// Cannot open it, Error!
return FALSE;
}
// OK
return TRUE;
}
-- modified at 7:13 Wednesday 26th October, 2005
|
|
|
|
|
Thanks kakan!
The code finally turned into
CString strDrive;
strDrive.Format("\\\\.\\%c:", 'C');
HANDLE hDrive = CreateFile(strDrive, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL);
DWORD dwRet;
BOOL bWritable = DeviceIoControl(hDrive, IOCTL_DISK_IS_WRITABLE, NULL, 0, NULL, 0,
&dwRet, NULL);
But the question is I have "C;D;E;F;G(CDROM)" drives, if I don't specify dwDesiredAccess as GENERIC_READ | GENERIC_WRITE, the returned hDrive for "C;D;E" is INVALID_HANDLE_VALUE, and all the accessable drives' hDrive(valid) is the same(0x000006f8). Is this normal?
|
|
|
|