|
Thanx for replying Ryan. I've compiled C files, but their Compiler is different i.e Microtech PPC. Is there any way to get method info from noncompiled files?
Looking for ur response.
Day by Day Everyone is moving towards graveyard
|
|
|
|
|
mooni wrote: I've compiled C files, but their Compiler is different i.e Microtech PPC
You can only get the information from managed types compiled with the Visual C++ compiler, so no, you can't get the information you need.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hi all
i want to make every character as uppercase when each character is entered by user in text filed so it use this code on on textfiled change event
UpdateData(true);
m_strBarcode.MakeUpper();
UpdateData(false);
but it shows characters in reverse order ie when i write "AB" it shows "BA". new character is on left side which should be right side.
when i use the same code behind the button then i works fine.
all properties of text field are by default imean text align left i had not changed them and m_strbarcode is the controll variable of the text field.
ddd
|
|
|
|
|
tasleem143 wrote: UpdateData(true);
m_strBarcode.MakeUpper();
UpdateData(false);
Do not call UpdateData(false) after MakeUpper() because what it does is that it transfers contents of m_strBarcode back to the edit box and the caret is set at the start of edit box.
This is dirty coding. Calling UpdateData is risky. You never know what happens because it updates other control variables too. Things could go awry.
A good option would be to subclass the edit control for such a behavior. This will be clean coding.
But still if you wish to have a go do it like this...
UpdateData(TRUE);
m_editeststr.MakeUpper();
UpdateData(FALSE);
m_edit.SetSel(0,-1);
m_edit.SetSel(-1);
Nibu thomas
Software Developer
|
|
|
|
|
Can't you just set the edit box's properties to uppercase in the dialog editor?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have dialog base application and i want to show an icon in system tray ang show popup when right click on this system tray icon.
i have successfully show icon on system tray when application is open
by using
Shell_NotifyIcon (NIM_ADD,&m_tnd);
but i am not able to show popup when right click on this icon.what i have to do for this also i have no idea which event i have to call so please if anybody have idea about this please share with me.
Bankey Khandelwal
Software Engineer
|
|
|
|
|
Use this excellent class[^] by chris himself
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Click Here[^]
Nibu thomas
Software Developer
|
|
|
|
|
hi there,
does anyone know how to create an SDI document in an ATL COM Dll?
I've created the three classes (derived from CDocument, ChtmlView, CframeWnd). the window is not created.
can anyone help.... ?
shekhar
|
|
|
|
|
Hi,c_jangid
Do you get error?
|
|
|
|
|
hi there,
i dont get any compilation error but i do get a runtime error. "Assertion failed".
i could find that the error is somewhere in the CSingleDocTemplate constructor. it doesn't return a valid pointer.
waiting for reply.
thanks...
|
|
|
|
|
Hi,
i have created a dll and exported a class. I want to import that class to another application. But how can i import that class with out using the lib file. We can import a function using GetProcAddress() api. Can i use this api to import the class?
Thanks in advance
nave
|
|
|
|
|
Naveen R wrote: Can i use this api to import the class?
No.
But there is a workaround...
Use this API to get the address of a function that returns an instance of the class that you wish to access dynamically.
For eg:
The function will be something like this...
void* FUNC_EXPORT CreateInstance()
{
return static_cast< void*> (new SomeClass);
} Use GetProcAddress to get the address of this function.
Nibu thomas
Software Developer
|
|
|
|
|
For that i have to modify the dll isn't it? That's not possible
nave
|
|
|
|
|
Naveen R wrote: For that i have to modify the dll isn't it?
Yeah.
Nibu thomas
Software Developer
|
|
|
|
|
If you know the C++ mangled name of the methods, you can. It's not very fun and depends on which compiler the DLL was compiled with.
You said you created the DLL, so why can't you use the lib file that was created with it?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
What the problem is there are two dlls.
A class in the first dll is used by a second dll and a class in the second dll is used the first dll creating a cirular dependency.
So to avoid this i decided to load the class dynamically.
please tell me how can i load the class if i know the mangled name of class
nave
|
|
|
|
|
Naveen R wrote: A class in the first dll is used by a second dll and a class in the second dll is used the first dll creating a cirular dependency.
Bad idea. Fix your DLLs. What you're proposing to do is a hack around the real problem. DLLs should never rely on each other.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
ok i agree. Just for knowing can u tell me how can i load the class as u said?
nave
|
|
|
|
|
Well, if you know the mangled names of all of the methods, you can use GetProcAddress() to get all the method addresses. Just remember that they have an extra parameter at the beginning - the this pointer.
I would strongly recommend that you never do this. It's a horrible hack and prone to lots of problems.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hello friends ther is one problem with me that as i am an B.Tech (CS) student and i hav only 1 month to complete my project so kindly help me out to just guideline me how to implement the licensing software. actually i am working for the project, this project is totally assine to me . in the i hav to design the "Computerization of the driver livensing system" . in this few of the important forms are
1: login form
2) option window(tempory license/[permanent license)
3) user entry form(the driver comming for the first time. the whole detail like name,age,tell no been stored on the data base)
4) then we have the question test in which we have to show the objective type question in the random manney these Q r in the data base.
5) evaluation form (the performance of the test accorking to that driver is been shown and stored back in the data base)
. please look after the matter and kindly help me out or if you can / or if you hav a bit free time for me then please write code so that i can submit my project as soon as possible as days left are very less so . reply me soon ASAP
write me an mail to my ID at male_IIT@hotmail.com
gourav
|
|
|
|
|
Wow - others have voted you down, but I get to be first to tell you:
* CodeProject members will answer queries when you post code
* CodeProject members will not do all your homework for you.
I suggest you try doing it yourself for a week or two, then ask for help with the bits which don't work correctly.
|
|
|
|
|
I 've one function that 's written with COM DLL.
I want to return a string from that function.
function declaration is like that
STDMETHODIMP CMyClass::Command()
from that function how can I return a string.
thanks in advance.
|
|
|
|
|
In the .IDL (or ODL file) change the declaration so it looks something like this:
HRESULT Command([out, retval] BSTR *pOut);
Now the function should look like this:
STDMETHODIMP CMyClass::Command(BSTR *pOut)
{
if ( pOut == NULL )
{
return E_POINTER;
}
*pOut = SysAllocString(L"Your string here!");
return S_OK;
}
If you're not familiar with BSTR s you should read up on them.
Steve
|
|
|
|
|
There are some data to be analyzed, and draw the result as a figure. I want to draw the result in memory firstly and then save the memory BMP to a file directly, not to show it on screen. How can I do that.
Note: I want to achieve all in dialog, not Doc/View framework.
By the way, the resulted BMP may large than the sreen.
Thanks a lot!
-- modified at 23:57 Sunday 12th March, 2006
|
|
|
|