|
how can i use toolbar control in my activex control.
thanks! every one
|
|
|
|
|
see:
http://www.codeproject.com/script/comments/forums.asp?msg=550923&forumid=1647#xx550923xx
and
http://www.codeproject.com/script/comments/forums.asp?msg=549039&forumid=1647#xx549039xx
now my test result is :
the clean app works, but the clean DLL does not.
a good man in china
|
|
|
|
|
what is the different between the the framewrok of the win32 DLL and that of the win32 appliacation in vc++ 6.0 ??I encountered a problem ,and i have to know that,where can i found the information.??
a good man in china
|
|
|
|
|
Your question really does not make sense. As I said two days ago when you asked a similar question, a DLL is a part of an application. However this knowledge will in no way help you solve a problem with your DLL or your application.
John
|
|
|
|
|
gdzfy wrote:
I encountered a problem
Could you explain your problem? Maybe we can help.
John
|
|
|
|
|
yes,two days ago i intented to ask this question ,but i wrote the wrong sentence and ask the thing i had know.
well,here is my problem: I am making the SDK programing----writing a dll,and I have to open a driver(impeg32.dll) firstin order to use the API.THAT is I have to use the
Opendriver() In my dll,but it fails.
Maybe you can see the thread i had askde three days ago:
http://www.codeproject.com/script/comments/forums.asp?msg=548929&forumid=1647#xx548929xx
thank you very much!
a good man in china
|
|
|
|
|
Your question makes sense now. Thanks. You are asking what is different about a win32 dll from a win32 application that could cause the dll not to be able to open a device driver using OpenDriver() while the application can. I'm sorry I too have never used the OpenDriver() command.
John
|
|
|
|
|
well,that is all right.
a good man in china
|
|
|
|
|
|
How do I make a simple C solution in VS.NET??? just a C console application...
/\ |_ E X E GG
|
|
|
|
|
doesn't look like there is a way.
maybe you could start with a C++ console app then take out the stuff you don't need, and add a .C file.
i needed to start a Win32 DLL in VS.Net last week. there's no way to do that either. so, i started on in VC6, then opened it in VS.Net.
-c
CheeseWeasle
|
|
|
|
|
Chris Losinger wrote:
i needed to start a Win32 DLL in VS.Net last week. there's no way to do that either. so, i started on in VC6, then opened it in VS.Net.
Sounds like a hassle.
-Nick Parker
|
|
|
|
|
First, I assume you mean a simple C++ console app. No reason to use C.
To do this in VC.NET 2003 (2002 will be similar):
Click File|New|Project.
Click on "Visual C++ Projects"
In the right hand list box, scroll down to "Win32 Console Project"
Enter the name and location in the appropriate spots and click "OK".
(You can also select "Win32 Project." When the wizard comes up, click on "Application Settings" on the left and then "Console Application", and any other options on the right.)
|
|
|
|
|
I would like to write a short application using Wininet that interacts with search engines of websites that use php scripts and specifically the POST method to search their database. Where can I find some information concerning these topics?
|
|
|
|
|
I'm having a problem using AnimatePalette. My application's main window is a CFrameWnd subclass with a CView subclass. The CView handles WM_PALETTECHANGED and WM_QUERYNEWPALETTE. All of the graphics in the view are done in child windows. These windows are all of a subclass of CWnd. All are transparent, as they are graphics overlaid on to frame-grabbed video displayed by the CView. Some of the overlaid graphics have to blink on and off, so the parent (CView) window calls SetTimer in its WM_CREATE handler and has a WM_TIMER handler which switches the blinking palette entries from the background color (black in this case) to the foreground color (green in this case) and back by using AnimatePalette. The child windows Select and Realize the palette in their WM_PAINT handlers. This all seems to work just fine.
I have blinking graphical entities in two of the child windows. If I hide one of the windows, the entities in the other window STOP blinking! If they were "off" (i.e. background color) when I hid the sibling window, they never come back "on" (i.e. foreground color) or if "on", they never go back "off" until I show the hidden sibling window again. (I've set up an WM_KEYUP handler to hide/show the child windows).
What am I doing wrong? My CPalette is a data member of the parent (CView) window. Each of the child (CWnd) windows has a data member which holds a pointer to the CPalette object in the parent.
Bill A.
|
|
|
|
|
I have been aligning(16 byte) certain data types to allow me to use SSE commands on them, and have no problems apart from when I create instances of them on the stack, where I get a runtime exception in debug mode, complaining about the stack being corrupted when I leave the function that uses it, ie
void SomeProc()<br />
{<br />
Vector vec;
<br />
<br />
}
so I'm having to do
void SomeProc()<br />
{<br />
Vector *vec=new Vector;
<br />
<br />
delete vec;<br />
<br />
}
which is time consuming. I have implemented ways to speed it up, but I would like to know if there's a simpler way.
Thanks,
G
|
|
|
|
|
AFAIK changing the default alignment for a structure mustn't cause stack corruption issues. Maybe if you post the code for SomeProc we can spot the root of the problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Right: the class vector is defined thus:
#define jALIGN __declspec(align(16))<br />
<br />
typedef jALIGN struct VecData {<br />
float x;<br />
float y;<br />
float z;<br />
float w;<br />
}VecData;<br />
<br />
class Vector {<br />
public:<br />
protected:<br />
VecData m_vec;
};
and the test procedure is
Vector vec(1.0f,1.0f,1.0f,1.0f);<br />
Vector vans=mat1*vec;<br />
PVec(vans);
Where PVec just prints out the value of the vector.
mat1 is a matrix defined thus:
typedef float jALIGN jMat[16];<br />
<br />
class Matrix {<br />
public:<br />
protected:<br />
jMat m_mat;<br />
};
and the transformation function for the non-SIMD version (it happens on all versions) is
Vector Matrix :: operator * (Vector &v)<br />
{<br />
float x,y,z,w;
float vx,vy,vz,vw;
<br />
v.Get(vx,vy,vz,vw);<br />
<br />
x=( vx*m_mat[jMatIdx(0,0)] ) +<br />
( vy*m_mat[jMatIdx(1,0)] ) +<br />
( vz*m_mat[jMatIdx(2,0)] ) +<br />
( vw*m_mat[jMatIdx(3,0)] );<br />
y=( vx*m_mat[jMatIdx(0,1)] ) +<br />
( vy*m_mat[jMatIdx(1,1)] ) +<br />
( vz*m_mat[jMatIdx(2,1)] ) +<br />
( vw*m_mat[jMatIdx(3,1)] );<br />
z=( vx*m_mat[jMatIdx(0,2)] ) +<br />
( vy*m_mat[jMatIdx(1,2)] ) +<br />
( vz*m_mat[jMatIdx(2,2)] ) +<br />
( vw*m_mat[jMatIdx(3,2)] );<br />
w=( vx*m_mat[jMatIdx(0,3)] ) +<br />
( vy*m_mat[jMatIdx(1,3)] ) +<br />
( vz*m_mat[jMatIdx(2,3)] ) +<br />
( vw*m_mat[jMatIdx(3,3)] );<br />
<br />
x/=w;<br />
y/=w;<br />
z/=w;<br />
w=1.0f;<br />
<br />
return Vector(x,y,z);<br />
}
where jMatIdx is
#define jMatIdx(x,y) ( ((y)<<2) + (x) )
Hope this helps.
|
|
|
|
|
Ummm... Everything seems fine. Where is jALIGN defined? Is it possible that "vector.h" (or whatever the name of the file where Vector is defined) could be #include d in contexts where the definition of jALIGN differs?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
No, it is defined in a single header file. For the moment, as I can't get around this, I have scrapped the alignment and just rewritten the SSE code, but it is annoying!
|
|
|
|
|
hi I need to deal with a web cam So I need to know how to get data from it and wich format and how to display it but all I found in codeproject was done by C# and .NET but I need something in VC or some basic Ideas
thanks in Advanced
|
|
|
|
|
Try searching the MSDN for the example program vidcap.
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
SYSTEMTIME structure looks like this:
typedef struct _SYSTEMTIME
{
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;
I have a SYSTEMTIME object I want to store in the registry. What is the best way of doing this? Must I add each member to the registry or is there an easier (more elegant) way?
Thanks
|
|
|
|
|
You might try to store it as a DWORD in the registry, but I'm not sure whether it works.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I do not understand your "answer". I can convert the SYSTEMTIME structure of 8 WORDs into 4 DWORDS perhaps, then I only have 4 keys to store, yes? How would I get 2 separate WORDs from a DWORDs? One as a low value and the other as high value?
|
|
|
|