|
certainly because of the compiler's bytes padding...
search the MSDN for #pragma pack/pop
BTW, pAlarmInfo->szDataItem is the right way to do it !
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
zhangbaodi wrote: If I check it using char pointer
to access szDataItem,just like
p+5,It works well.
If p points to the beginning of the structure, then p+5 should not point to the szDataItem member. That indicates something is awry with the byte packing.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i am a new programer in mfc.now i met a problem.I want to draw objects such as line ,rectagle,stroke etc. and need these objects can be resize,move,rotate in interactive mode which means interation with mouse.I can realize it with CRectTacker and it works well.Now i want to rotated these objcets. i can rotate these objects in "GDI+" ,but not in the interacive moode.if someone have realize it , i will thanks for your helping in advance.Please give me some advice.i could not find some topics about this.
|
|
|
|
|
if you need to draw line and ... see CDC its good
whitesky
|
|
|
|
|
i can draw roate the objects ,but i want to drag ,resize , move ,rotate these objects in realtime mode
|
|
|
|
|
hi again
i am sorry to disturb you again
but i make an application in which many dialog boxes are there on first dialog box a button is there now i want to change its color
but code does not help
if(nCtlColor == CTLCOLOR_BTN)
{
hbr=CreateSolidBrush(RGB(0,100,0));
pDC->SetTextColor(RGB(0,0,255));
pDC->SetBkColor(RGB(0,100,0));
}
now when i make ownerdraw property of button true the application does not run and if i make ownerdraw property false the application runs
i dont understand the problem
so plz tell me what is the problem
thanks
Ashish Dogra
MCA
Noida
|
|
|
|
|
I answered to you in previous see
whitesky
|
|
|
|
|
Hi,
I tried to add a CPP file with HPP file which contained one or more classes using Namespaces in my MFC SDI application.I got this error..
error:
C1010 unexpected end of file while looking for precompiled header directory.
But I added the same CPP file by creating a Empty Win32 Console Application where the application run successfully.
Help me..How to avoid this error.
|
|
|
|
|
Add the line
#include "stdafx.h"
at the top of this file.
Or you can also disable precompiled headers for this file (right-click on the file and go in the properties).
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Hello can any one explain about the clip sibling property of any dialog,
and clip children property of dialog.
The macros are : WS_CLIPSIBLINGS, WS_CLIPCHILDREN
I could not understand where it is useful.
I want to know what is use of these two properties.
Thanks.
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
as far as I know, these window styles are not really related to dialogs but rather to generic windows such as controls, overlapped windows etc... both have to do with drawing windows to limit the amount of drawing that needs to be done in a particular window
WS_CLIPCHILDREN
Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window.
WS_CLIPSIBLINGS
Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.
ClipSiblings is quite useful if you have child windows overlapping and you are custom drawing something inside of the window...it basically keeps you from drawing in to the wrong window
cje
|
|
|
|
|
Hi to all,
I am using 'Windows Media Player' in VC++6 from 'Registered ActiveX Controls'. The code is working fine on my PC (Xp Professional). But when I run the exe on other PC, it is creating a problem.
On other Xp Professional, it shows an error message as "unhandle win32 exception occur in exe" & ask for debug.
While on Windows Server the exe is not ruuning.
What should i do? Plz. help me.
Best Regards & Thanks,
Aniket Salunkhe
|
|
|
|
|
Aniket Salunkhe wrote: ...it is creating a problem...What should i do?
Has the ActiveX control been registered on the other machine(s)?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
If not, then how to register it. (If possible explain in detail.)
|
|
|
|
|
regsvr32.exe comes to mind.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
But where is the ActiveX Control located? I did not obtained the location of ActiveX Control. Actually location "C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Gallery\Registered ActiveX Controls" is empty. What should i do?
|
|
|
|
|
Aniket Salunkhe wrote: But where is the ActiveX Control located?
Have you looked for wmp.dll ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
Thanks for ur all previous useful suggestions.
But how to know ... which dll should be used for any ActiveX Control?
( e.g. which dll should be used for MS Flex Grid Control? )
Thanks & Best Regards,
Aniket Salunkhe
|
|
|
|
|
Aniket Salunkhe wrote: ( e.g. which dll should be used for MS Flex Grid Control? )
That would be in msflxgrd.ocx.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks.
But my que. was "How I can know which is the supporting file(s) for any (other) ActiveX Control?"
From where you come to know that,
msflxgrd.ocx : for MS Flex Grid AND
wmp.dll : for Windows MEdia Player
Best Regards,
Aniket
|
|
|
|
|
One clue is the filename. The other is to right-click the file and select Properties from the context menu.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Ok, guys. This might seem too much of a theoritical question for a forum. But the problem is, I havent read anywhere a convincing account for the having preprocessor derictives like:
<br />
#ifndef SOMETHING_H<br />
#define SOMETHING_H<br />
<br />
<br />
#endif<br />
They say it is for conditional compiling! But what does that mean? What exactly do statements like #ifndef instruct the compiler to do?
Abhishek
|
|
|
|
|
(From the docs)
The #ifndef directive checks for the opposite of the condition checked by #ifdef. If the identifier has not been defined (or its definition has been removed with #undef), the condition is true (nonzero). Otherwise, the condition is false (0).
This is useful for checking whether a definition exists, because a definition can be passed from the command line.
Literally means. If not defined , Define it now.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
These look like reinclusion guards. It stops the same .H file from being processed multiple times in the same compilation unit as this can cause problems. i.e.
------------------------------------
// File "a.h"
//
class CMyClass
{
public:
CMyClass() {}
};
// File "b.h"
//
#include "a.h"
// File "Main.cpp"
//
#include "a.h"
#include "b.h"
------------------------------------
This will casue problems as the class "CMyClass" is defined twice in the compilation unit "Main.cpp": once via "a.h" and once via "b.h" which includes "a.h". Reinclusion guards stop this kind of thing.
Steve
|
|
|
|
|
Ok. In that case when we use
#ifndef SOMEFILE_H<br />
#define SOMEFILE_H<br />
<br />
<br />
#endif
what is SOMEFILE_H ? is it another SIGNATURE to indicated something exists or not? Is it visible to the compiler or only to the preprocessor?
Abhishek
|
|
|
|