|
In Platform builder (3.0), I created a CEPC based WinCE OS which I want to download on a Laptop (Toshiba Tecra 8000) by using the parallel port since the laptop does not have the required CE-Debug compatible ethernet card. the "loadcepc.exe" programs always fails with:
"
Sending boot packet: aa
WaitForStatus: PPSH Disconnected
"
I am able to start a release build of the WinCE OS (Kernel debugging disabled) after I copied the nk.bin file over to the target.
However a debug build always resets the machine.
Is there something wrong (not standard) with the parallel port of the Laptop?
Hints and tips receive a warm welcome.
BR,
Gert.
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
never mind, I just figured out I need a special parallel cable, which my collegue manufactured while burning his fingers with the solder...
--------------------------------------------------
If my messages appear curt, I apologize.
I try to be brief to save your time as well as mine.
--------------------------------------------------
|
|
|
|
|
Hi,
I´m running and Ms Word instance in-place, but if I fail to create it ( for example when there is one instance of Ms Word running but unstable), it shows an ugly exception message from word ( then If the user presses ok, my program will continue and it will create the embedded solution), that message is shown in:
pItem->CreateNewItem(clsid);
Is there anyway to avoid that the message is shown to the user ?
Thanks, Bye !
Braulio
|
|
|
|
|
I would like to create a sort of library of method in vc++ to be used in excel. So i believe that if i create a .dll application instead of a .exe, i would be better. But i have read that i could use especially OLE Automation for that kind of application. I have read in msdn the comexcel sample, but it's not really what i want to do.
In fact, i would like that the methods defined in first in vc++ could be used in excel as we could to simply when we create functions in vba. So how we could do that? Where could i find samples?
thanks in advance for your answers.
gerald
|
|
|
|
|
Hi,
A very good doc is: "Automating Microsoft Office 97 and Office 2000" ( written by Lori Turner , 17 February 2000), it´s free you can search for it in MSDN in the web or the cd.
You can find a lot of help in MSDN, just search for this keywords:
kbAutomation kbExcel kbMFC sample
But anyway you are right most of the samples are made for VBasic, but it´s easy to transform it to VC code.
About docs explaining more on Word Automation:
http://www.codeproject.com/com/xoffice.asp
and in codeguru ( www.codeguru.com) you can find some help as well.
Some more samples you can find in the Kruglinski, Shepher, Wingo book "Inside Visual C++".
And one more tip... sometimes the easiest way to find how to implement something for Excel or Word is just to record a macro and see the code generated in VBA.
Good Luck
Braulio
|
|
|
|
|
the Document is a CompoundFile ( include: ole, image file, ... )
-----------------------------------------------------------
I can open or save Document( 1: CMyDoc::Serialize)
but how can I load file to CMfSet Directly ( 2: CMfSet::Open )
1. -----------------------------------------
void CMyDoc::Serialize(CArchive& ar)
{
// m_curMfSet is member var of CMyDoc : ( CMfSet m_curMfSet; )
m_curMfSet.Serialize(ar);
COleDocument::Serialize(ar);
...
};
2. -----------------------------------------
class CMfSet : public CObject
{
DECLARE_SERIAL(CMfSet)
public: // consturct or disconturct
CMfSet();
~CMfSet();
public:
BOOL Open(LPCTSTR lpszFilename);
// ...
};
BOOL CMfSet::Open(LPCTSTR lpszFilename)
{
CFile f;
if( !f.Open( lpszFilename, CFile::modeRead) )
return FALSE;
TRY
{
char buf[4096];
CArchive ar(&f, CArchive::load, 4096, buf);
Serialize(ar);
// It is sure error, but I don't know how correct it
}
CATCH_ALL(e)
{
return FALSE;
}
END_CATCH_ALL
return TRUE;
};
Thank you!
|
|
|
|
|
I had solved it:
CRuntimeClass *pRuntimeClass = RUNTIME_CLASS(CMyDoc);
CMyDoc *pDoc = (CMyDoc *)(pRuntimeClass->CreateObject());
if( pDoc->OpenDocument(lpszFilename) )
pSet->FromOther( pDoc->GetMfSet() );
delete pDoc;
...
------------------------------------------------------
any advance soultion?( if you have time, please tell me the answer)
Thank you!
|
|
|
|
|
is there anybody who ever get this trouble ?
look:
(if u want to see the question directly ,or
save ur time plz go to the end of the thread!)
i create 2 dialogbars in my SDI app. each dialogbar
has a class (i.e. CMyDialogBar1,CMyDialogBar2) ,
and i add 10 buttons in both of the 2 dialogbars.
firstly, i implement one of them.(segment of mainfrm.cpp)
"mainfrm.h"
//////////////////
CMyDialogbar1 m_b1;
CMyDialogbar2 m_b2;
//////////////////
"mainfrm.cpp"
//////////////////
int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (!m_b1.Create(......))
{
......
}
if (!m_b2.Create(......))
{
......
}
}
//////////////////
**** 0 error after press F7 ! and the 2 dialogbars are all right!
secondly, in "CMyDialogBar1.cpp" ,i init all button in dialogbar1
like this:
//////////////////
BOOL CMyDialogBar1::InitButtons()
{
int i;
for(i=0; i<button_number; i++)
="" {
="" m_btn[i].mydrawbuttonfacefunction(i);
="" m_btn[]="" is="" a="" instance="" of="" cmybutton="" class=""
="" deriving="" from="" cbutton="" class,but="" cmybutton
="" can="" change="" the="" color="" button
="" m_btn[i].subclassdlgitem(idc_bar1_btn1+i,="" this);
="" }
="" return="" true;
}
=""
all="" these="" buttons="" in="" cmydialogbar1="" are="" set="" to="" ownerdraw="" style="" ,="" and="" i=""
make="" drawitem()="" function=""
****="" 0="" error="" after="" press="" f7="" dialogbar1="" got
="" different="" each
now,="" am="" going="" implement="" button="" on="" second="" dialogbar.
="" then="" trouble="" comes="" out.
i="" add="" such="" message="" handle="" "mainfrm.cpp"
i="" place="" code=""
in="" "mainfrm.cpp"="" ,(here="" segment)
=""
begin_message_map(cmainframe,="" cframewnd)
="" on_command_ex_range(idc_bar2_btn1,idc_bar2_btn10,onbar2lbtn)
end_message_map()
=""
in="" “mainfrm.h”
="" {{afx_msg(cmainframe)
="" afx_msg="" void="" onbar2btn(uint="" btnid);
="" }}afx_msg
=""
all="" implemented="" ,but="" some="" we="" create="" first="" disabled="" !="" why="" ??
when="" remove="" implementing="" dialogbar(dialogbar2),="" 1st="" dialogbar(dialogbar1)="" enabled.="" cant="" figure="" out="" what="" worng.="" maybe="" make="" mistakes="" using="">=2 dialogbars in a program in one time.but some of the buttons in dialogbar2 are still work. only a part of them are disabled ! why ?
can anybody tell me why? thanks in advance!
of if u have some code of using >=2 dialogbars in a program,
can u email me ?
eMial: litterjosser@hotmail.com
nickong
let's talk about code or some funny video
|
|
|
|
|
You have replaced the creation parameters of the bars - perhaps you have the same ids for the two of them?
|
|
|
|
|
Where and how to retrieve the infomation?
Thanks
DJ
|
|
|
|
|
Hi..
i've started using the stl and i am really amazed.. i really like the library.. the most important part for me are the sorting algorithms and stuff like that..
the problem i don't get started seems pretty simple:
i would like to write a functor that takes a second parameter.. and the problem ist that this paramter should be sthing like a const char*..
e.g. i want to copy all the members, where one member var has got a given value.. and this value is a const char* (or a std::string.. no cstrings please)..
could anyone help me?
// sthing like this.. but i would like to compare strings..)
find_if(L.begin(), L.end(), bind2nd(greater<int>(), 0));
thanks in advance
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
You'd do it the same way for strings:
list<string> L;
...
find_if(L.begin(), L.end(), bind2nd(greater<string>(), "hello dude")); Here the comparisons are lexicographical.
That's the great thing about STL: genericity!!
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
well.. thank you for this.. but my real problem is as follows..
i mostly use containers of classes.. and so i am writing functions to compare them (i hardly ever use stuff like greater)
and how do i achieve this..
my fun's look mostly like:
bool rmore (const Class* &l, const Class* &r)
{
return (l->x > r->x);
}
i wanted to write sthing like
bool rlikestring (const Class* &c, string s)
{
return (c_membervar = s);
}
does this work this way? (it would be pretty cool for algorithms like remove_if)
thanks for your answer
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
sorry.. it should be
bool rlikestring (const Class* &c, string s)
{
return (c.c_membervar == s);
}
but since i am using const, the compiler would've announced it anways
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
Well, if I've understood your need, you must write a functor (sometimes called function object) to plug into find_if and similar arguments. It'd go like this:
class rlike
{
public:
rlike(const string& s):s(s){}
bool operator(const Class* &c){return c.membervar==s;}
private:
const string& s;
} Now you can use this functor as follows:
find_if(L.begin(),L.end(),rlike("hello dude")); Look for function objects on the net for further info on this kind of constructs.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I want to know details about writing an import for .DXF files
for a CAD software used in the Laser Construction business. I
have the file formats of the .DXF file but not the CAD software.
I think I need that format. Please be kind to give information
about how to tackle this problem. What other information do
I really need? This has to be done in C++/VC++.
|
|
|
|
|
Let me see if I understand what you're asking for: You want details of the file format for some CAD software, but you don't tell us which software?
I think you'll find more help at wwww.psychic.com.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Not knowing the CAD software envolved, you may find a reference to the file format at:
http://www.wotsit.org/
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
Please step to the rear of the car and make room for more victims. - John Simmons the Outlaw programmer, 1st Feb 2002, in the lounge
|
|
|
|
|
Hi !
I'm about to write a little app which will be a RPN Calculator, in order to learn a little bit of C++ and MFCs.
The calculator, as all RPN Calc, will have a stack, and at each position of the stack could be a value. The type of this value could be an integer, a float, or anything I might think of (complex number,...).
I thought that I should have an abstract class (CValue), and derive from this class many specific classes for each possible type. Thus, the stack will just store CValue objects, but, when displaying them, the appropriate method will be called. (I hope a make myself clear !!!)
My question now is : if I want to add two values, but, for example, one is of type CFloat and the other one is CInteger (but both are derived from CValue), how can I do it ? How can I make sure that in this example, the CInteger will be converted to a CFloat, and the result will be a CFloat ? Same problem would occur when, for example, multiplying a CComplex with a CInteger ? How can I make it work, in a good object-oriented way ?
Any help or hint will ne greatly appreciated !
Thanks !
Jerome
|
|
|
|
|
You could write a conversion operator for the different types. The conversion operator can upgrade certain types to the next level when it is necessary. For example, you would create this function for your CInteger class:
<br />
CInteger::operator CFloat()<br />
{<br />
return CFloat(this);<br />
}<br />
This will convert a CInteger object to a CFloat object whenever the compiler sees the opportunity to do this. For example, given this function:
<br />
bool CFloat::Add(CFloat lhs, CFloat rhs);<br />
call the function with these parameters:
<br />
CInteger i;<br />
CFloat f;<br />
<br />
CFloat answer;<br />
<br />
answer.Add(f, i);<br />
<br />
i, or CInteger would transparently be converted to a CFloat for you. The only hard part to this solution is to determine the proper relationships between all of the objects and what parameter types should be converted or upgraded to the other types.
|
|
|
|
|
personall i see two chances for you:
* one would be to make a function (e.g. operator +,- and so on...) that converts all different numbers to the same type (e.g. double so you could add them pretty simple)
* another way would be a chance to make overloaded functions:
add (double r, int l) but i don't think this would be pretty sh*tty
just my thoughts.. i think there is a better approach.. but in the moment i don't know any..
bernhard
Sometimes I think the surest sign for intelligent life elsewhere in
the universe is that none of them ever tried to contact us.
|
|
|
|
|
Hi Jerome, your problem is a classic in OOP, and has been thouroughly studied. The usual technique to deal with it is called double dispatch. Do a search on Internet for this term, lots of papers and code snippets will show (some even featuring number hierarchies similar to what you are planning to build).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
when we make a link with "https://",the IE browser will pop up a dialog to let us
select a personal certificate.
my question is:
At this time,how can I have the browser read my certificate from the special directory on my disk!
|
|
|
|
|
wabc wrote:
when we make a link with "https://",the IE browser will pop up a dialog ...
No it doesn't.
- - - - - - - - - - - - - - - - - -
Memory leaks is the price we pay \0
01234567890123456789012345678901234
|
|
|
|
|
https:// means that web page is encryped or something, so that your visit to it and data transfer is supposed to be secured. The online banking sites I used all begin with https://. But most of the time, they don't ask for any certificate. Sometimes it will prompt that "You are going to view a secure web site, while some of the stuff are not secured. Do you want to view the unsecure stuff too?".
Good luck!
|
|
|
|