|
I've got nothing against this technique and use it myself; but it can't achieve exactly the same result as the example I gave. If you want the members that you're ={0} ing to be members of the class with virtual functions this technique can't be used. I reiterate - in general I wouldn't bother with such confusing constructs - but there are exceptions to every rule.
Steve
|
|
|
|
|
Stephen Hewitt wrote: exceptions to every rule
Well, as long as you catch them properly...
Software Zen: delete this;
|
|
|
|
|
Hi,
My client has a MFC appliation (static library), i did a small modification to couple of files(.cpp) in MFC project & i'm required to send the updated version to my client. My project doesn't have dll's, its just an exe application.
I looked around the internet but cannot find straightforward answer, so my
question is
1. What all i need to send? Just send the newly compiled exe?
2. Is there anyother solution?
Thank you
Mohan
|
|
|
|
|
If the modifications reside in the exe only, then you only need to send the exe. If you made modifications in some external files, you need to send those also. In brief, send what you modified only.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Someone please guide me how to install a font programatically. I mean is there any API call like InstallFont(LPCTSTR lpFontName);
Regards,
Aljechin
-- modified at 5:49 Friday 23rd June, 2006
|
|
|
|
|
Do you see CreateFont
whitesky
|
|
|
|
|
Rather than creating an already installed font, I think what you are looking for is AddFontResource() .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
If I want to press F1 in a dialog to finish the same task as VK_DOWN, how can I do?
By the way, why my CMyDialog::OnKeyDown() can not accept a key strike since I have called SetFocus() in CMyDialog::OnInitialDialog()?Thanks
|
|
|
|
|
Implement PreTranslateMessage.
|
|
|
|
|
zouchao1112 wrote: ...why my CMyDialog::OnKeyDown() can not accept a key strike since I have called SetFocus() in CMyDialog::OnInitialDialog()?
Is OnInitDialog() returning FALSE ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
i wish to ask how to save a file to ftp.without using local files?Like example: i click save to save file.After i type the file name and click save button. then the file will save to ftp directly. any pro help tyty
|
|
|
|
|
|
|
Hi,
After clicking on "add new item" in Visual C++ .NET i choose "new form".
Now if i want a button to show the new form and close the current form what should i do ?
Thanx in advance,
Desmo16.
|
|
|
|
|
Double click the button to generate the handler for the button.
#include "TestForm.h" // change this to your form name(class)
// button1_Click place this code
TestForm *tForm=new TestForm ();
tForm->Show ();
this->Hide();
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
How to change the property sheet back ground color?
Not property page.
|
|
|
|
|
No sweat.
Handle WM_CTLCOLOR in your CPropertySheet derived class and return the appropriate brush handle:
Example:
HBRUSH CMyPropertySheet::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CPropertySheet::OnCtlColor(pDC, pWnd, nCtlColor);
if(CTLCOLOR_DLG == nCtlColor)
{
CBrush brush(RGB(0,0,255));
hbr = brush;
brush.Detach();
}
return hbr;
}
Ovidiu
Microsoft MVP
|
|
|
|
|
I define a struct
struct TAlarmInfo
{
BYTE byType;
DWORD dwNodeID;
char szCenter[LEN_OBJNAME];
char szStation[LEN_OBJNAME];
char szDevice[LEN_OBJNAME];
char szDataItem[LEN_OBJNAME];
...
...
}
I build a client to receive alarm from server.When I receive an alarm.If I check it using char pointer
to access szDataItem,just like
p+5,It works well.But if I use a struct pointer,
struct TAlarmInfo *pAlarmInfo = (TAlarmInfo *)p;
pAlarmInfo->szDataItem,the value is not right.I check the value and find the pAlarmInfo->szDataItem position is past 3 byte off the correct position.
Why?thanks
|
|
|
|
|
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
|
|
|
|