|
The MS DataGrid is used in my program,but it doesn't worked on the machine whithout VC++ installed. I have registered the msdatgrd.ocx and have installed the MDAC2.7. The Error messages is : " Can't initialize data bindings" ,
m_myDataGrid.SetRefDataSource( (LPUNKNOWN)rs ); //Error Message Ocurrors
VCBeginer
|
|
|
|
|
Hello!
You need to 'install' two dll's; MSBIND.DLL and MSSTDFMT.DLL. By 'install' I mean copy them to System (system32) and then register them with regsvr32.exe
It's a pity that MS doesn't have documentation or better, a real installation for this
Hope that this will help you!
// Mike
|
|
|
|
|
Hi,
call back function is said to be called by Operation system only. I want to make a call back funtion and control the time and place it is called. Can I make it?
Would you please append an example ?
Thank you.
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
Yes as long your application is still running! A callback function is "not much
than calling convention". In fact WINAPI and CALLBACK is
the same __stdcall . Do not confuse CALLBACK function and RPC!
int __cdecl _tmain(int argc, _TCHAR **argv, _TCHAR **envp)
{
myDebugCallback( TEXT("Hello world..." ) );
}
void CALLBACK myDebugCallback(LPCTSTR strMessage)
{
_stprintf(TEXT("Message: %s\n"), strMessage);
}
"Dirty hands lead to important discovery..." - Thomas Edison
|
|
|
|
|
Anybody knows how to realloc a unsigned char __gc?
bytes = new unsigned char __gc[800];
now I want to make it 1000 move the pointer to bytes[800] and add 200 of information!
Anybody?
We really need an MC++ forum! Just for questions like this one!
Cheers
Al
|
|
|
|
|
You cannot realloc with the standard new operator. You will have to use malloc and realloc if you want to do this.
Or you can allocate a new pointer that is the size that you want, copy the data into that pointer and delete the old pointer.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I can't realloc a managed unsigned char, as far as I know ...
|
|
|
|
|
Well after all this answers ... (???) Because I posted this messages into the wrong FORUM! We really need a MC++ forum!!
Anyway, I created it a MC_realloc(unsigned char __gc[], int len) __gc[]
The pointer return is always different!
I just thought you wanted to know! I hope Chris creates a new MC++ forum soon!
Al
|
|
|
|
|
hi, new at this
what would the code be to start reading at the first letter (pointer maybe)of some text entered into a editbox and then displaying the text + 1 in another box.
thanks
|
|
|
|
|
Hmmm, here is an example...
First, let us assume hWnd1 and hWnd2 are the source and destination windows.
char szText [256];
GetWindowText (hWnd1, szText, 256);
if (strlen (szText) < 255)
{
strcat (szText, "A");
SetWindowText (hWnd2, szText);
}
else
;
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Here is some code for dialog whose handle is hDlg, to read from an edit box called ID_EDIT1, and put the desired text in an edit box called ID_EDIT2:
int iLen;
HWND hEdit1 = ::DlgGetItem(hDlg, ID_EDIT1);
iLen = ::GetWindowTextLength(hEdit1);
if (iLen < 0)
{
return;
}
TCHAR *pszText;
pszText = new TCHAR[iLen+1];
if (NULL == pszText)
{
return;
}
::GetWindowText(hEdit1, pszText, iLen+1);
HWND hEdit2 = ::GetDlgItem(hDlg, ID_EDIT2);
::SetWindowText(hEdit2, pszText + 1);
Good Luck!
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I have an HTML doc in my app's Path. I want to launch IExplorer to open it from my program. How do you do this if you don't know where IExplorer is installed?
|
|
|
|
|
You don't have to know. If you use ShellExecute indicating only the file to open, the system will find automatically the appropriate program (IE in your case) to use.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I have files with the format:
number, "words", "words", "words", numbers
number, "words", "words", "words", numbers
etc...
I need to read each individual thing( number or "words") in between the commas. I originally checked each caracter to see if it was a comma. If it wasn't I added it to a string then got the next character. If it was a comma then I have my the thing between the commas. This arose two problems. (1)I can't get spaces because I'm reading the file using ifstream. (2)There can be commas in "words" thus ending the string before I read the complete string.
My solution(I dont like it): Because all "words" are surrounded in quotes I could check to find if it has reached the real comma, which i think would add a lot more code But this still doesn't fix the spaces problem. Should I drop the ifstream and use another file reading meathod( I don't know of any)?
[edit]
Oh yeah, the number does not need to be read as a number, it can be read as a string/char.
-Raffi
|
|
|
|
|
Use a tokenizer like <a href="http://boost.org/libs/tokenizer/index.htm">boost:tokenizer</a> . It seems a little overwhelming at first, but comes equipped with a predefined setting for exactly the kind of thing you want to do (check <a href="http://boost.org/libs/tokenizer/escaped_list_separator.htm">escaped_list_separator</a> .)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
iostreams is made for this.
ifstream f ("c:\\myfile.txt");
int n;
string a, b, c;
f >> n >> "," >> a >> "," >> b >> "," >> c;
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
I think iostream s won't handle strings enclosed in quotes.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Oh. I don't know about that, but I took the quotes to mean 'this is a string', not 'this is a string in quotes'
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Even assuming the format is very well behaved, iostream s won't work. Consider for instance:
5, "hello", "my", "friends", 10 The first "word" read would be "hello", (comma included), as it is only white space that will stop the stream reading a token.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thanks a lot.
-Raffi
|
|
|
|
|
Hi every one,
I meet a trouble.
When i installed my applicaiton on a clean win2k. It terminated every time when it execute:
"pws->Create(wsName, UserName,"");" ,
pws is a CDaoWorkspace object.
But after I installed the "Application Performance Explorer" in "Visual Stutio Enterprise tools" on this platform, then My application works well.
What is the different after I install the tool?
What should I do in my installation?
|
|
|
|
|
You got a new set of dlls. One or more of them was different. If you want to move this program to other machines, you will need to find out which one. Use the DEPENDS.EXE program that ships with Visual Studio to get a list of the dlls your program uses. Then look at the versions and dates. Compare them with what is on a "clean" system. You will see a differnece.
Hope the helps,
Bill
|
|
|
|
|
I'm created MDI app without Doc/View suppot.
The name of MDIChild window stored in string table resourse "\nTitle\n".
When I open child wnd, the title of app window is "App - Title" and when I maximise child window "App - Title - [Title]", how can I remove one "Title" from window title?
Anything that can go wrong will go wrong.
|
|
|
|
|
Remove the FWS_ADDTOTITLE style
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Pleas help! I know nothing about Databases
I have an MFC Dialog app that connects to a Access database. I found some great code here www.codeproject.com/database/readdb.asp and this works fine but it only shows how to read from a database. I need to send data to the database from my dialog app as well as read. If anyone knows how to do this using the same structure as in this demo I would be really really grateful!
Thanks,
Alan
|
|
|
|