|
movl isn't standard Intel x86 assembly, the width of the operation is implicit in the registers, al, ah for 8 bit, ax for 16 and eax for 32. Perhaps this is Unixish?
Anyway bit more code might help.
Paul
|
|
|
|
|
Ok so basically i was wondering if it is possible to have a program copy itself into every directory on the system. If it is possible can you please post the source code
-Ryan M.
|
|
|
|
|
Sure it probably is, baring security!
But there is no ligitiment reason for doing so.
INTP
|
|
|
|
|
yeah i figured that. My friend was trying to do that and i looked at his source code and it wouldn't even compile so that is why i asked this question
-Ryan M.
|
|
|
|
|
I'm curious. What purpose, nefarious or otherwise, does it serve to copy an .EXE to every directory on a machine? It's not an action that does anything dangerous to the machine. The only detrimental affect it has is to eat up disk space, and annoy the user who has to go clean the damn thing up.
Software Zen: delete this;
|
|
|
|
|
yea there is no legitamite reason for this. Well it does eat up disk space and it is a pain to clean up but i was just wondering if it was even possible to do this.
-Ryan M.
|
|
|
|
|
How can I insert into my project dialog a BMP from a resource and make it transparent ? I set up my BMP background to (255,0,255) and it doesn't turn to transparent. Should I call any function or something ?
Thanks in advance, Rafael.
|
|
|
|
|
Are you using the BitBlt function to render the image? In that case you shold switch to TransparentBlt. As far as I remember the last parameter to the function is the transparent color...
|
|
|
|
|
no I'm not using it, I don't even know what is it. I am programming with MFC but until now I ever have programmed graphical interfaces and what function should I call from MFC ?? Please help or tell me some web site where it is explained or something... thank you so much !!
|
|
|
|
|
|
My dear friend,I have such a big question that make me puzzle.
Now,there is a sinouce signal.I have to sample it.And,then ,store the sampling points.
My question is,in VC++,which functions can I use?And how can I accomplish the storage?Can you give me a example?
Thank you very much!
langzi54
|
|
|
|
|
Hi.
I want to use the XmlDocument (from the .Net framework) to download RSS files and parse them. This should be possible right? Or is there another object I should use?
When I try with XmlDocument it sometimes work, and sometimes don't... It's very strange... It crashes on the XmlDocument::Load function, and gives me an unhandled exception at blahblah.
The debug output gives me the following:
HEAP[TeotiTrayBuddy.exe]: HEAP: Free Heap block 4050cb0 modified at 4050da8 after it was freed
Unhandled exception at 0x77f75a58 in TeotiTrayBuddy.exe: User breakpoint.
I am trying to catch an XmlException which is what the Load function should throw...
Any ideas? I have just started up with .Net so it would not surprise me if I have taken the wrong approach. Any advice are welcome...
Regards,
Jaran
|
|
|
|
|
I want to move a static control when the left mouse button is down(over the static control) and I move the mouse in some direction using MFC? the Static control should move as many pixels as much as the mouse has moved.
Harshapaul
|
|
|
|
|
Use the WM_MOUSEMOVE message. Have a variable which keeps track of the previous mouse position, and set this after each move of the static control.
When you have calculated the translation of the static control, use the MoveWindow memberfunction of the static control.
I think this should work
|
|
|
|
|
hai all,
I am developing an application using GDI functionalities.
I have to draw ellipse on mouse move with dashed, dotted line styles.
Please help me.
With thanks,
arun a.c.
|
|
|
|
|
If you mean the border, then you just create a pen with the PS_DASHDOT style.
myPen = CreatePen(PS_DASHDOT,1,RGB(0,0,0));
INTP
|
|
|
|
|
the following code giving me runtime error but ignoring runtime error shows the desired window. wat is bad in the code n if any better solution using CreateEx()
CWnd* pWnd = new CWnd;
pWnd->Create(/*WS_EX_OVERLAPPEDWINDOW ,*/AfxRegisterWndClass(0,AfxGetApp()->LoadStandardCursor(IDC_ARROW),GetSysColorBrush(COLOR_WINDOW),NULL), "Hello", WS_POPUPWINDOW |WS_VISIBLE /*| WS_CAPTION*/,
CRect(700, 480, 800, 580), this,1234);
i m using this code in a button handler of dialog base application. any one can help
|
|
|
|
|
as follows, what should I do? thanks
class A
{
public:
void f(void (*g)(int), int i) const { (*g)(i); }
protected:
//must be virtual, some one inherit from it
virtual void g(int i) const { ; }
};
class B
{
public:
B() { pa = new A; }
~B() { delete pa; }
//my problem is here: the first argument pa->g
void fb() const { pa->f( (pa->g), 0); }
private:
A* pa;
};
|
|
|
|
|
in the destructor,
before delete pa, check if it has been allocated ( != NULL).
next, for your request, (pa->g) is effectively the address of your function...
if there is a problem, what does the error say ?
TOXCCT >>> GEII power
|
|
|
|
|
i dont think its possible to create a pointer to the member function and use it.
I'll write a suicide note on a hundred dollar bill - Dire Straits
|
|
|
|
|
hey,
i get a very strange compilation error when compiling these files in .net :
//message.h
class Message
{
public:
void GetMessage();
};
//message.cpp
#include "message.h"
void Message::GetMessage()
{
}
//point.h
#include "message.h"
class Point
{
Message m;
public:
void ShowMessage();
};
//point.cpp
#include "point.h"
#include <winsock2.h>
void Point::ShowMessage()
{
m.GetMessage();
}
void main()
{
}
i get this error:
d:\point.cpp(8) : error C2039: 'GetMessageA' : is not a member of 'Message'
d:\test\message.h(4) : see declaration of 'Message'
as you can see there is indeed no function named GetMessageA but i wrote GetMessage , where did this A come from?!?
if i don't including Winsock2.h everything works fine. what does Winsock2.h have to do with it?
|
|
|
|
|
Change the GetMessage function to another name and see what happens. Maybe it gets stacked when trying to access to GetMessage because it thinks that it may access to GetMessageA.
|
|
|
|
|
onece, I also encountered this problem, finally, all went well.
your code above can be compiled without any error, but if you add
some other initialization into one class A(it includes "1.h"), the other class B's implementation file must also include "1.h" for the implementation of object of A in the file.
|
|
|
|
|
Well I was pretty sure that the code above was right !!
Ok then !!
|
|
|
|
|
Some windows include files #define certain things so that you only write code once and it expands the function names out to the correct form. GetMessageA (IIRC) means it is the Ascii (or Ansi) version of GetMessage while if you set some compiler option your error message will change to GetMessageW (which is the Wide character version of the function).
This way you can write compile the code for ASCII and then recompile the same code and get a Wide character version which will allow better internationalisation.
If you #include the winsock2.h on all your files they will all get expanded out to GetMessageA and all will work, if you don't want that to happen then choose a different method name.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
Coming soon: The Second EuroCPian Event
|
|
|
|