|
<br />
#define va_start(ap,v) ( ap = (va_list)&v + _INTSIZEOF(v) )<br />
#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) )<br />
Ill let you meditate on this
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
i know i know, as i said, i found it !!!!!!!
thanks for reading ;P
TOXCCT >>> GEII power
|
|
|
|
|
I added one video player activex to my MFC base project (CamImage.oce from Axis.com).
Its class name is CAxisCamContror drived from CWnd
|
|
|
|
|
Hi all, I'm developing a filter driver for an audio device and for installation, i'm using and custom made application instead of an inf. For installing the filter driver, I need to insert the service name into the HKLM\CurrentControlSet\Enum\<device-type>\<vendor-id>\<sub-value>. But as i understand, this is a protected area of windows registry and needs permission to be added for the current user. How do i do this in my program? RegOpenKeyEx() fails opening this key. Something like this has been done in an application i ran across a couple of weeks ago (cant seem to find it right now... i think it was from numega). Is there any other suggestions on installing the filter driver? thank you.
-Tareq
|
|
|
|
|
Have you tried installing the filter driver by using an .inf file ? Why can't you use the .inf file ?
I believe you can't write to this area of the registry directly, but your application could try calling RegSrv32 to register the filter driver from it's DLL when it is started, and removing it upon exit ?
Leaving it there is also an option, and you might write a setup program that registers the filter driver if it is not yet registered. And remove it when the application is removed from a system.
If you find the name of the application you mentioned, post it here as well.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
|
Got it to work using SetupDiSetDeviceRegistryProperty() ... didnt know of this.
-Tareq
|
|
|
|
|
Hi All
Im geting the compiler error
error C2440: '=' : cannot convert from 'short (__thiscall CMSComm::*)(void)' to 'short'
on this line
sCommEvent = m_ctlMSComm.GetCommEvent;
sCommEvent is a short and m_ctlMSComm is the control varable for the MSComm ActiveX control
is this error saying it cant convert from a short to a short.
im using VC++ 6
Cherrs Ketil
|
|
|
|
|
|
Its OK figerd it out
I will get me cote
|
|
|
|
|
I having a problem with a control (say an edit box) on a Dialogue or FormView.
in my resource script is as follows
EDITTEXT IDC_EDIT1,34,50,26,14,ES_AUTOHSCROLL | NOT WS_BORDER<br />
PUSHBUTTON "&Size Info",IDC_SIZE_INFO,69,91,56,26<br />
<br />
I've a handler for the button
as follows:
-
<br />
void CMyDialog::OnSizeInfo()<br />
{<br />
CRect ButtonRect, EditRect;<br />
CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
pEdit->GetClientRect(EditRect);<br />
pButton->GetClientRect(ButtonRect);<br />
}<br />
-
<br />
void CMyDialog::OnSizeInfo()<br />
{<br />
CRect ButtonRect, EditRect;<br />
CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
pEdit->GetWindowRect(EditRect);<br />
pButton->GetWindowRect(ButtonRect);<br />
}<br />
-
<br />
void CMyDialog::OnSizeInfo()<br />
{<br />
CRect ButtonRect, EditRect;<br />
CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
::GetClientRect(pEdit,EditRect);<br />
::GetClientRect(pButton,ButtonRect);<br />
}<br />
-
<br />
void CMyDialog::OnSizeInfo()<br />
{<br />
CRect ButtonRect, EditRect;<br />
CWnd *pEdit = GetDlgItem(IDC_EDIT1);<br />
CWnd *pButton = GetDlgItem(IDC_SIZE_INFO);<br />
::GetWindowRect(pEdit,EditRect);<br />
::GetWindowRect(pButton,ButtonRect);<br />
}<br />
in all cases the top and left properties are 0 and 0 and not 34 and 50 (EditRect) or 69 and 91 (ButtonRect). How I get this programatically.
Many thanks
Alton
|
|
|
|
|
You can :
CPoint pt(0,0);
child->ClientToScreen(&pt);
parent->ScreenToClient(&pt);
I believe pt will now contain the position of child relative to parent.
|
|
|
|
|
i want to buit an application that can connect two pc's using LPT1 using LAPlink cable. can some body send me this source code developed in C++. or help me in any other way.
|
|
|
|
|
Inheritance problem
Hello
I'll describe my problem. I've got a vehicle class (cVehicle), and two 'heirs', car (cCar)and van (cVan). The vehicle class has atributes X and Y, car has C and van has V, and both heirs inherit X and Y.
i have a class called Vehiclefactory which has a method which recieves a string with the atributes and it must return a Cvehicle object. Then i must add it to a list.
<br />
CVehiculo* temp = Vehiclefactory.Create (" string with atributes");<br />
VehicleList.Add (temp);<br />
Inside Vehiclefactory.create function, if i get a string with a C, i must create a car, and if i get a string with a V i must create a van
<br />
if (c==C)<br />
{<br />
cCar * car = new cCcar(X,Y,C);<br />
return aut;<br />
}<br />
if (c==V)<br />
{<br />
cVan * van = new cVan(X,Y,V);<br />
return van;<br />
}<br />
but the function returns a cVehicle class, so i lost the car or van atribute.
<br />
class cVehiclefactory<br />
{<br />
private:<br />
FILE *data;<br />
public: <br />
void read (char * filename);<br />
cvehiculo * Create (char data[51]);<br />
};<br />
i really need the create function to return a Cvehicle class, but i need to actualle return a car or a van, to be able to see its atributes and then to add it to a list. these lines of code must be in the program
<br />
CVehiculo* temp = Vehiclefactory.Create (" string with atributes");<br />
VehicleList.Add (temp);<br />
hope you can help me!!
thanks
|
|
|
|
|
CVehiculo could have a private member (with a public accessor) that specifies the type of class (car/van). This member is set in CVehiculo 's constructor. CCar and CVan should pass the appropriate value to CVehiculo 's constructor during their own construction.
CCar (c, x, y) :
CVehiculo (CVehiculo::Type::Car, x, y)
{
m_c = c;
}
CVan (v, x, y) :
CVehiculo (CVehiculo::Type::Van, x, y)
{
m_v = v;
}
You should make CVehiculo 's default constructor private, in order to prevent an uninitialized CVehiculo from being created. You could test the type of object returned by the factory by using CVehiculo 's accessor, eg:
class CVehiculo
{
public:
CVehiculo::Type getType()
{ return m_type; }
...
private:
CVehiculo::Type m_type;
}
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Shouldn't you be able to just cast the return to the type you want.
- Aaron
|
|
|
|
|
|
Like in visual studio for c++ docs it adds support for coloring text "for, if..." how can I make the same text coloring by default?
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
|
When I made an MFC app I included support for 4 recent documents but how can you erase these?
Actual Linux Penguins were harmed in the creation of this message.
|
|
|
|
|
I think you'll have to use the undocumented class CRecentFileList , which manages this file list. The file list is owned by CWinApp , which has the m_pRecentFileList member. This member is protected , so you'll have to add code to manipulate it to your application class which derives from CWinApp .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
I was wondering how I might be able to have multiple child dialogs opening off of the main dialog?
What I mean is, when I click a button in my main dialog to open another dialog using
CDialog dlg;
dlg.DoModal();
it will open the other dialog but I cannot access the main dialog unless I closed the newly opened one. How can I get around this so I can focus the main dialog when the opened dialog is open?
Thanks
Ash
|
|
|
|
|
|
This sounds dumb....but how? hehe
Thanks
|
|
|
|
|
Sorry ill rephrase that... how do I make it a modeless dialog?
|
|
|
|