|
Connot you debug it? At least, to get better help, you should post here the relevant code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
oh, thank you and excuse me
my problem solved.
its problem was in VS 2005. with VS 2008, it is ok.
thanks
Zo.Naderi-Iran
|
|
|
|
|
Hi all,
I want save the image with the annotation made on it.But i am able to save only the image but not the annotation.
I am using LeadTools 16.5 version(C DLL).
I know this is not the right place for this question.
But if anyone knows how to save the image with annotation .please help me.
I will be really greatful to you
Thanks
Raj
|
|
|
|
|
Hi
You musr ask your question in leadtools forum.
Are you working on a DICOM/PACS project?
www.logicsims.ir
|
|
|
|
|
Hi All
I try to create database and table in Access database through this way.
_CatalogPtr m_pCatalog = NULL;
CString con="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\test.mdb;Jet OLEDB:Engine Type=5";
HRESULT hr = S_OK;
try
{
TESTHR(hr = m_pCatalog.CreateInstance(__uuidof (Catalog)));
m_pCatalog->Create((_bstr_t)con);
}
catch(_com_error pCE)
{
}
.
.
.
.
m_pCatalog->Release();
CoUninitialize();
Database name(test.mdb) read from list(list have more than one database name).I use here m_pCatalog->Release();
Now when i select different database name that time this line TESTHR(hr = m_pCatalog.CreateInstance(__uuidof (Catalog)));
through exception.
Exception show
HRESULT CreateInstance(const CLSID& rclsid, IUnknown* pOuter = NULL, DWORD dwClsContext = CLSCTX_ALL) throw()
{
HRESULT hr;
point out this line
_Release();
if (dwClsContext & (CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER)) {
IUnknown* pIUnknown;
hr = CoCreateInstance(rclsid, pOuter, dwClsContext, __uuidof(IUnknown), reinterpret_cast<void**>(&pIUnknown));
if (SUCCEEDED(hr)) {
hr = OleRun(pIUnknown);
if (SUCCEEDED(hr)) {
hr = pIUnknown->QueryInterface(GetIID(), reinterpret_cast<void**>(&m_pInterface));
}
pIUnknown->Release();
}
}
else {
hr = CoCreateInstance(rclsid, pOuter, dwClsContext, GetIID(), reinterpret_cast<void**>(&m_pInterface));
}
if (FAILED(hr)) {
m_pInterface = NULL;
}
return hr;
}
I use m_pCatalog->Release() because once i create database and table then i try to free particular database.
Please help me
|
|
|
|
|
What was the exception message?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thanks for reply
Unhandled exception at 0x004098ec in test.exe: 0xC0000005: Access violation reading location 0x00000008
|
|
|
|
|
Did you call Release , CoUninitialize , and then CreateInstance aqain?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi,
When I am trying to import data from excel to table it's giving me following error :-
An exception of type 'System.Data.OleDb.OleDbException' occurred in System.Data.dll but was not handled in user code
Additional information: External table is not in the expected format.
I am using following code:-
Collapse
OleDbConnection excelConn = new OleDbConnection();
excelConn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='" + filelocation + "';Extended Properties=Excel 8.0");
excelConn.Open();
|
|
|
|
|
if i open the excel file with excel 2003, then i'll do the query again for the file,everything goes fine, why?
how can i get the data from xls, without open it in the excel 2003 at the same time, who can help me ? thanks very much!
|
|
|
|
|
Hi everyone!
I'm using ReadDirectoryChangesW for tracking any changes in the dedicated Source folder and apply it to the Destination folder.
But, when multiple files are selected and deleted at once in the Source folder, only the first file is deleted in the Destination folder.
Is there any way to delete all files at once?
Thanks beforehand.
|
|
|
|
|
I haven't used this myself, however reading the MSDN documentation it seems ReadDirectoryChangesW fills a buffer with one or more FILE_NOTIFY_INFORMATION structures, of which the NextEntryOffset field is the key to finding the next (unless zero). From your description, it seems you are ignoring this field.
[ADDED] The doc also says nothing gets returned when the buffer is too small, which is more likely to happen when lots of things need reported at the same time. You may want to ask for a bigger buffer. [/ADDED]
|
|
|
|
|
mints555 wrote: But, when multiple files are selected and deleted at once in the Source folder, only the first file is deleted in the Destination folder.
If you are having trouble deleting files, what does that have to do with ReadDirectoryChangesW() ?
What does your deletion code look like?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hi guys,,,
i'm have a project about MFC. how to create bitmap from mousemovent??
for mousemovent i'm can write to picturebox.
the code is written in mfc wizard exe in a dialog based application.
for picturebox -> IDC_PIC
for button -> IDC_SAVE
my code:
void CSignature1Dlg::OnMouseMove(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
m_pic1.GetSafeHwnd();
HCURSOR hcur = NULL;
CRect rc;
m_pic1.GetClientRect(&rc);
rc.NormalizeRect();
rc.left=0;
rc.right=250;
rc.top=0;
rc.bottom=250;
POINT MousePosition = point;
BOOL isOnPictureControl = PtInRect(&rc, MousePosition);
if((m_iPrevX >=rc.left && m_iPrevX <=rc.right) && (m_iPrevY >=rc.top && m_iPrevY <=rc.bottom )){
if((nFlags & MK_LBUTTON) == MK_LBUTTON)
{
CDC* pDC = m_pic1.GetDC();
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
dcMem.SelectObject(&m_bmpBitmap);
CPen pen (PS_SOLID,2,RGB(0,0,0));
pDC->SelectObject (&pen);
pDC->MoveTo(m_iPrevX,m_iPrevY);
pDC->LineTo(point.x,point.y);
pDC->SetPixel(point.x,point.y, RGB(0,0,0)) ;
m_iPrevX=point.x;
m_iPrevY=point.y;
}
}
CDialog::OnMouseMove(nFlags, point);
}
void CSignature1Dlg::OnLButtonDown(UINT nFlags, CPoint point)
{
// TODO: Add your message handler code here and/or call default
HCURSOR hcur = NULL;
CRect rc;
m_pic1.GetClientRect(&rc);
rc.NormalizeRect();
m_iPrevX=point.x;
m_iPrevY=point.y;
CDialog::OnLButtonDown(nFlags, point);
}
void CSignature1Dlg::OnSave()
{
// TODO: Add your control notification handler code here
?????????
}
so give me advice, how to can create and save the mousemovent into bitmap???
i hope u can help me...
|
|
|
|
|
josipahutar wrote: so give me advice, how to can create and save the mousemovent into bitmap???
See the Scribble MFC sample[^].
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
thx your reply sir..
i dont understand because i newbie in MFC..
so can u give me a example about my problem...
Regard's
Johannes
|
|
|
|
|
josipahutar wrote: so can u give me a example about my problem...
This MFC tutorial gives a little bit of everything, even for newbies.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hi,
The example is the CScribbleView class code for:
virtual void OnDraw(CDC* pDC);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
.
If you cannot study this code and understand how it is an answer to your question think of another kind of working area
cheers,
AR
When the wise (person) points at the moon the fool looks at the finger (Chinese proverb)
|
|
|
|
|
hello guys... i got this small speech api sample and tried to compile but got this error.
error C2440: 'static_cast' : cannot convert from 'void (__thiscall CSpeechDlg::* )(void)' to 'LRESULT (__thiscall CWnd::* )(WPARAM,LPARAM)'
This is where it takes me when hiting on the error.
ON_MESSAGE(WM_RECOEVENT,OnRecoEvent)
This is the function signature of OnRecoEvent
void CSpeechDlg::OnRecoEvent()
And this is what WM_RECOEVENT is..
#define WM_RECOEVENT WM_USER+5 // Window message used for recognition events
what should I do? thnx
modified on Monday, December 13, 2010 3:44 AM
|
|
|
|
|
Your OnRecoEvent() function is called in response to a Windows message so it must follow the rules as explained in the error message. That is to say, it takes a WPARAM and an LPARAM as input parameters and returns an LRESULT .
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
The prototype for an ON_MESSAGE invoked member-function should be
LRESULT(::*)(WPARAM, LPARAM)
and not
void(::*)()
as you did.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hi every one,
Have you ever saw minifilter driver source code in WinDDK examples?
I want to write a program like the user app that connects to driver but I want to make Win32 App with dialogs, ...
When I compile it, Free Build Environment reports errors.
for example this is a part of my code:
int WINAPI
WinMain (
__in HINSTANCE hInstance,
__in_opt HINSTANCE hPrevInstance,
__in LPSTR lpCmdLine,
__in int nCmdShow
)
{
DWORD requestCount = SCANNER_DEFAULT_REQUEST_COUNT;
DWORD threadCount = SCANNER_DEFAULT_THREAD_COUNT;
SCANNER_THREAD_CONTEXT context;
HANDLE port, completion;
PSCANNER_MESSAGE msg;
DWORD threadId;
HRESULT hr;
DWORD i, j;
HWND h;
hr = FilterConnectCommunicationPort( ScannerPortName,
0,
NULL,
0,
NULL,
port );
------------------------------------------------------------------------
And Free Build Environment reports:
BUILD: Compile and Link for x86
BUILD: Start time: Sun Dec 12 12:27:56 2010
BUILD: Examining d:\av-fsd2\test directory for files to compile.
d:\av-fsd2\test Invalidating OACR warning log for 'root:x86fre'
BUILD: Compiling and Linking d:\av-fsd2\test directory
Configuring OACR for 'root:x86fre' - <OACR on>
Compiling resources - resource.rc
Compiling - test.c
1>errors in directory d:\av-fsd2\test
1>d:\av-fsd2\test\test.c(277) : error C2220: warning treated as error - no 'obje
ct' file generated
Linking Executable - objfre_win7_x86\i386\test.exe
1>link : error LNK1181: cannot open input file 'd:\av-fsd2\test\objfre_win7_x86\
i386\test.obj'
BUILD: Finish time: Sun Dec 12 12:27:57 2010
BUILD: Done
4 files compiled - 5 Warnings - 1 Error
1 executable built - 1 Error
------------------------------------------------------------------------
And this is the content of sources file:
TARGETNAME=test
TARGETTYPE=PROGRAM
TARGET_DESTINATION=dbg\layout
USE_MSVCRT=1
MSC_WARNING_LEVEL=/W4 /WX
MUI=0
MUI_COMMENT=TO_COMMENT, old disabled, owners need to contact MUICore to get new comment and comment code
UMTYPE=windows
UMENTRY=winmain
UMBASE=0x1000000
!if $(_NT_TARGET_VERSION) != $(_NT_TARGET_VERSION_WS03)
# Use current headers (don't set _NT_TARGET_VERSION)
# Run downlevel to XP
SUBSYSTEM_VERSION=$(SUBSYSTEM_501)
!endif
C_DEFINES = $(C_DEFINES) -DUNICODE -D_UNICODE
INCLUDES=$(INCLUDES); \
$(IFSKIT_INC_PATH); \
$(DDK_INC_PATH); \
..\inc
TARGETLIBS=\
$(SDK_LIB_PATH)\kernel32.lib \
$(SDK_LIB_PATH)\user32.lib \
$(SDK_LIB_PATH)\gdi32.lib \
$(SDK_LIB_PATH)\comctl32.lib \
$(SDK_LIB_PATH)\cfgmgr32.lib \
$(SDK_LIB_PATH)\setupapi.lib
TARGETLIBS= $(TARGETLIBS) \
$(IFSKIT_LIB_PATH)\fltMgr.lib
SOURCES=test.c \
resource.rc
So does any body know how I can use windows user mode filtering functions in Win32 projects? (not in console mode)
Thanks
|
|
|
|
|
And what does row 277 in file d:\av-fsd2\test\test.c say? This is where the error occurs according to the output.
|
|
|
|
|
As you can see I said in the code block #1 (/*Line 277*/).
I mean that when I mix user mode filtering functions with Win32 Project it gives errors. for example in the dialog procedure.
|
|
|
|