|
Hello,
I have 3rd party Control(.OCX) which is running in VB without any problem.
Now i m using it in MFC. Class Wizard creates wrapper classes for it automatically. Now Problem is when i call a method object.Add(BSTR *,VARIANT*);
i use CComBSTR and CComVariant classes for sending the parameters to this Method. When I run the "Application 0xC0000005: Access Violation" a very bad ERROR message get flashed.for the sake of info that OCX is mcbarmenuv102.ocx i got from MCUNHA's ActiveX 's.
Please Help Me.
|
|
|
|
|
Hi,
There's No Problem With ActiveX.I believe U call The method With wrong data Type.
Try This
BSTR bstrYourstring
VARIANT vYourVariant
object.Add(&bstrYourstring,&vYourVariant)
by
baijumax
|
|
|
|
|
is there a way of do this:
example:
#define IDB_ABOUT 150
Have a string with "IDB_ABOUT" and get a int with value 150 ??
|
|
|
|
|
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number.
what exactly you want to do ?
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Maximilien wrote:
#define are replace at the preprocessor stage of compilation, so the IDB_ABOUT symbol will be lost to the number
yes, i know, but i was looking for a way to use the res: protocol of HTML using the IDB_... instead of the numbers
example:
#2 = Bitmap
istead of
|
|
|
|
|
don't boder yourself... its a stupid question anyway
the soluction for this is probably harder than the use of numbers
|
|
|
|
|
Hello,
You can use a map as an associative array to achieve what you want. Exemple:
<br />
std::map<std::string, int> IDThings;<br />
IDThings["IDB_ABOUT"] = 150; <br />
int nValue = IDThings["IDB_ABOUT"];<br />
Hope this helps..
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
what are the types the pair of you map is getting ????
TOXCCT >>> GEII power
|
|
|
|
|
The map is build from key value pairs. In your case the key would be a string and the value an integer declared like this: std::map<std::string, int>Resources;
Hope this helps
<small><i>
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
</i></small>
|
|
|
|
|
Hi,
I have a token (hAccessToken) belonged to a current user:
<br />
::OpenThreadToken(::GetCurrentThread(), TOKEN_QUERY, TRUE, &hAccessToken));<br />
Is it possible to determine whether a user is authenticated in domain or not? How?
Sincerely Yours,
RadioShark
|
|
|
|
|
RadioShark wrote:
Is it possible to determine whether a user is authenticated in domain or not?
Does LogonUser() help?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
GetTokenInformation()
then
LookupAccountSid()
There is no spoon.
mail
|
|
|
|
|
Is it possible to use a Spin Control, but instead of incrementing by an integer value (e.g. 1) increment the value in the Edit Box by say 0.1.
Any pointers please.
|
|
|
|
|
don't autobuddy the control to an edit box. just put it with the text box and handle the spin control's events yourself.
[insert witty comment here]
bdiamond
|
|
|
|
|
My desktop application (MFC) will at runtime establish five to ten dynamically created matrices. They will all be of the same size, N x N and be filled with double values. The value of N will vary from run to run, but normally be between 10 and 30.
Some features:
- All matrices are symmetrical
- The diagonal has entries 0.0
- At low values of N it will be 60-70% filled
- There will never be more than 200-300 entries different from 0.0
- Very frequently there will be simple access
- Occasionally there will be inversion and multilication
So, finally to my question. There is ample oportunity to compress memory, but at value of N would you sacrifice the speed of double x = MyMatrix[i][j]to the slower double x = MyMatrix(i,j) with some fancy function? With 512 mB or 1 GB RAM in todays PC's, is there any reason to bother about memory?
Regards Haakon.
A sure cure for seasickness is to sit under a tree.
Spike Milligan
|
|
|
|
|
Hi,
I shouldn't bother about the memory for the following reasons:
- The size of your matrix in bytes will never exceed 4Kb. Therefore it'll fit in one page.
- If you access the block of memory frequently enough, windows won't put the page in virtual memory on the haddisk, leading to zero page faults and better performance.
- if your clients are not stuck on windows 95 machines, you'll be better off not compressing the memory..
Hope my opinion helps you decide what to do...
Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.
|
|
|
|
|
Thanks
Just what I wanted to hear. Makes my life easier in many ways.
Regards, Haakon S.
A sure cure for seasickness is to sit under a tree.
Spike Milligan
|
|
|
|
|
Hi Guys,
Iam trying to put some bitmap images using a toolbarcontrol into a dialog.
I have done it as follows:
CRect toolbarSize(20,20,100,50);
m_toolBarCtrl.Create(WS_CHILD|TBSTYLE_FLAT,toolbarSize,this,IDR_TOOLBAR1);
m_toolBarCtrl.AddBitmap(1,IDB_BITMAP2);
m_toolBarCtrl.AddBitmap(1,IDB_BITMAP3);
TBBUTTON tb[3];
// Index of new button image.
tb[0].iBitmap = 0;
// Setting button state
tb[0].fsState = TBSTATE_ENABLED;
// Setting button style
tb[0].fsStyle = TBSTYLE_BUTTON;
tb[0].dwData = 0;
tb[0].iString = NULL;
// Index of new button image.
tb[1].iBitmap = 1;
//Setting button state
tb[1].fsState = TBSTATE_ENABLED;
// Setting button style
tb[1].fsStyle = TBSTYLE_BUTTON;
tb[1].dwData = 0;
tb[1].iString = NULL;
m_toolBarCtrl.AddButtons(2,tb);
m_toolBarCtrl.ShowWindow(true);
The problem is in both of my buttons,I see only 1 image(ie: the image in "bitmap2").What should I do to see the other bitmap image in the other button.
I have each images in 2 different files(So I imported it into the resource editor as 2 bitmaps -IDB_BITMAP2& IDB_BITMAP3)
If I want to have my images in one bitmapResource(if thats the problem),What should I do ?
Mind that I have each image, which I want to displaye as .bmp file.(one image in 1 .bmp file).
Another thing is How can I see a tooltip for each button in the above code...
Any help is appreciated.....
Thanks.....
|
|
|
|
|
hi
how do we implement features such as auto updates (like in windows and MSN ) in our application. Also how does patches work?
To be very specific if i develop a program that can generate say 5 random numbers and has delivered to users, after some time if i want it to generate 10 random numbers instead of 5 then again i have to build it and give it to users. Is there any way that i just give a patch or some thing like that and it update my program or any other method for doing this
your valuabe comment are worthful for me
thanks in advance
regards
azam
|
|
|
|
|
look at this post
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&mpp=50&select=939284#xx939284xx
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi,
While creating the ISO image for CD burning, I want to supply the data from memory. It means my application needs to accept the data from a file which do not exist physically. Can any one help me out in this. How to make the aplication read data from memory , to create the ISO image.
Pls help
Thanks..
Vini
|
|
|
|
|
Is the data opened in your application, or is it in another process? If the latter is the answer, then you might get a access denied error, since you are trying to access memory that doesn't belong to you.
Regards,
Michael
Michael Hendrickx
Security Engineer
Scanit FZ/LLC
http://www.scanit.net
|
|
|
|
|
Hi,
Thanks. To clear the scenario, its like an image editor which can modify an existing image file. The modified data need to be used for ISO image creation for CD burning. The original file remain intact.
Is there any control/component to open an image for editing ?
pls help
Thanks
Vini
|
|
|
|
|
I want to know some good book on the Visual C++ .Net 2003 IDE which explains all the changes and how to use the new features in the IDE.
Thanks
|
|
|
|
|