|
What kind of exception? From where is it being thrown? What does the code look like around the "throw" site? What are the parameters you're passing to the API? Is the HWND valid? In short we need some more detailed information.
Steve
|
|
|
|
|
Hi,
I can now send message using global namespace SendMessage().
Please see my reply to Mr. Randor above for the error details.
If you need other info please ask me.
Best Regards,
Suman
|
|
|
|
|
Can any one tell me what could be problem with following code ?
::CoInitialize(NULL);
m_rsocp.CreateInstance(__uuidof(Recordset));
m_rsocp->Open((LPCTSTR)str,(LPCTSTR)m_strConnection,adOpenDynamic,adLockOptimistic,adCmdUnknown);
if(FAILED(m_rsocp->QueryInterface(__uuidof(IADORecordBinding),(LPVOID*)&binding)))
_com_issue_error(E_NOINTERFACE);
adoctrl.m_UserId = tempuserid;
adoctrl.m_NewAccount = LArray[0];
adoctrl.m_InactivateAccount = LArray[1];
binding->AddNew(&adoctrl);
binding->Update(&adoctrl);
binding->BindToRecordset(&adoctrl);
m_rsocp->Close();
::CoUninitialize();
|| ART OF LIVING ||
|
|
|
|
|
1.) Is GetSystemDefaultLangID() the best way to detect which language version of the OS is running? Or GetUserDefaultLangID() ? Or something else?
2.) Is there a way to temporarily trick the US version of XP into thinking it's in another language? I tried changing the "Default input language" in the "Regional and Language Options" control panel, along with both GetSystemDefaultLangID() and GetUserDefaultLangID() in my code, but they both return English regardless of what I set for the default input language. Do I need localized installs of XP to test my localizations?
|
|
|
|
|
Do I need localized installs of XP to test my localizations?
No.
Instead you can change the language in
"Regional and Language Options" -> "Advanced" tab.
|
|
|
|
|
That change did not seem to affect anything. After reboot, XP was still in English and my code (calling GetSystemDefaultLangID() ) is still reporting English. I set the option to both Vietnamese and Chinese(Taiwan), but neither had any effect.
|
|
|
|
|
For an AutoCAD application I need to temporarily hide a dialog window and return control to the main window, in order to enable the user to select objects on the drawing screen. After the user has selected objects, control is returned to the dialog.
I do not use MFC, because I subclassed an existing dialog procedure.
What sequence of messages should I send in order to make the dialog hidden and visible again?
|
|
|
|
|
Hi,
I would like to know how to add a resource to an external exe file. For instance you have a.exe which is your main program and you want to add the file example.txt as a resource to the file b.exe.
I don't know if that's possible but if it is and if someone have the solution of that problem I would really appreciate to know it...
Thanks
Manthis
|
|
|
|
|
With code or manually? If you mean manually, open the EXE in a resource editor like VS, and add the file with the editor. With code, use the resorce APIs, BeginUpdateResource() , UpdateResource() , EndUpdateResource()
|
|
|
|
|
Manthis wrote: I don't know if that's possible but if it is and if someone have the solution of that problem I would really appreciate to know it...
Read it http://www.codeproject.com/cpp/UpdateResource.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief
|
|
|
|
|
One way is to include all the contents of file as one long string in the string table resource of external exe.
For this uses the following functions:
LoadLibrary() for destination/external exe
FindResource() for finding the string table.
Load resource()
Lockresource()
BeginUpdateResource()
UpdateResource()
EndUpdateResource()
File contents->Long String ->Any one String Table Entry ->String tableResource -> External Exe.
|
|
|
|
|
All right thanks guys for these quick answers, I really appreciate it...
|
|
|
|
|
Hello,
I have a question for you. I have a program is based on a basic binary tree.
There needs to be a function to swap nodes or from left to right. so in other words,
if 1 is the root and on the left is a 2 and on the right is a 3, I would want to swap the 2 and 3.
For each node entered.
Any ideas on how to write this out?
Thanks.
Tiffani
|
|
|
|
|
first you will have to walk the tree.
next you will need to construct a new tree, the new tree will simply need to change how it's comparing the elements!
think about it..have fun on the homework, no cheating
Yours Truly, The One and Only!
|
|
|
|
|
Hello,
I have a question for you. I have a program is based on a basic binary tree.
There needs to be a function to swap nodes or from left to right. so in other words,
if 1 is the root and on the left is a 2 and on the right is a 3, I would want to swap the 2 and 3.
For each node entered.
Any ideas on how to write this out?
Thanks.
Tiffani
Diablaaz@aol.com
-- modified at 18:14 Sunday 22nd July, 2007
|
|
|
|
|
Who's first?;)
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
I was tempted - but I've just finished an 8 hour drive and I'm too tired to bother.
Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...
"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."
My website
|
|
|
|
|
diablaaz wrote: Any ideas on how to write this out?
Homework? Take-home test? We need more info.
Marc
|
|
|
|
|
Marc Clifton wrote: We need more info.
Why? Do you have a moving scale of what to charge based on if it is homework or take home test? I know I do
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
Paul Conrad wrote: Why? Do you have a moving scale of what to charge based on if it is homework or take home test?
Because his question was originally posted in the lounge, and I wanted to know what the appropriate flame response should be.
Marc
|
|
|
|
|
Marc Clifton wrote: wanted to know what the appropriate flame response should be
Pick a flame, any flame
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
I see your problem. You can't do that with a basic binary tree. You need to switch to an advanced binary tree.
Gary Kirkham
Forever Forgiven and Alive in the Spirit
He is no fool who gives what he cannot keep to gain what he cannot lose. - Jim Elliot
Me blog, You read
|
|
|
|
|
I'm not even sure an advanced tree would work. He might need a segmented octal tree with a U’u root.
|
|
|
|
|
Here's the text that appeared above the window where you posted this message. I'm moving it to the C++ forum, where it belongs. Please use the right forums.
Rules: The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. Do not post programming questions (use the programming forums for that) and please don't post ads.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
maybe change the < by a> ?
|
|
|
|