|
Thanks for your resolution, but it still doesn't work! Because the scale of Y dataset is from 0 to 300, but the scale of X dataset is from 0 to 1, so i don't know how to plot them in a harmonic proportion. if i use logarithmic scale on the y axis, the Y axis will not be in proportion to the X axis. on the other hand, i can't change the scale of the axis.
e.g.: i have the following 5 points: (0.5,283),(0.01,186),(0.8,50),(0.1,11). how could i plot them?
Thanks again and have a nice day!
|
|
|
|
|
I have a Picture control on my dialog (taking up about 40% of the area).
I load several bitmaps during InitDialog as follows:
m_Image1.LoadBitmap (IDB_IMAGE1);
m_Image2.LoadBitmap (IDB_IMAGE2);
I have a member variable for the Picture control m_PictureImage
CStatic PictureImage;
Now when I click a button I want the Picture control window to be visable and then have the image loaded:
m_PictureImage.ShowWindow (SW_SHOW);
m_PictureImage.SetBitmap (m_Image1); // Button 1 pressed
All is fine but I need the Bitmap image to be resized, as don't always know its
size.
I cant fins any properties or methods to resize the Bitmap via the Picture control.
|
|
|
|
|
Use the functions of the parent class of CStatic in order to change size of the picture:
m_PictureImage.MoveWindow(0,0,200,300,TRUE);
You have to provide the new cooerdinates as Client coordinates (relative to the upper left corner of you dialog window).
You can also have its size to be equal to the exact bitmap size:
CSize size = m_Image1.GetBitmapDimension();<br />
m_PictureImage.MoveWindow(0,0,size.cx,size.cy,TRUE);
Peter Molnar
|
|
|
|
|
I added the following code onto one of the buttons:-
m_PrimaryFlight.LoadBitmap (IDB_FLIGHT);
m_Flight_Power_Images.SetBitmap (m_PrimaryFlight);
CSize size = m_PrimaryFlight.GetBitmapDimension();
m_Flight_Power_Images.MoveWindow(0,0,size.cx,size.cy,TRUE);
But no image appeared on the picture control, in fact size.cx and size.cy have the following values -858993460.
Note: m_PrimaryFlight is type CBitmap and m_Flight_Power_Images is type CStatic ( the picture control).
I am sure almost there, but one question @When adding control variable to the Picture control is iss of type CStatic, I would have though it would be of type CPicture.
Any comments?
|
|
|
|
|
Try to insert a line after
CSize size = m_PrimaryFlight.GetBitmapDimension();
by replacing CSize with some realistic value according to your loaded bitmap:
size.cx = ...; size.cy = ...;
In this way you will see whether the problem is with GetBitmapDimension() or MOveWindow().
Don't forget: the first parameters of MoveWindow are the upper left corner of your CStatic in client coordinates. If you code (0,0, size.cx,size.cy ...) then your Picture will be moved to the upper left corner of your dialog. If there is any other control at this position, your controls will conflict with each other.
Therefore try different values for the coordinates.
Peter Molnar
|
|
|
|
|
Still got a problem, GetBitmapDimension() return strange values (larger and negative) also MoveWindow just moves the bitmap (no resizing) to other locations on the dialog.
I thought that using the Picture control would be simple.
To recap it displays the bitmap(s) at the right location, just does not resize them to fill the required area; or in this case srink down the images to fit on the picture control.
Any other idears?
|
|
|
|
|
hi,
can someone pls tell me how can i make a graphic editor?
like the one they have in visual studio 6 resource editor where they let us edit the bitmap pixel by pixel and while we are editing it..simultaneously they show us the result in a corner...
can someone tell me how can i make a software to do that??
what language should i use?
what control is that that reperesents the pixels???
tks a lot for any help...
Have a Super Blessed Day!
-------------------------
For God has not given us a spirit of fear, but of power and of love and of a sound mind.
2 Timothy 1:7
"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."
John 3:16
"Therefore you also be ready, for the Son of Man is coming at an hour you do not expet."
Luke 12:40
|
|
|
|
|
Hi Joseph,
You can of course write your program from scratch but there are some workarounds:
1.If you are satisfied with what M$ Paint offers then you can host it in your application using automation.
This can be coded in no time and is an alternative for every plain Windows version from 98, no Office needed.
2.Third party libraries offer such features, e.g.: BCGControlbar standard version has such a built-in functionality. If interested see http://www.bcgsoft.com[^]
Peter Molnar
|
|
|
|
|
Hey,
i have my own kernel32.dll and i also have a test program which should use it! How do i tell the program that it should load my Kernel32.dll and not the Windows Kernel32.dll ? Has someone an idea ?
Thanks in advance!
|
|
|
|
|
what!!! One of the reason for creating COM was to eliminate the accidental versioning problem, and you want to purposely create the version prob,you must be out of ur head.
Peace
The World is getting smaller and so are the people.
|
|
|
|
|
don't panic! if you know how, then please tell me!
Thanks!
|
|
|
|
|
ok, Which program are you talking about that wants to use ur kernel32.dll
if its ur kernel32.dll then you should gives its full path from where you are trying to load the dll. If its other applications that you want to load ur dll then simple copy ur kernel32.dll into system32 folder in ur windows directory.
Hope i answered ur question.
cheers.
The World is getting smaller and so are the people.
|
|
|
|
|
Kernel32 is very, very tightly linked to the version of Windows that it's installed with. You'll notice how whenever Microsoft make a patch to NTOSKRNL.EXE or CSRSS.EXE on Windows 2000/XP/Server 2003, they also ship a new version of kernel32.dll.
DO NOT DO THIS.
Normally you can redirect a DLL by copying it into the same directory as your application, but this won't work for kernel32.dll because that's where Windows starts your process: in the BaseProcessStart function in kernel32.dll (see Inside Windows 2000 [Solomon & Russinovich, MS Press]). Once a DLL is loaded, Windows will use the one it's already got rather than loading a different version with the same name (IIRC).
It might help if you explained the effect you're actually after - perhaps you're trying to inject some code into a different process? If you explain that, you might get more help.
|
|
|
|
|
good! here's what i want to do:
I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed!
Is there a way at all?
|
|
|
|
|
hph wrote:
good! here's what i want to do:
I have written a program which injects some code into a .exe or .dll file to make them depended on a additional dll! It works great with nearly every .exe and .dll file but my goal is to reach this result also with the kernel32.dll! So the problem is that i can't simply replace my kernel32.dll with the original one, because it's not allowed!
Exactly: Kernel32.dll is part of the OS. You can't use another one. You'd only be able to do this by bundling the whole OS with your app. That's it. Also, several other DLLs won't work too, although they may seem to work at first sight: all related to winsock, printing, GDI, sound subsystem, DirectX, etc.
There is a place (sorry, I don't recall where right now) on MSDN that lists which DLLs you shouldn't mess with.
What you want could theoretically be accomplished with Linux, but not with Windows.
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
|
What are you trying to acheive? Like somebody has already stated, kernel32.dll has to be linked tightly to a compiled win32 executable. Stubbing kernel32.dll I would imagine would be almost impossible.
|
|
|
|
|
Hi,
I have created a Named Pipe with a security descriptor that contains a NULL DACL to allow everyone to access the pipe on a server application and have also created a client application to connect to it. All works fine if client and server are on the same machine but i get a
0x0000052e Logon failure: unknown user name or bad password.
When using a remote client.
Anybody shed some light on this will be appreciated.
Ceri
|
|
|
|
|
Hi!
Need some help with a converting problem.
I will have my time in a buffer, but it complain on the converting. See code :
int main(){
char hour,minute, second;
int hh, mm, ss;
char buffer[10];
time_t times;
tm * ptm;
time ( × );
ptm = gmtime (×);
hh = ptm->tm_hour;
mm = ptm->tm_min;
ss = ptm->tm_sec;
hour = itoa(hh);
minute = itoa(mm);
second = itoa(ss);
strcpy(buffer, hour);
strcat(buffer, ":");
strcat(buffer, minute);
...
return 0;
}
the message that occur when I compile is
ctid.cpp: In function `int main()':
ctid.cpp:44: error: invalid conversion from `char*' to `char'
ctid.cpp:45: error: invalid conversion from `char*' to `char'
ctid.cpp:46: error: invalid conversion from `char*' to `char'
Thankful for your help
|
|
|
|
|
there is not x. it is ×
|
|
|
|
|
You gave all the lineno where the error is , but you forgot to number the line in ur code.
The World is getting smaller and so are the people.
|
|
|
|
|
|
Does any one know how to use the Mci32.ocx component or direct me to the documentation of the same.
regards,
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
hello
i want to get the user info that is the information of domain name workstation and the user using the netbios api and NCB structure and name buffer structure please tell me how to use these structure in Netbios command can u give me the example
|
|
|
|
|
MSDN is full of examples. The one I am familar with is article Q118623. You can also Google the Net for tons more.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|