|
I got it working. added '&' before baSlots.
sscanf(m_1E2val.Mid(i*2, 2), "%x", &baSlots[i]);
now I get it correctly. still do not understand what is wrong with
sscanf(m_1E2val, "%x", &baBeaconSlots);
- KK
|
|
|
|
|
kk_vp wrote: added '&' before baSlots
yeah, fixed my mistake...
kk_vp wrote: still do not understand what is wrong with sscanf(m_1E2val, "%x", &baBeaconSlots);
in fact, "%x" reads 2 hexadecimal characters and writes a single byte... so, you'd have to write
::sscantf(m_1E2val, "%x%x%x%x%x%x", baSlots[0], baSlots[1], baSlots[2], baSlots[3], baSlots[4], baSlots[5]);
which is worse - IMO - as the little for() loop i provided you...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
-- modified at 9:46 Friday 10th February, 2006
|
|
|
|
|
kk_vp wrote: MessageBox(m_1E2val); //m_1E2val is member variable of edit
If m_1E2val is indeed a CEdit object, then this statement is in error. Are you sure it's not a CString object instead?
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
It is a CString type member variable of CEdit
I got it working. added '&' before baSlots.
sscanf(m_1E2val.Mid(i*2, 2), "%x", &baSlots[i]);
now I get it correctly. still do not understand what is wrong with
sscanf(m_1E2val, "%x", &baBeaconSlots);
- KK
|
|
|
|
|
kk_vp wrote: It is a CString type member variable of CEdit
There's no such thing. It's either one or the other.
kk_vp wrote: still do not understand what is wrong with
sscanf(m_1E2val, "%x", &baBeaconSlots);
Since you are the only one that knows what baBeaconSlots is, we can only guess as to what the problem might be.
"The greatest good you can do for another is not just to share your riches but to reveal to him his own." - Benjamin Disraeli
|
|
|
|
|
DavidCrow wrote: There's no such thing. It's either one or the other.
he certainly don't know exactly what he's doing (MFC is sometimes dark for newbies).
he might want to say a CString on a CEdit member variable...
DavidCrow wrote: Since you are the only one that knows what baBeaconSlots is, we can only guess as to what the problem might be.
hmm, seems that baSlots turned into baBeaconSlots , but anyway, it remains char[6] .
but i fixed his problem now...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
baBeaconSlots is also
unsigned char[6], just like baSlots
- KK
|
|
|
|
|
How to add one more window in MDI application project.I Created the project.But now i want to include it.
How can i do this?
|
|
|
|
|
First create a view class by class wizard.
Add a CDocTemplate class member(pointer) to your App class.
lets say m_newView.
Now at InitInstance()
m_newView = new CMultiDocTemplate(
ID,
RUNTIME_CLASS(Document class),
RUNTIME_CLASS(Frame Class),
RUNTIME_CLASS(View class));
AddDocTemplate(m_newView);
for more detail just search in this site you will get lot many examples.
Regards
Anil
|
|
|
|
|
HI!!!
Could anybody tell me the usage XmlCDataSection.
Is this can be used in mfc application, in windows xp environment. Wat for is this used?? How to use it?? or can anybody provide me with an example of it, for reference.
Thanx
"If you change then change for the good."
|
|
|
|
|
This is one exmaple why the CDATA element type is used...
We use CDATA sections in our XML files so our product's scripting language can be embedded within the XML without freaking the XML parsers.
For example, we might have a script line like this:
iTag001 <> 10;
If you don't put that in CDATA and and XML parseer tries to interpret it, you will have trouble.
So, now we have a node like this:
<ONHIDE>
<SCRIPT>
<![CDATA[
IF iTag001 <> 10 THEN
iTag001 = 10;
ENDIF;
]]>
</SCRIPT>
</ONHIDE>
Instead of like this:
<ONHIDE
SCRIPT = '
IF iTag001 <> 10 THEN
iTag001 = 10;
ENDIF;
'>
</ONHIDE>
We use the straight XML COM calls and interface pointers to process the XML, so I can't help you directly with the XmlCDataSection.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
I created a SDI app. project.Now i want to add one more window to display the graph..in my project.
How can i do this???
|
|
|
|
|
Hi..I created a project in SDI..But i have to plot a graph,so i need a new window in my project.
How can i add a new view window to my project?
Can anybody help me???
|
|
|
|
|
|
How do i make use of automation to extract the text of a word document already open by automation?
|
|
|
|
|
I have one more problem actually my class view of project work space is not showing all the classes in my folder. In my project there are around more than 200 classes. In the old directory i where my code is there i can see all the classes but when i move the code to any other directory or rename the original directory i am able to see only one class. Can any one please help me in this regard.
|
|
|
|
|
[Close project(solution)] --> [delete *.ncb file] --> [re-open project].
Maxwell Chen
|
|
|
|
|
Max/Anil,
Gr8 dudes. I deleted the .ncb file and reopened. It's really working. Can you people please send me your personal ids i have a real problem that needs a bit more explanation. Please do me a favou by sending your ids i need your help badly. Again thanks a lot for your valuable suggestions.
|
|
|
|
|
why don't you post your message here only.
That way you will get more response and more explanations.
any way you can mail any member by the mail option below.
Regards
Anil
|
|
|
|
|
Hey Anil,
I have sent a mail to your gmail account. Please have a look when you are free.
|
|
|
|
|
BiswaR wrote: I have sent a mail to your gmail account
please, stop this ASAP. if you come on a forum to ask for help, we assume that it is for sharing (which is the fundamentals of a technical forum). if you don't want this, don't ask your problem there, and find someone in your nears who can help you
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
close your workspace.
delete the .clw, .opt, .plg file.
then open the project workspace again.
the other reason that class view getting lost is that .ncb file gets read only attribute. Make sure that this file has read/write attrib.try deleting .ncb file too
Last method is
Make a Copy to another directory, but copy only the source (*.c, *.cpp, *.h, *.dsw, *.dsp and the resource directory)
When you open again the project you will have class info, if dont, then push class wizard button.
Regards
Anil
|
|
|
|
|
As we knew that the Microsoft WinSCard library (came from Visual Studio and from MS Platform SDK) supports the "contact-based" smart card (ISO 7816).
I have the questions below:
1) Does WinSCard library support also the "contactless"-based smart card (ISO 10536, 14443, and(or) 15693)?
2) If (1) is yes, is there any reference guide for implementing contactless smart card applications?
3) If (1) is no, is there any other SDK or library to do that, which is for Visual C++ and targeting WinXP?
Thank you.
Maxwell Chen
|
|
|
|
|
How can I (cleanly) close a modal dialog when I notice something goes wrong in OnInitDialog?
(It's an ATL dialog btw.)
Some of us walk the memory lane, others plummet into a rabbit hole
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
Please try if this method meets your need.
BOOL CMyDlg::OnInitDialog()
{
if(error) {
PostQuitMessage(0);
}
}
Maxwell Chen
|
|
|
|