|
Actually I want to print the buffer in minicom using debug_hex..but it gives error could u please let me know looks like error in debug_hex command..
buffer_send->buf[buffer_send->buf_end++]=0x01;
buffer_send->buf[buffer_send->buf_end++]=0x01;
buffer_send->buf[buffer_send->buf_end++]=0x01;
for(j=0,j<3;j++)
debug_hex(buffer_send[j])
thanks.
|
|
|
|
|
ikbahrian wrote: ...but it gives error...
Is it error 17?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
thx david. i giving wrong argument to debug_hex..the right one is
debug_hex(buffer_send->buf[buffer_send->buf_ptr+j]);
|
|
|
|
|
I want to get text data in clipboard every time when it change.
for check if this data my project is need.
Anybody know How I get a notification if change occurs in clipboard?
|
|
|
|
|
Lookup the WM_CHANGECBCHAIN message and the clipboard functions like SetClipboardViewer(...) .
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
From MSDN:
WM_DRAWCLIPBOARD
The WM_DRAWCLIPBOARD message is sent to the first window in the clipboard viewer chain when the content of the clipboard changes. This enables a clipboard viewer window to display the new content of the clipboard.
A window receives this message through its WindowProc function.
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
|
i put this line in one of the header files in a MFC extention DLL project
#import "\projects\mylib\msado15.dll" no_namespace rename("EOF","adoEOF")
and as i compile it then it generates this error message (one of them)
d:\projects\project_dlls\klrmycls\klrmycls\debug\msado15.tlh(228) : error C2011: 'LockTypeEnum' : 'enum' type redefinition
e:\program files\microsoft visual studio 8\vc\platformsdk\include\dbdaoint.h(109) : see declaration of 'LockTypeEnum'
any idea how can i fix it?
thanks
cheers
|
|
|
|
|
Tjie Pouw wrote: any idea how can i fix it?
You could use Google to find this article[^]
led mike
|
|
|
|
|
Hello,
I try to access to a specific instance of a class at runtime with a pointer .
Could you please explain me how to do it.
My project is Document/view based but i do not use them in this case
My classes look like as follows:
Class MyView: public CDockPaneView // CDockPaneView inherits from CWnd
{
//This class populates a tree like an explorer with my own data
Public:
//Attributes
MyCtreeCtrl m_tree;// it derives from CTreeCtrl and used to create and populate the view
// Etc….
}
Class MyDlg : public CDialog
{
//This class owns a CtreeCtrl control that I would like to populate with data got //from MyView (A kind of clone)
Private:
OnMenuInsert()
{
// getting a pointer to the instance of MyCtreeCtrl or MyView
from here.
}
//Etc..
}
First: I start the application and push a button from the menu mapped to OnMenuInsert()
in MyDlg.
Then I would like to access to the instance of MyCtreeCtrl or MyView in order to get some data from there to populate the control owned by the dialog.
I think that I can get my data either from MyView or better from MyCtreeCtrl but at runtime I have no clue. I thank you very much if you could help me.
Hope that my explanation is clear because I am not only newbee with C++. With my English too
|
|
|
|
|
You can get document pointer using CFrameWnd::GetActiveView And getting view pointer using CDocument::GetActiveView .
|
|
|
|
|
I am afraid that it works with Document/View.
I've already tested a similar piece of code got from "MFC answer book" by eugene Kain.
CView* pView = static_cast<cframewnd*> (pMainwnd)->GetActiveFrame()->GetActiveView();
CRuntimeClass* pClass = pView->GetRuntimeClass();
CString str = pClass->m_lpszClassName;
And I get a pointer to the MFC View but not my Treeview.
any other idea?
|
|
|
|
|
Something like this maybe?
MyView *pMyView = DYNAMIC_DOWNCAST(MyView, GetActiveView());
if (pMyView)
{
pMyView->m_tree ...
}
|
|
|
|
|
How this view class is created then ? Who owns it ?
|
|
|
|
|
Dear All,
I need to do that Registering COM dll by coding ...
Now can i do that ?
Thanks.
Nice things do nice works
|
|
|
|
|
Sakthiu wrote: I need to do that Registering COM dll by coding ...
Now can i do that ?
Yes.
-------------------------------
If you are looking to register a com dll from your application - Simplest way could be to run RegSvr32.exe in silent mode (parameter -s) through ShellExecute()
|
|
|
|
|
Sakthiu wrote: Now can i do that ?
Yes, most COM registration takes place using some kind of coding...
As for HOW, well, you need to add your object's/interface's information into the Registry. I would also suggest that you also register your Proxy/Stub (of an out-of-proc COM Server), and also register your Type Library (if you are IDispatch-based, see see LoadTypeLibEx(...) ). This greatly simplifies installation issues.
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Sakthiu wrote: I need to do that Registering COM dll by coding ...
LoadLibaray and GetProcAddress for DllRegisterServer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Or execute <server name>.exe /RegServer if it's an EXE-server.
|
|
|
|
|
Shell execute regsvr32.exe Dll path Not sure it's the best way but it will work.
:Gong: 歡迎光臨 吐 西批 :Gong:
|
|
|
|
|
Hi
I have a program asociated with a file extension, when I open the file via Outlook, it creates a temp file in:
Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio
My app receives the path, but CreateFile fails with error 123: File not exist
The file exist, but that is a system/hidden folder.
Why is failing to open the file??
This is my call to create file:
<br />
<br />
HANDLE hFile = CreateFile(param, <br />
GENERIC_READ | GENERIC_WRITE, <br />
0,<br />
NULL,<br />
OPEN_EXISTING,<br />
FILE_ATTRIBUTE_NORMAL,<br />
NULL);<br />
<br />
Thanks in advance
|
|
|
|
|
Error 123 is not a File Not Found error - there is something wrong with the path you are passing to CreateFile(...) .
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Kharfax wrote: Documents and Settings/sebastian/Local Settings/Temporary Internet Files/OLK37/file.mio
Try and open a cmd console to check if the path is really correct. Sometimes folders have another name as the one displayed.
Can you open the file with Notepad at the given location ?
|
|
|
|
|
Kharfax wrote: ...but CreateFile fails with error 123: File not exist
Error 123 is ERROR_INVALID_NAME .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
OK, I did this, I called shellexecute with notepad, and the file openned.
ShellExecute(NULL, "open", "notepad.exe", param, NULL,SW_SHOW);
So, I dont know
Help please
|
|
|
|