|
|
during execution of the debug build of my .exe I keep getting this in the debug window ( a lot of them):
Warning: no message line prompt for ID 0x800B.
I removed some edit boxes from my dialog, but I also deleted the message map entries for these controls and their variables. Does anyone know what this might be, or how I can find out? Thanks in advance!!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
It is likely that you have missed the prompt for menu item(s) that you have added (in the resource editor).
These prompts show in the status bar at the bottom of the application when you hover over the menu item(s).
Note: Toolbar items will have the same prompt as their corresponding menu items.
Ant.
|
|
|
|
|
and how do we do to display such promt in the status bar ?
(i know, get the string into the string table, then write it in the correct statusBar Pane...)
But how, could you give me some short code lines (mt problem is more to get smth in the string table actually)
thanks
TOXCCT >>> GEII power
|
|
|
|
|
CString::LoadString
Be sure that resource exist in the string table
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
thanks! that helped a lot!!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I want to modify the net-data pacekts before they are passed to the applications. can raw socket or winpcap do?
someone said that SPI can do. but it is only for winsock 2. i hope it also work for the lower version winsock such as winsock 1.1.
Thanks.
|
|
|
|
|
Hi There!. I am a newcommer in MFC programming.
How does one parse parameters passed as command line arguments in the Win32 environment? I know i can use lpCmdLine, but how do i do that? Can someone show me an example. By the way I am useing Embedded Visual c++
|
|
|
|
|
The lpCmdLine parameter is an exact copy of the command line passed to your program, including all spaces, quote marks, etc. If you want to treat this as separate arguments, you must split it.
MFC supplies its own WinMain by default; however, you can override this if you wish. If you do so, call AfxWinInit to initialize MFC, and AfxWinTerm before returning. The MFC WinMain is implemented in winmain.cpp .
It's rare to do this. Typically, you instead override InitInstance in your class derived from CWinApp . You can then access the command line from CWinApp 's m_lpCmdLine parameter.
MFC offers the CCommandLineInfo class and the ParseCommandLine function for helping with command lines. To add support for your own options, create a new class which inherits CCommandLineInfo . Then override ParseParam .
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Thanks.
lpCmdLine is a unsigned short *.
The value i passed in the command line is just a BYTE (0-15). How can i convert lpCmdLine to a BYTE?
Gunnar
|
|
|
|
|
Whether the command line contained one byte or several dozen, lpCmdLine is accessed in the same manner for each. It's simply a pointer to the command-line arguments.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
How should the following be declared
class A
{
public:
B test;
};
class B
{
public:
A test;
};
I thought you just pre-declared class B before class A using the following line:
class B;
What am I doing wrong?
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
You are declaring class A, that contains a member of class B, that contains a member of class A, that contains.....ad infinitum
Declare the test member as a pointer to class A or B.
Robert-Antonio
"Love without sex is like a fish without antlers"
|
|
|
|
|
Beat me to it.. That's what you get when you are distracted before posting your reply
Ant.
|
|
|
|
|
It isn't the first case, when more people posted the same reply simultaneously. The simpler the question is, the more gurus answer
Robert-Antonio
"Czech Railways discovered, that in case of disaster the most damaged wagons
were the first and the last. So they decided to create trains without them."
|
|
|
|
|
You can only use forward declaration when using pointers.
Ant.
|
|
|
|
|
u can do it as:
class B;
class A
{
public:
B &test;
//or B *test;
};
class B
{
public:
A test;
};
|
|
|
|
|
hello all,
how shall i create a entry in registry using VC++.
i mean i need to add a key such that my application name shouldnt appear there. i mean there is an entry named "Extensions" in the registry and i need to create an entry {"Demo App"} in that. and then i need to add entries in the newly created.
but the problem with SetRegistryKey() is that it is creating the application name too. but i dont need it. how shall i do so.
ComputerNewton
|
|
|
|
|
int RegWriteKeyValue(HKEY hKeyParent,CString strPath,CString strKey,CString strVal)
{
CRegKey regKey;
DWORD dwKeyCreateMode=REG_OPENED_EXISTING_KEY;
long lRes;
lRes=regKey.Create(hKeyParent,strPath,REG_NONE,REG_OPTION_NON_VOLATILE,KEY_ALL_ACCESS,NULL,&dwKeyCreateMode);
if (lRes != ERROR_SUCCESS)
return 0;
lRes=regKey.SetValue(strVal,strKey);
if (lRes != ERROR_SUCCESS)
return 0;
// close the registry key
regKey.Close();
return 1;
}
RegWriteKeyValue(HKEY_LOCAL_MACHINE,"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce","Name","value");
It's not a bug, it's an undocumented feature. suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Thank u very much for ur help.
But it is in ATL. i dont want to use this in ATL.
once again thanks a lot. b'coz of ur reply i got an idea and i did it in SDK mixed with MFC to get my requirement.
Once again thank u very much.
ComputerNewton
|
|
|
|
|
use CRegKey of ATL classes.
God is Real, unless declared Integer.
|
|
|
|
|
Use the Win32 registry functions. Ugly, yes, but they work:
HKEY hNewKey = NULL;
DWORD disposition = 0;
DWORD error = ::RegCreateKeyEx(HKEY_LOCAL_MACHINE, "Software\\Extensions\\Demo App", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hNewKey, &disposition);
char myString[] = "Some Data";
error = ::RegSetValueEx(hNewKey, "Some Value", NULL, REG_SZ, myString, sizeof(myString));
See MSDN on RegCreateKeyEx and RegSetValueEx for more info. (The code I provided is just a rough example... should compile and work but I can't be sure!)
Sometimes I feel like I'm a USB printer in a parallel universe.
|
|
|
|
|
Hi
I'm working on a fairly large file indexing system, and I'm trying to find the best and fastest way of finding out if a file needs reindexing.
Currently the best we've got is keeping a DB of the last time a file was indexed and periodically rescanning a checking the last modifed date against that.
Is there a way of being told if a file has been created or modified, in a similar sort of way to Visual Studio bringing up the "This file has been modified outside of Visual Studio..." dialog? (One which doesn't require a lot of resources as well - this is intended to run in the background)
Cheers
Dave
|
|
|
|
|
Check out 'FindFirstChangeNotification' in the Win32 documentation.
Paul
|
|
|
|
|
Cheers Paul
It's always the problem with trying to find where to start looking!
Dave
|
|
|
|