|
Thanks. I derive a class from cstatic with functions for changing font size and name. I do it by calling CWnd::GetFont, changing what I need and then calling CWnd::SetFont There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Can anyone suggest a library/control for editing HTML that can be added to a program written in C/C++ that only uses the Windows API (no MFC etc). We currently use nBit's HTML Editor OCX[^] but this has some small issues and hasn't been updated since 2006. The library/control will need to be royalty free.
|
|
|
|
|
|
Thanks for trying but MFC is not an option (I did mention that).
|
|
|
|
|
Sorry, I didn't notice it.
|
|
|
|
|
|
I am using visio 2007 in one of the editor in my application, in which I want to add new menu items to the visio objects. That means when I right-click on the object, I should get my new meni item with the sub-menus inside it.The problem here is, I am able to add new menu items to the visio object but sub-menus, I could not add. Can someone help me out by providing me necessary information to resolve this?
|
|
|
|
|
CMFCRibbonPanel class do not implement any method for changing the control name at running time,
I think there should be a method like CMFCRibbonPanel::SetName since there is method like CMFCRibbonPanel::GetName so How could we change the name of this control dynamically?
|
|
|
|
|
0. Try the SetWindowText(..) function
1. Debug the drawing of the text and find an access to the found member virtual void BeHappy() = 0;
|
|
|
|
|
|
When i resize the dialog, the dialog content are redrawed. However, when i click on tiltle bar and drag the dialog the window is not redrawed .... how can i redraw after moving/draging a dialog from one place to another.?? can i handle Mouse WM_LBUTTONUP. how can i do please help. I am using VC++.2005 with MFC dialogs.
|
|
|
|
|
How could you define,
that the window does not redraw itself, please ? virtual void BeHappy() = 0;
|
|
|
|
|
Use a Boolean member variable in your dlg class and initialise it as FALSE. Set it as TRUE in left button Down event. Then check it in the mouse move. If it is true then redraw the dlg contents. Also set it as FALSE in the left button up event.
eg:
BOOL m_bClicked=FALSE;
LRESULT OnLButtonDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
m_bClicked=TRUE;
return 0;
}
LRESULT OnLButtonUP(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
m_bClicked=FALSE;
return 0;
}
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
if(m_bClicked)
{
}
}
|
|
|
|
|
What is the Base class of your dialog? Is it CDialog? Or is it a class derived from CDialog?
|
|
|
|
|
it is class Derived from CDialog.
|
|
|
|
|
What all messages is your derived class handling like
(WM_MOVE, WM_MOVING, WM_PAINT)
If possible please post the code..
|
|
|
|
|
No i am not Handling messages WM_MOVE, WM_MOVING, WM_PAINT for this. thats what i am asking which message fuction should i handle.
|
|
|
|
|
Actually you need not handle any of these messages, because CDialog will do it for you.
This post is duplicate post of your previous question.didn't the solution posted in previous question help you. I have created a sample, and it's working fine
|
|
|
|
|
HI
i am using VC++ 2005
I have a BYTE of data, which is of 8
bits 76543210
.....this BYTE consist of 3 fields in it, which are as follows...
field 1.... bit 0-3
field 2.... bit 4
field 3.... bit 5 6 7
Now I want to extract all these 3 fields and store in 3 differernt variable....
please provide me an efficient way to do it...
thanks in advance
|
|
|
|
|
|
|
Read up on unions and structures - that's the elegant way to do it.
Bitwise-and and right-shifting (suggested by the previous poster) will also do the job nicely.
|
|
|
|
|
field1 = (data & 0x0F);
field2 = (data & 0x10) >> 4;
field3 = (data & 0xE0) >> 5;
|
|
|
|
|
A bit more optimization in field3
«_Superman_» wrote: field3 = (data & 0xE0) >> 5;
field3 = data>> 5;
|
|
|
|
|
Perfect.
|
|
|
|