|
Because class B inherits from both class A and class iB , it has to deal with two different vtables. Therefore you need to provide method AA of class iA in both vtables and that is the source of the error message: the implementation for class iB is missing.
Just write a wrapper method AA in the class B , calling A ::AA ; this will redirect iB ::AA to A ::AA .
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
We are trying to capture ctrl + char keys from keyboard for the list control. We are not able to get good help. We even tried with lvn_keydown but not working. Is there a way to find the solution.
Thanks & Regards,
RK (HYD)
azghar
Live and Let live
|
|
|
|
|
Processing the LVN_KEYDOWN notification will work, I've tested it. You just need to check if ((LPNMLVKEYDOWN)lParam)->wVKey=='F' and then check the state of the control key, it is pressed when the test (GetKeyState(VK_CONTROL) >> (sizeof(SHORT)-1)) returns non-zero.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
Override PreTranslateMessage
if(pMsg->hwnd == m_List.GetSafeHwnd())<br />
{<br />
SHORT nCtrlState = GetKeyState(VK_CONTROL);<br />
if(nCtrlState && pMsg->message == WM_CHAR)<br />
{<br />
}<br />
}
|
|
|
|
|
how can i know the NIC number of network card using winsock or any other method
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
http://www.mastishk.com
|
|
|
|
|
When you say NIC number are you looking for the MAC address? If so you may want to check out this.[^]
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi all,
i like to deactivate my Dialog Button IDC_STOP_ROBOT.
Seems like no big deal, but when useing the syntax below nothing happens?
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(FALSE);
.. or enable again:
GetDlgItem(IDC_STOP_ROBOT)->EnableWindow(TRUE);
happy coding,
-mark
|
|
|
|
|
CWnd* pWnd;<br />
pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT);<br />
pWnd->EnableWindow(FALSE);
AND
CWnd* pWnd;<br />
pWnd = (CWnd*)GetDlgItem(IDC_STOP_ROBOT);<br />
pWnd->EnableWindow(FALSETRUE);
if it doesn't work try rebuilding all.
(now I noticed it's actually the same... )
Hope it helps.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
macmac38 wrote:
...nothing happens?
At what point(s) are you calling EnableWindow() ?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi All,
Using VSFlexGrid.
I want a combobox in 1 cell to be only readonly.
In the Beforeedit event,I set the cancel to "true".
In the OnClick event,I have this.
std::string test("|Hello|Text|test1");
m_flexGrid.SetComboList(test.c_str());
But I couldn't see the combobox dropdown list.
Would be nice if u could help me...
Thanks...
|
|
|
|
|
I'm using CHtmlView in my application to display html's store on the local machine. But when i navigate to some locla page sometimes the images there are not displayed. The image path is correct. It's something like "c:\images\image.jpg". Where is the problem. In caching, in backward slashes?
|
|
|
|
|
Hmm... interesting.
I once wrote a program that stored the HTML sources inside the rc-file, worked fine for HTML, didn't worked at all for jpg's. So I put the jpg's in a relative adress to the program -> wokred fine.
In other words, the problem you are describing here worked fine back then when I tryed it (VS6 a few years ago), so I guess the problem lies in the HTML-Source.
Can you please post the HTML-Source around the problem? (right click, view source when the program is running.)
|
|
|
|
|
Thanks for the quick answer.
I can't put the HTML in res-file because it's dynamicly created and also i can't use relative paths but abosolute bacause the paths are also dynamic. The HTML for the images is:
It works but when i right click and refresh the page sometimes some of the images doesn't appear. This is inexplicable for me.
|
|
|
|
|
How should the assignment operator be written for the following class?
<br />
class CTest<br />
{<br />
private:<br />
const int m_test;<br />
<br />
public:<br />
CTest(int i) : m_test(i)<br />
{<br />
}<br />
<br />
CTest(const CTest& rhs) : m_test(rhs.m_test)<br />
{<br />
}<br />
<br />
~CTest()<br />
{<br />
}<br />
<br />
CTest& operator=(const CTest& rhs)<br />
{<br />
}<br />
};<br />
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
CTest& operator=(const CTest& rhs)
{
m_test = rhs.m_test;
return *this;
} Yes, you can see the private members of another instance of your class. Returning a reference to the current object allows assignments to be chained.
Interestingly, even though you haven't written an operator=(int) , because you have an implicit constructor that takes an int , you can write:
CTest tst( 4 );
tst = 9; which constructs a temporary CTest and calls operator= . If you don't want this, mark your constructor explicit .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks for trying to help but the member variable is a const int which generates the compiler error 'l-value specifies const object' if I implement your suggestion. The class shown is just the simplest example I could put together to show my problem.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
My understanding is that the only time a const member variable can be initialized is in the member initialization list of the constructor. So unless you are just trying to solve a puzzle for a class, I wouldn't try to get around this rule in professionally designed code. If the variable is const, it is const for a reason; meaning it should never change once it is initialized. Once it is initialized by the constructor, whether it be the default constructor or the copy constructor it should never be changed!! That is why it is const. If it needs to be changed then it should not be const. It is as simple as that in my mind.
Now some super programmer might reply with some crazy way of actually making it happen; but again, it is not good programming style. Const has a special meaning and to make a member variable const and then try to undo that is a bad style in my opinion. Either the variable needs to be const or it doesn't! Since const variables must be initialized in the member initialization list of the constructor anyway, there seems to be no reason why you'd ever want to copy it in the assignment operator anyway because the value would be the same for all classes anyway!
Regards,
Shawn
|
|
|
|
|
How can I lock the keybord and mouse?
I need to be able to disable the keybord and mouse how do I do this.
Plese help me.
|
|
|
|
|
Now a days i am working on a software , which will run specific scheduled tasks at certain time.What should be the technique to develop this software.
One obviouse way is using Timers , but is there some built in notifications by windows.which could infrom my application at certain time.
My schedule may be like this
Task1 12:30:30 PM 7July 2004
Task2 2:30:30 PM 7July 2004
Task3 1:30:30 AM 8July 2004
Task4 12:30:30 PM 8July 2004
etc.
Unmanaged in a .NET world
|
|
|
|
|
If you want your process to do the work, use CreateWaitableTimer. This will allow you to put your process into an efficient sleep, to be awoken at the appropriate time (or other circumstances, like a Windows Shutdown...).
Otherwise, submit the tasks to the internal Windows Task Scheduler, which is capable of performing various types of 'jobs'.
|
|
|
|
|
Hi,
I am trying change desktop bkcolor without restart,logoff-logon or using control panel.
I opened the spy to get handle desktop listview,after that i write this code:
(HWND)0x00030074-->this is what desktop listview handle
...
ListView_SetBkColor((HWND)0x00030074,RGB(255,0,0));
...
it is work until desktop get WM_PAINT,(you can see it by spy++)
after desktop got WM_PAINT,desktop bkcolor getting old value which is defined in
'HKEY_CURRENT_USER\Control Panel\Colors\Background' key value.
i changed 'HKEY_CURRENT_USER\Control Panel\Colors\Background' key value what i want
and added this code because i wanted to take effect registry without logoff-restart
::SendMessage((HWND)0x00030074/*HWND_BROADCAST*/,WM_SETTINGCHANGE,0,0);
it is not work.
ı thing control panel settings can not be changed WM_SETTINGCHANGE message...
i want to change desktop bkcolor like control panel display settings.
How can i do that ??
Thanks,
repekcan
|
|
|
|
|
I think you want to call SetSysColors:
const int aElements[] = { COLOR_DESKTOP };
const COLORREF aColors[] = { RGB( 255, 0, 255 ) };
SetSysColors( 1, aElements, aColors ); Not tested, no warranty
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
yes,it is change desktop bkcolor
|
|
|
|
|
Hi,
I am automating Word 2000 and I want to disable the "Ctrl C" keyboard functionality. (Using VBA I am successful in disabling the "Ctrl+C" by doing this - "Application.FindKey(BuildKeyCode(wdKeyControl, wdKeyC)).Disable")
I am using the following C++ automation code which gives me the DISP_E_EXCEPTION error code on IDispatch::Invoke for "Disable" method ("AutoWrap" function below is a wrapper around IDispatch::Invoke). Here is my C++ code:
parm1.vt = VT_I4;
parm1.lVal = wdKeyControl;
parm2.vt = VT_I4;
parm2.lVal = wdKeyC;
VariantClear(&result);
AutoWrap(DISPATCH_METHOD, &result, pWdApp, L"BuildKeyCode",2,parm2,parm1);
parm1.vt = VT_I4;
parm1.lVal = result.lVal;
VariantClear(&result);
AutoWrap(DISPATCH_PROPERTYGET , &result, pWdApp, L"FindKey", 1,parm1);
pWdKey = result.pdispVal;
AutoWrap(DISPATCH_METHOD, NULL,pWdKey , L"Disable", 0);
Error :
"This method or property is not available because this document is in another application"
I will appreciate any help on this.
Thanks.
Vishal
----------------------
Vishal More
|
|
|
|
|
Is there any good article about this? Thank you
|
|
|
|