|
|
How can I change the size of the 3 panes of the status bar?
(the one: m_wndStatusBar)
Thanks!
|
|
|
|
|
|
Can I cast BYTE* to char* , or BYTE* to CString and then back to BYTE ? What should I use for that ?
|
|
|
|
|
Lookup the CP author Mike Dunn. Then look at his String-articles (which he coauthored with Nishant). It should answer any questions you may have on strings.
--
An eye for an eye will only make the world blind.
|
|
|
|
|
BYTE == unsigned char. You can cast it.
You cannot cast BYTE* to CString, it's plainly not an instance of the CString class. CString s((char*)myBYTE*); should work tho.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
You cannot cast a BYTE* to char* or CString, but you can convert it to char* whit this method:
char* CAST(BYTE* bytes,int numberOfBytes)
{
char *result=new char[numberOfBytes];
for(int i=0;i
|
|
|
|
|
A BYTE is the same size as a char, hence you can cast a BYTE pointer to a char pointer.
You can even do the following:
<br />
DWORD d[4] = {0};<br />
char* p = (char* d );<br />
The code isn't going to be more nice with such casts, but you can still get away with it..
Blog[^]
|
|
|
|
|
I have the Id of a control for IDC_NUM1.
how to identify its type using the ID.
advance thanks if anybody let me know
Regards
Chezhian
|
|
|
|
|
Use GetDlgItem to get the window handle/object.
Use GetClassName to retrieve the class name.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Iam using MDI Doc-View architecture.
MY application displays customized controls (not derived from windows controls)on a tool bar.
I need to click on the of the control and drag and drop the control on the client area of the window.
When i drag the cursor should appropriately change to indicate drag operation.
I dont know it should be done in the LbuttonDown and Mouse Move event handlers.But I dont know the exact implementation.I need to know if any articles on this are available.
Please give me the URL.
Thanx in advance
laiju
|
|
|
|
|
I have been going through some assembly code and have seen the following directive:
.org 497
What does it mean? MASM help says something about a location counter. Is this a register, the EIP or what?
I am the handsome one in the crowd.
|
|
|
|
|
The assembler converts your source statements to machine code, which you can think of as an image of what will get loaded into memory. The .ORG directive sets the next location in that image that the assembler will generate instructions or deposit data. The 'location counter' is the how the assembler keeps track of where it is depositing instructions/data in that image. It is not related to a physical register, and in fact does not exist at runtime.
Software Zen: delete this;
|
|
|
|
|
To further note, "ORG" I believe stands for "ORIGIN" and that yes all code from that point forward will be assembled to that offset location.
So what's it used for? Well, it was most commonly used for what was known as "COM" files (Since they commonly used .COM extension, although the loader does not make a distinquish between EXE and COM extensions themselves it uses image signatures) since they are raw image data that is loaded to offset 256 (The PSP is before this) so ".ORG 256" or ".ORG 100h" is commonly seen in some assembly programs.
The other common practice would be for some type of alignment. As an example for boot sectors the last two bytes around 510 need to be 55h and aah as I remember.
To take a guess at what you're looking at, if you are seeing "ORG 497" perhaps you are looking at a boot sector that is putting some variables before this signature.
8bc7c0ec02c0e404c0cc0680f7018827ebee
|
|
|
|
|
i am new in this i was studying C++ and i studied enough but now we have a project that we should do in visual . i chose DVD rental program there is no internet connecttion or anything i was reading through a visual book there are many forms which one i choose MFC ATL or ActiveX.
thanks in advance
|
|
|
|
|
Of the choices above MFC is your best bet.
John
|
|
|
|
|
MFC is, generally speaking, easier. Also, make full use of the articles in here and MSDN[^].
There are a lot of very useful examples in both.
Elaine
The tigress is here
|
|
|
|
|
Thank u both for ur help i appretiate it
|
|
|
|
|
Hi,
Can someone point me to some sites with a good explanation of the bilinear interpolation algorithm to resample images? My searches give me "features" web pages of graphics packages and libraries that implement it, but nothing that explains it well with some pictures and formulas =). I'm hoping someone with experience can point me to a good website on this matter.
What I"m trying to understand is the following quote:
"using bilinear interpolation with a pixel spacing of 1.5 in each direction."
Thanks.
|
|
|
|
|
|
Budric B. wrote:
using bilinear interpolation with a pixel spacing of 1.5 in each direction
Bilinear interpolation means when you do an operation that theoretically requires a pixel position that is not a whole number, you use the fractional part to work out what percentage of surrounding, actual, pixels to use to determine a colour for the pixel that doesn't really exist. As someone else said, I have an article that explains this further and has C# code showing how it is done.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
you use the fractional part to work out what percentage of surrounding, actual, pixels to use to determine a colour for the pixel that doesn't really exist
that actually applies to nearly all interpolation methods.
bi-lin just means using linear interpolation in two dimensions.
(i know you know this - just filling-in)
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
|
I'm trying to find out if my mouse position is on a specific line. I've tried using the slopes of the line and of the mouse position from the starting point but this doesn't work because when you get close to the starting point and the line is almost horizontal the slopes vary greatly.
Has anyone done this sort of thing before?
Thanks
-- Rocky Dean Pulley
|
|
|
|
|
I used this article to hit test a line:
Win32: Hit Testing Lines and Curves
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|