|
I'll look for it , hopefully it will help
Thanks
|
|
|
|
|
After installing Platform SDK (and setting the include and lib directory in VC++ 6) I am facing a problem with "new" as follows.
when I allocate memory:
if(m_NoData>0)
{
I=new int[m_NoData];
for(i=0;i
|
|
|
|
|
First of all, you haven't closed your 'for-loop' with a ')', but i'm assuming that's a typo and probably isn't the reason for the error. What kind of type is "I" and "m_NoData"?
|
|
|
|
|
How did you set the include and lib directory? I have seen people doing that manually when in fact you should go to Programs->MS SDK Folder(whatever name you're using)->Visual Studio Registration->Register PSDK etc...
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I have a DLL I need to use, and it came with a header file and a DEF file. They appear to have been written in C. I need to make a LIB file from the DEF file before the DLL is useable. I tried using the LIB command with the /DEF switch, but I must not be using it correctly. I also found instructions to modify the header file, compile to get an OBJ file, and then use the LIB command to create a LIB file, but I didn't succeed at that either. Does anyone know how to do this? Here's part of the header file.
#if defined(CALLED_DLL)
# define DLL_IMPORT __declspec(dllexport)
#else
# define DLL_IMPORT __declspec(dllimport)
#endif
extern "C" int DLL_IMPORT __stdcall StoreX(
char* FilePath,
char* ServerAddress
);
#endif
Here's the DEF file:
LIBRARY MYDLL.DLL
EXPORTS
StoreX@80 @1 ; StoreX
|
|
|
|
|
Usually its :-
LIB /DEF:<.DEF file name>
to generate the import library and exports file. The base name of the import library will be the base name of the .DEF file. Use /OUT: to control the output library name.
This is from Microsoft KB Article 131313 (was Q131313)
http://www.codeproject.com/cpp/libfromdll.asp[^] may also be of some use
'hth', Garth
|
|
|
|
|
I want to be able to pass an array of structures in on dialog class to another inorder to update and edit or add, this is being done inorder to limit access in the main dialog and keep the input for the end user simple. This was originally three programs that were originally compiled in C and then in C++, but have decided to combine all three into one using dialogs Can some one help me please
Candleman
|
|
|
|
|
Are the dialogs modal? and in which order are they displayed??
but.. you can make just a public member to the both dialogs:
class Dialog1{
public:
MyArray m_Array[A_LOT];
};
class Dialog2{
public:
MyArray m_Array[A_LOT];
void CopyArray(MyArray*);
};
Dialog1 dlg1;
dlg1.MakeStuff();
Dialog2 dlg2;
dlg2.CopyArray(dlg1.m_Array);
dlg2.MAkeStuff();
|
|
|
|
|
Hi, when i install a application using datagrid in a no-VC environment and register msdatgrd.ocx by regsvr32 msdatgrd.ocx, and run application, i was told that the data can not be bind. Is there any dll or ocx I need to register or installed?
Thanks.
|
|
|
|
|
Actually msdatgrd.ocx is the only thing you need to install. Did regsvr32 tell you that the ocx file was registered successfully? What tells you that data cannot be binded? Are you sure that it is DataGrid related, because if DataGrid was not registered your program would crash giving you a memory write error?
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
I am working on tape backup application. I have just started my work. I want to develop this application using SDK tape library but i am unable to find any sample code. If some can provide me some sample code that would be great.
|
|
|
|
|
Hi,
Is it possible to put a circle in a pane of a status bar ?
I want to give a visual clue of warning like: green circle it's Ok, yellow circle it's borderline, re circil it's inacceptable.
Thanks,
Claude
|
|
|
|
|
|
I have tried to use this one to get Video Card information
particulary driver information. When I try to open Resource
View there is an error message pops up saying "atlres.h"
can't be found. Some one has the same experience?
Shin
|
|
|
|
|
|
Hi there,
please help me here!
is there a way i can insert, a ruler in a plain text editor like the one in word pad/Microsoft Word so that i can be able to format, my words or pictures for printing.
How can i also insert static text in a text editor?.
Very gratefull in advance.
thanks
|
|
|
|
|
I developed a application and used datagrid control in this program. Now I want to install this application in no VC environment but I found it did not work? Could anyone tell me how to deal with it?
|
|
|
|
|
Hi,
Does anyone knows how to register a DirectX filter (*.ax) from a application program without using Regsrv32 xxx.ax?
|
|
|
|
|
Call the DllRegister method of the DLL.
You might not have to do this: it is possible to use a filter directly in your program without having registered it. I'm assuming that intelligent connect won't find it and you have to do some weird stuff (use the new operator on a COM object). Search for a SampleGrabber example program on MSDN. I found it a while ago for an older version of DirectX, and did some fiddling but I got it to work.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
Hi, all
I am experiencing a problem with the Rich Edit box (version 1.0) using regular Win32 API (no MFC). I am trying to write a function that will search through a specified range of content in the control (the text). I am using the SendMessage() function with the EM_FINDTEXTEX flag and the FINDTEXTEX structure. But the problem is that it can’t seem to find any matches. For ex. I have set the control with the text “is there any matches?” and I set the function to search for the word “any” but won’t find any thing. The function has been written to return the number of matches it finds, the following code is the function I have written. Can anyone please help me figure out the problem?
int FindText(HWND hEdit, char *Text, CHARRANGE *Range) {
FINDTEXTEX TextSearch;
int MatchCount = 0;
int MatchFound;
TextSearch.chrg = *Range;
TextSearch.lpstrText = Text;
TextSearch.chrgText.cpMin = -1;
while (1) {
MatchFound = SendMessage(hEdit, EM_FINDTEXTEX, FR_WHOLEWORD, (LPARAM) &TextSearch);
if (TextSearch.chrgText.cpMin != -1) {
MatchCount++;
if (MatchFound != -1)
TextSearch.chrg.cpMin = MatchFound;
else break;
} else break;
}
return MatchCount;
}
Aidman » over and out
We haven't inherited Earth from our parents, instead we have borrowed her from our children; an old Indian saying.
|
|
|
|
|
I'm working with the code below and want to make a jukebox. How can I play one of several songs randomly?
#include stdlib.h
int main()
{
system( "start c:\\cpp\\pickmeup.mid" );
/* or just system( "c:\\cpp\\pickmeup" ); */
return 0;
}
Thanks, Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
(1) Read all song (file) names into an array (say N items)
(2) Pick a random number between 1 and N and use that
entry from your array.
|
|
|
|
|
I was hoping to find some code to generate a random number. I can use a switch statement (or an array as you mentioned), but I don't know how to generate a random number. Any ideas?
Thanks in advance, Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|
|
OK, here's what you need to do:
(1) Somewhere near the start of your program, seed the random
number generator using time of day. This ensures that
you don't get the same numbers every time:
srand((unsigned)time(NULL));
(2) Then, every time you need a random number (betrween 0 and iN)
ifile=(rand() % (unsigned)(iN));
That should do it.
|
|
|
|
|
Or should I say, a question about sound. The code below brings up my Windows Media Player, but I don't hear any sound. I can play other system sounds, but for some reason I don't hear any sound when I play my MIDI file. I do see the song playing, but don't hear the sound. Any ideas?
#include stdlib.h
int main()
{
system( "start c:\\cpp\\pickmeup.mid" );
/* or just system( "c:\\cpp\\pickmeup" ); */
return 0;
}
Thanks, Dave
"The man who reads nothing is better educated than the man who reads nothing but newspapers."- Thomas Jefferson
|
|
|
|