|
I am trying to create a file that has a filename followed by a CR then I want to create the rest in basically straight hex values. I am using the file streams currently in console mode for greatest portability. With the File IO Stream when I set the values to ios::hex the output looks like plain hex numbers. The data type I am sending to the file is currently unsigned int. I just want to send out the information in a pure binary format, that should not be readable in a text editor, but would require a hex editor to verify the numbers. What am I missing? This is driving me crazy.
Thank you for any assistance.
Leo T. Smith
|
|
|
|
|
You can create a file with CreateFile() . Use WriteFile() to write to the file.
If you are using MFC, check out the CFile class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I need to find the current mouse cursor position in screen coordinates, even if it is not in the client area of my window-- or any window I own for that matter.
Seems like there should be a simple API call to get this, but I cant find it. Any ideas?
|
|
|
|
|
GetCursorPos?
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
"Philosophy is a study that lets us be unhappy more intelligently."
-Anon.
|
|
|
|
|
GetCursorPos
and make sure you do ScreenToClient or ClientToScreen conovertion.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Hi all,
could anyone tell me how to write on the area before the panes of the status bar? That area where the word 'Ready' is placed. Thanks,
Ralf.
ralf.riedel@usm.edu
|
|
|
|
|
Just try using this member function of CFrameWnd:
CFrameWnd::SetMessageText
From MSDN:
Call this function to place a string in the status-bar pane that has an ID of 0. This is typically the leftmost, and longest, pane of the status bar
|
|
|
|
|
Hi all,
could anyone tell me how to write on the area before the panes of the status bar? That area where the word 'Ready' is placed. Thanks,
Ralf.
|
|
|
|
|
Hi,
I have created one simple ActiveX control which extends the properties of Button. I have added OnClick() event while building an ActiveX control.
I have successfully create the ActiveX control.
But, then to test the ActiveX control , I have build simple dialog-based application and insert my custom-built ActiveX control. I m able to get the properties of ActiveX control.
But, the problem is that i unable to get the OnClick event of ActiveX control.
The event is not even visible in MessageMap of ClassWizard.
Pls help me
|
|
|
|
|
Hi Chauhan,
For what you said, sounds like you didn't implement the connection point for that event, does your control support connection points?
If you did implemented it, where did you put the call to the FireClick() function?, did you check that code is been call?
Fabian
|
|
|
|
|
Hi Fabian,
Thanks for reply.
Actually I m very new to this topic , I have just read the code from Book and try to implement it.
No, I haven't implemented connection point for the event.
How can I do that? Please provide me some code snippet or suggest me some useful links from where I get the help.
|
|
|
|
|
|
Is using sscanf with structs harmful
Say i have two structs
struct {
int a ;
int b;
}A;
struct {
char c;
int d;
};B
void main()
{
struct A obj1;
struct B obj2;
string fileString;
.
.
sscanf(fileString.c_str(),"%d",&obj1.a);
sscanf(fileString.c_str(),"%d",&obj2.d);
}
Is there a bug in this ? Do i have to do some type of casting ?
}
|
|
|
|
|
I would write:
sscanf(fileString.c_str(),"%s",&obj1.a);
sscanf(fileString.c_str(),"%s",&obj2.d);
instead of:
sscanf(fileString.c_str(),"%d",&obj1.a);
sscanf(fileString.c_str(),"%d",&obj2.d);
and changing int's into strings.
You can't put a string into an int with no castring.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Your code is fine.
Although I think 'void main' is deprecated. And you could consider giving A and B an 'initialise from string' type constructor, so that the struct/class takes responsibility for its initialisation.
Paul
|
|
|
|
|
Anyone can tell me a website that explains how to create a visual control for visual c++ from 0 ??? any kind of control.... Or an article into this site, but I couldn't find anyone that explains how to create it.
Thank you so much.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Rafael Fernández López wrote:
...how to create a visual control for visual c++ from 0
What does this mean?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
sorry my english is not very good, i'm from spain. from the beggining, with no parent class, is more or less what i want to say. but with owner draw and so on... thanks !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
Just a guess, but do any of the articles here explain how to create the control you are interested in?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Anyone have any idea why:
RECT rect = {0, 0, 0, 0};<br />
<br />
if (GetThemeRect(hTheme, WP_MINBUTTON, MINBS_NORMAL, TMT_RECT, &rect) == S_OK)<br />
{<br />
}
would return S_OK but not change the value of rect ?
hTheme is good and other Theme functions work.
Thanks.
Rail
|
|
|
|
|
|
I have read and looked over all the samples in this forum related to email and Outlook. I'm trying to find a way to actually programmatically retrieve all the Emails currently in the user's Inbox in Outlook, and to even delete them if needed. Most of the programs deal with getting the mail every time a new message is received, but I'm trying to write an app that can get all the actual emails that are actually in the user's inbox when the app starts, to then forward them to another email address (still using the original sender's emailaddress as the ReplyTo field) and deleting them if the user wants after they're forwarded. Any help would be greatly appreciated. TIA (thanks in advance);)
If it's broken, I probably did it
bdiamond
|
|
|
|
|
bdiamond wrote:
I'm trying to find a way to actually programmatically retrieve all the Emails currently in the user's Inbox in Outlook...
Using Outlook automation:
if (app.CreateDispatch("Outlook.Application") == TRUE)
{
ns = app.GetNamespace("MAPI");
ns.Logon(vtOptional, vtOptional, vtTrue, vtTrue);
folderInbox = ns.GetDefaultFolder(olFolderInbox);
itemsMessages = folderInbox.GetItems();
for (int x = 0; x < itemsMessages.GetCount(); x++)
{
mi = itemsMessages.Item(COleVariant((long) x + 1L));
TRACE("Message %d, subject = %s\n", x, mi.GetSubject());
}
ns.Logoff();
}
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
WoW!!! thanks!! that helps a whole hell of a lot. Do I have to include any certain files to use this? Where can I find any more documentation on this? Like so I can also delete those messages from the inbox? Hope I'm not asking too much But I really appreciate all the help you've given me in the past (through others' posts also). Keep up the good work. Oh, also I value your opinion, I was wondering if you looked at the article I posted a few weeks ago entitled 'Modeler'? It's a directX application that i posted a few weeks ago. About 3,400 people have viewed it, but only 12 have rated it, and only 1 person has commented on it. I kinda wish there was a download counter instead of just a view counter so you could see how many people have downloaded your files.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
bdiamond wrote:
Do I have to include any certain files to use this? Where can I find any more documentation on this?
Read MSDN article Q178749.
bdiamond wrote:
I was wondering if you looked at the article I posted a few weeks ago entitled 'Modeler'? It's a directX application that i posted a few weeks ago.
Doubtful, as I no nothing of DirectX.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|