|
I am using visual c++ 6.0. I wish to use the COleVariant::GetByteArrayFromVariantArray member function
but the compiler generates error message : GetByteArrayFromVariantArray is not a member function of COleVariant. Why could this happen?? Is this function available only in VC++ 2005??
Is there any way to retrieve a byte array from variant array??
Thanks. I will appreciate any help from you.
|
|
|
|
|
weehau wrote: Is this function available only in VC++ 2005??
I think that's the right hypothesis, since I cannot find GetByteArrayFromVariantArray inside Visual Studio 6 Help documentation
hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hey
I am currently working on an MFC application (using MFC71.dll's) that is passed its intial position and size from the command line.
I attempt to use the function SetWindowPos(&CWnd::wndTopMost, l, t, r, b, SWP_NOZORDER)
in the initinstance function of the application.
The problem is i keep getting assertion failed, which i can ignore but it does not reposition the window.
Any idea of what could be causing this?
Cheers
Dan
|
|
|
|
|
You don't provide information about why the assertion fails, but I'm quite confident that it fails since the window is not a window yet when calling SetWindowPos() from InitInstance() .
Override OnSize() and call SetWindowPos() from there.
Don't forget to add some conditions to control whether the window should on top or not.
Hope this helps
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
|
prasad_som wrote: How ?
What do you mean? Can I get a full sentence, please... :->
I don't get what you're referring to...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
I was confused about this statement,
but I'm quite confident that it fails since the window is not a window yet when calling SetWindowPos() from InitInstance().
Why you feel so ?
It's perfectly constructed window in InitInstance .
Thats why there are calls to ShowWindow and UpdateWindow .
|
|
|
|
|
Ok, now I see what you mean.
The OP did not say anything about at what point he was calling SetWindowPos() from InitInstance() .
At the top of InitInstance() the window has not been created yet and the call will generate an assertion failure.
You can try it by copying the call to ShowWindow() to the top of InitInstance() .
However, I'm referring to VC6 and the OP is using VC7 so this may have changed, but I doubt it.
--
Roger
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Roger Stoltz wrote: At the top of InitInstance() the window has not been created yet and the call will generate an assertion failure
I know that. But, I wanted to point to your statement.
Anyway, OP seems to be not interested in our replys. Doesn't care to reply to our queries.
|
|
|
|
|
Hmm, now that I look back at what I wrote in the light of our conversation, I can understand why you got confused.
I started off my first reply by writing something else, which I edited before posting the reply because it didn't sound very good.
It now appears that I ended up with a sentence that could easily be interpreted differently than I intended, which you did.
It also explains why you asked "how", as I expected you to know this.
prasad_som wrote: Anyway, OP seems to be not interested in our replys. Doesn't care to reply to our queries
True.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"No one remembers a coward!" - Jan Elfström 1998 "...but everyone remembers an idiot!" - my lawyer 2005 when heard of Jan's saying above
|
|
|
|
|
Have you put the line in the right place (I mean, after the main window has been created...)?
The following code snippet (to show the right place inside the InitInstance ) works fine on my system:
m_pMainWnd->ShowWindow(SW_SHOW);
m_pMainWnd->SetWindowPos( &CWnd::wndTopMost, 10, 10, 110, 110, SWP_NOZORDER);
m_pMainWnd->UpdateWindow();
hope that helps.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
DanB1983 wrote: The problem is i keep getting assertion failed...
What line of what file is asserting?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I face some problem with CRecordset.
I run my C++ code to call stored procedures on Server database where the stored p[rocediures retrieve all the records related to my query .
If the record less than 65535 then I have no problem !!
If the result of the Stroed procedure > 65535 then the entire recset is truncated .
I use ODBC to access the database .
for example if the result of the query 70000 records then I can only find in the recset 70000-65535=4,465 records.
Is it CRecordset limitation or Oracle !?
Regards
Pasha
Pasha
|
|
|
|
|
Pasha8 wrote: I run my C++ code to call stored procedures on Server database where the stored p[rocediures retrieve all the records related to my query .
Can you show code, how you are constructing stored procedure ?
Pasha8 wrote: If the record less than 65535 then I have no problem
I think you are using unsigned int short somewhere instead of unsigned long ,
AFAIK, You can use CRecordSet for size equal to maximum number indicated by DWORD(unsigned interger) .
-- modified at 8:50 Wednesday 29th November, 2006
|
|
|
|
|
prasad_som wrote: I think you are using unsigned int somewhere instead of unsigned long...
Why would you think that since they are the same value?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
, My mistake.
I wanted to say unsigned short .
Corrected now.
|
|
|
|
|
I can't access the Stored procedures as they are property of the Sybase Database owner vendor here ; I only use them to generate the records related to the clients at begining of every month - I suppose to do that -
you simply call the procedures and they will run and return the record set for the period you specified !
a set of records will be retrieved and should be processed to display them on screen or as we do we format them and print them !!
All the records retrieved inside CRecordset object ! but it is trunctaed as I mentioned before if the amount is more than 65535 records !!!
Pasha
|
|
|
|
|
If you provide some code, that will be usefull.
But I strongly feel. Its because of using wrong data type. (i.e. unsigned short instead of unsigned long .
|
|
|
|
|
Here is the link of the code to download it
http://www.mytempdir.com/1094462
We done simpe test with another ADO.net conde and we retrieved all the records but some how for that code still we don't know the problem.
Regards
Pasha
Pasha
|
|
|
|
|
|
Hello
Is there a limit to the amount of tcp sockets that you can have open simultaneously within a single dialog application?
I have an application that will have several windows which will display activity of other remote applications. The link to the remote sites is made using tcp sockets over the LAN, and I am concerned that there could be a limit on the amount of sockets that I am allowed to have open at the same time. Quantity that I am looking at is around 64, but could be more.
Cheers
69 Bay
|
|
|
|
|
|
hi huys,
may i ask, how to use project files inside another project
thing is my application is part of a large project and now it is time to plug it into that project
now i have two projects 1- my application 2- the big project
all i need to do is to let the big project use my code some how so i could be able to make a button in the big project that finally create my application dialog and DoModal() it
so am i gonna put all my source, hearder and resource files in the big project, or there is another simple way
thnx 4 ur time and concern
|
|
|
|
|
You can allways use dll/COM for this. Its has its own benefits, tradeoff's then.
|
|
|
|
|
Hi again...
I have a project (dialog based) that I may need to start working on soon, that has a need for several buttons, and a bitmap to be displayed behind them.
To make the application useful for future projects, i would like to read in the button positions from a config file, and move them to the specified location. I would also like to read in the filename of the bitmap and display that (behind the buttons). There will only be a single bitmap displayed at a time, each one will be the same size.
My questions are:
1 How do you move a button in a dialog?
2 Can you display a bitmap in a dialog, given the .bmp filename? If so how?
I am using VC6.0 & Win XP
Thanks for any help that you can offer...
69 Bay
|
|
|
|