|
Is is possible to have some string resources using the same ID in more versions depending on defined constans (in visual studio 6.0)? Or use more than one resource file?
I can have multiple versions dialogs/icons/bitmaps, but I cannot find this option for strings.
Thank you!
rrrado
|
|
|
|
|
rrrado wrote: string resources using the same ID in more versions
What this means?
Are you trying to store string in different language while keeping the ID same.
It is possible to keep the ID same and have string in different language.
Afterwards you can retrive any string depending upon the language using the same ID.
|
|
|
|
|
It is not for different languages, but I've solved this.
Thank you.
rrrado
|
|
|
|
|
Hello All,
In our project client need to lock all HotKeys.I have tried
SetWindowHookEx(Wh_KeyBoard,KeyProc,...);
But it lock all keys except hotkeys
LPRESULT WINAPI CALLBACK KeyProc(int nCode,WPARAM wParam,LPARAM lParam)
{
......
}
So I have tried
#define _WIN32_WINNT 0x0400
#include <windows.h>
SetWindowHookEx(Wh_KeyBoard_LL,LowLevelKeyBoardProc,...);
LPRESULT WINAPI CALLBACK LowLevelKeyBoardProc(int nCode,WPARAM wParam,LPARAM lParam)
{
......
PKDLLHOOKSTRUCT p=(PKDLLHOOKSTRUCT)lParam;
or
KDLLHOOKSTRUCT *p=(KDLLHOOKSTRUCT *)lParam;
}
But it doent work WH_KEYBOARD_LL doesnt call the LowLevelinputProc
even dll also not working
I have installed vc6.0 and Platform SDK Servoce Pack 2
Plese give me any information that how I can Lock the Hotkeys
|
|
|
|
|
Are KeyProc() and LowLevelKeyBoardProc() in a DLL?
abhiakude wrote: ...WH_KEYBOARD_LL doesnt call the LowLevelinputProc
How are you verifying this?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Yes KeyProc and LowLevelKeyBoardProc are in dll
First I am Loading the dll using LoadLibrary
and call both procedures using SetWindowHook in My main application
but WH_KEYBOARD for KeyProc work propely but not for LowLevelKeyProc
So I have used WH_KEYBOARD_LL but it cant call the LowLevelKeyProc
For verifying this i am displaying one Messagebox in both procedures in the dll.
|
|
|
|
|
What does your call to SetWindowHookEx() look like?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Now I am successfully locked all hotkeys using SetWindowHookEx(WH_KEYBOARD_LL,...) but it does not lock Ctrl+Alt+Del key.Is there any solution to lock using SetWindowHook or any other method for it.
|
|
|
|
|
You'll need to provide your own GINA DLL, thus replacing Microsoft's (MSGINA.DLL).
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Is it possible to have reference to a reference varible.
Why?
KIRAN PINJARLA
|
|
|
|
|
It is possible to have reference to a reference variable. But reference to a variable and reference to the reference variable will point to the same location and they will have same value.
i.e.
int i = 5;
int& ii = i;
int* p = ⅈ
int* p1 = &i;
the p and p1 will have same value after executing the above code.
Manoj
Never Gives up
|
|
|
|
|
Aha, you are counting a reference and two pointers.. Generally speaking, pointers are also references
--
=====
Arman
|
|
|
|
|
I guess you mean "a reference refering to another reference refering to a variable". If so, impossible. A reference is initialized and never changes its referee; no assignment to change the referee later. So no way to initialize smth with a value that is being initialized [by other value] at the same time. Funny.
--
=====
Arman
|
|
|
|
|
kiran.pinjarla wrote: Is it possible to have reference to a reference varible.
Sure:
#include "stdafx.h"
#include "iostream"
int _tmain(int argc, _TCHAR* argv[])
{
int i = 5;
int& ri = i;
int& rri = ri;
std::cout << i << ri << rri << std::endl;
rri = 6;
std::cout << i << ri << rri << std::endl;
return system("pause");
}
kiran.pinjarla wrote: Why?
Hmm. To not make up a special case by not allowing it?
After all, an int& is supposed to be like an int in all respects. It is just another name for a variable.
Failure is not an option - it's built right in.
|
|
|
|
|
|
Hi,
Why dont you try to check value of the "kon" after the
IplImage* kon=mycam->capture(); //it would return a IplImage*
line. If every thing is fine the the value of kon should be not null.
Otherwise you need to check the capture function for creating the image successfully.
Manoj
Never Gives up
|
|
|
|
|
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.
|
|
|
|
|
I saw an interest thing on the C++/CLI forum,I saw some C++ questions on that fourm and some CLI questions on the C++ forum.
|
|
|
|
|
Not sure of understanding but, anyway,...
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.
|
|
|
|
|
C++ questions on the CLI forum and CLI questions on C++ forum
|
|
|
|
|
OK it is called (managed)C++/CLI forum. Isn't (managed) C++ representative of C++ ? Or do you wish to separate (managed) C++ forum off CLI one?
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.
|
|
|
|
|
Yeah I know,and no I dont.
|
|
|
|
|
I've written an activex control using MFC in VC6. Its based on a dropdown combo box, but I subclass the edit control (and listbox). As you type in the edit box, it goes out to the database and fills the dropdown. The "leave" event is triggered by killing focus in the edit box. I check to see if the entry is legal, and if its not, I put up an error message
I'm trying to test it in a simple dialog.
Here's the problem. If I type in (or select) something "legal" and then hit tab, I go to the next control in the tab order just fine. But if the user types in something illegal and I put up the message box, I seem to lose my place in the tab order and go back to the first control in the dialog.
Oddly enough it works fine in a VB dialog (the opposite of the problem I've had in the past.)
I've set the WS_EX_CONTROLPARENT style in Precreatewindow for the main control.
Any help would be appreciated!
|
|
|
|
|
hi all,
I am not much familiar with COM and COM dlls, Neway i am trying to use a COM dll (that is written in Vb) in a VC++ win32 application. I used the functions CoInitialize(), CoCreateInstance() etc.
Now in order to invoke a member function of the class, what should i do? suppose the method has 2 params ,one a string value and the other an integer.
Sample code is here, pls suggest the corrections:
//*************start*************************
if(CoInitialize(NULL)==S_OK)
{
HRESULT hr;
IDispatch* pIUk;
CLSID clsid;
CLSIDFromProgID(L"MyDll.MyClass", &clsid);
hr=CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IDispatch, (void**) &pIUk);
if(SUCCEEDED ( hr ))
{
DISPID dispid;
DISPPARAMS dispparameters;
//invoke method "MyMethod"
char filename[]="D:\\FrameWork.xls";
int count=1;
char FAR* szMember = "MyMethod";
hr = pIUk->GetIDsOfNames(IID_NULL,(unsigned short **)&szMember, 1, LOCALE_SYSTEM_DEFAULT, &dispid);
pIUk->Invoke(dispid, IID_NULL, LOCALE_SYSTEM_DEFAULT, DISPATCH_METHOD, &dispparameters, NULL, NULL, NULL);
pIUk->Release();
}
CoUninitialize();
}
//*************end****************************
I am confused about filling the DISPPARAMS structure and lot more doubts ...
Thanks in advance
SYAMLAL
|
|
|
|
|
Actually, COM is very hard though not impossible to learn and use.
About the DISPPARAMS structure [about what are your concerns]. The declaration of DISPPARAMS looks like this;
struct DISPPARAMS {
VARIANTARG* rgvarg;
DISPID* rgdispidNamedArgs;
unsigned int cArgs;
unsigned int cNamedArgs;
};
Let's exclude the second and forth fields; we do assign NULL and 0 to them respectfully. These are to support so called named parameters that are applicatble in VB. In C++ rarely can they be useful so let's do not bother with them [in C++ - I mean when calling via IDispath].
The first field is an array of VARIANTS [VARIANARG is the same as VARIANT]. Here we should put our real arguments. A VARIANT is a union of several types such BSTR, int, float, DATE. You are restricted with those types only; no type outside of VARIANT could be applied.
Suppose your function takes a single argument of type string. So first you prepare the VARIANT object like so;
BSTR bstrMyArg = L"some text";
VARIANT var;
::VariantInit(&var);
var.vt = VT_BSTR;
var.bstrVal = bstrMyArg;
Now it's time to initialize DISPPARAMS;
DISPPARAMS dispparameters;
dispparameters.cArgs = 1;
dispparameters.rgvarg = &var;
dispparameters.cNamedArgs = 0;
dispparameters.rgdispidNamedArgs = NULL;
Then invoke your pIUk->Invoke.
And a minor note. No need for FAR; you are not in Win16.
char FAR* szMember = "MyMethod";
--
=====
Arman
|
|
|
|