|
borono wrote: could that be the reason.
If you suspect it is, then try:
fprintf(out, "%.2x", 123);
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
@DavidCrow
Good idea and I tried that just now and it still failed after five times through. I have yet to try waldermort's suggestion, so let me try that here in a few hours, after I get off work and I will let you know if that fixed it. I am sure it is something very simple. I write in assembler too and when I first started I kept forgetting to initialise the DS in my code, went through everything over and over, got real frustrating but showed my code to a friend, he saw it and that was that. --something so simple it hurts. I bet that is what this is too.
Im off in three hours, talk to you again then. thanks guys.
|
|
|
|
|
borono wrote: Good idea and I tried that just now and it still failed...
Which indicates the problem (probably) has nothing to do with pkt_data .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I think your right, I am about to send my project or source to waldermort -- as soon as he tells me what he preffers. Hopefully, he will be able to look through it and correct the problem, or at least identify it better than I have.
I want to say, yeah it is the pkt_data variable, because when it is non-existant, my dll works, when it is existant, it fails. So it can't be the device I am reading from, which is what I first assumed. Then I thought maybe it was the file output portions, but if I remove that it still fails. I have no idea whatsoever.
It's a riddle. I am stumped.
best regards
-- modified at 21:50 Thursday 6th April, 2006
Eureka. I have it working. After picking at it, it turns out I was leading us completly the wrong way --miles away. It happened to be from a variable further down in the code that deals with the hex dumpage, it becomes corrupt after a few times through the loop. Why, I have no idea as of now. However, it is now printing to the file as intended.
best regards
|
|
|
|
|
Hi ya'all,
I'm sure this might be a very easy and simple thing but I would like to find out how to package my project application so it can run without the developing environment; yes, just want to make it executable. Any pointers will be appreciated.
Regards...
|
|
|
|
|
first of all, build it in release mode.
then, use the "Dependency Walker" tool to find which DLL are required
provide them with your exe, and use installshield (or any install packager) to provide an installer if you like...
|
|
|
|
|
Hi,
I want to query, modify and write a REG_MULTI_SZ values from Registry.Can anyone pleeeease show me some code samples.
Thanks in advance.
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Hello!
I'm just a basic MFC user. Mostly I do my UIs in resource editor in VS.NET 2003. I know how to handle BN_CLICKED message from button and do something with it (trough message map). But now I have a problem. I should do something on button "press" and something different on button "release". It's the situation when event is dispatched on press and release not just release like it is the case with BN_CLICKED. Is it even possible?
Thank you for all the help.
Best regards,
Rostfrei
|
|
|
|
|
WM_LBUTTONDOWN and WM_LBUTTONUP should do
|
|
|
|
|
Can you please give me more instructions? Like I said I am using resource editor for it. What to type into message map?
Rostfrei
|
|
|
|
|
do you mean LButtonDown??
Regards,
FarPointer
|
|
|
|
|
What do you mean by LButtonDown? I just want do something on button down and something else on button up.
Rostfrei
|
|
|
|
|
|
Which means you need to supply handlers for the WM_LBUTTONDOWN and WM_LBUTTONUP messages.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I managed to supply the handlers. I have the Dialog based application. If I press the mouse anywhere on the dialog I can detect it and can read the coordinates. The problem is when I click on the button. Click is not detected and I guess its intercepted by button. I want to detect the button down and check if mouse down happened in the area where button is. I don't have any method registered with the button. All I want to use it for now is button press/release shadow effect. What can I do? I don't want to draw custom button pictures and place them on the button region.
Regards,
Rostfrei
|
|
|
|
|
One way is to derive your own class from CButton and put the message handlers in it. If that does not work, perhaps message reflection will.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I already tried that but it is not possible to declare message map in there
<br />
class CCustomButton : public CButton<br />
{<br />
private:<br />
DECLARE_MESSAGE_MAP ()<br />
};<br />
<br />
<br />
BEGIN_MESSAGE_MAP(CCustomButton, CDialog)<br />
<br />
END_MESSAGE_MAP()<br />
because I get error
<br />
mainAppDlg.cpp(106): error C2248: 'CDialog::GetThisMessageMap' : cannot access protected member declared in class 'CDialog'<br />
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(2864) : see declaration of 'CDialog::GetThisMessageMap'<br />
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxwin.h(2767) : see declaration of 'CDialog'<br />
What is message reflection?
Regards,
Rostfrei
|
|
|
|
|
Rostfrei wrote: I already tried that but it is not possible to declare message map in there
Sure it is. MFC would not be worth a whole lot otherwise.
Rostfrei wrote: class CCustomButton : public CButton
...
BEGIN_MESSAGE_MAP(CCustomButton, CDialog)
Notice the discrepancy?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I'm sorry I just don't get it. What is different?
Rostfrei
|
|
|
|
|
a button inherits from CButton , not CDialog
|
|
|
|
|
Hi,
Detecting a "Missing Character Glyph" without looking at a window
I am developing a dialog similar to Windows Word - Insert - Symbol Table Dialog.
For this all the charaters have to be displayed for the selected font (from all the existing fonts) and subsets which support the current font.
I am able to display the characters but some are appearing blank. These are the characters which are not supported by the the current font.
Can anyone tell me how to detect missing glyphs?
Till now I have tried with WideCharToMultiByte and GetCharacterPlacement.
But nothing seems to work.
I thought of using uniscribe function ScriptStringAnalyse.
Is this the correct function I should use?
Also I dont have Usp10.h and Usp10.lib on my system. Though I do have Usp10.dll
I thought of downloading same but looks like it comes as SDK package.
I just need this .h and .lib file.
Can anybody send me these two files?
Thanks a ton,
Arti Gujare
Arti Gujare
|
|
|
|
|
I know the SDK can be quite a pain to download, I managed to put it off for months and months, but 400mb laters, I already feel the benefits.
I would really advise you download it and burn it to CD. Scrounging files here and there will just end up causing more conflicts than a drunk french man in an english bar.
|
|
|
|
|
hi
i have problem converting from char * to unsigned short * when compiling in UNICODE ,i have _UNICODE defined
code is as follows:
CString sBuf;
sBuf.Format(_T("RCPT TO:<%s>\r\n"), m_sEmailAddress);
//where m_sEmailAddress is CString object
LPTSTR pszRCPT = T2A((LPTSTR) (LPCTSTR) sBuf); //error is at this line
any links would do good
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
-- modified at 12:24 Wednesday 5th April, 2006
|
|
|
|