|
I don't have my IDE configured in such a fashion.
"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
|
|
|
|
|
Are you using Visual Studio?
Russell
|
|
|
|
|
I am using the RegQueryValueEx() Function to fethch the value from the reggistry I set previously.
But getting porblem. It fetches only first charcter only.It Show the Corrent size of the Value but Fail to Fetch the Whole String.Previously I was using the RegQueryValue() and It is working Fine . But I need to use RegQueryValueEx() as I have to fetch Other valued in addition with default.
The Code I am using is as follow.
RegOpenKey(HKEY_CURRENT_USER,L"Software\\PersonalMenu",&hKey);<br />
Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,NULL,&size);<br />
BYTE *Data = new BYTE[size];<br />
Code= RegQueryValueEx(hKey,L"JAVA",0,&Type,(BYTE *)Data,&size); <br />
I dont know what is the problem with it. If it is showing the Correct size of the Value don't it also show the Value.
|
|
|
|
|
Do you have a unicode project setting but not viewing the string as unicode ? This would explain that you would see the first character.
|
|
|
|
|
Are you getting a string value into a BYTE array?
If so, how are you examining the string? Intellisense may only show you the first byte.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I am using using STL::map in one of my .cxx files. .cxx is a schema file generated by VC++ using \Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT.
But whn I build the code I get these Link Errors
schema.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall Linking...
Creating library Release/Schema.lib and object Release/Schema.exp
LINK : warning LNK4098: defaultlib "mfc42ud.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42ud.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
schema.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall _STL::_Lockit::~_Lockit(void)" (__imp_??1_Lockit@_STL@@QAE@XZ)
schema.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall _STL::_Lockit::_Lockit(void)" (__imp_??0_Lockit@_STL@@QAE@XZ)
Release/Schema.dll : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.
My concern is these 2 Link errors!!!
can u help me out?
thanks,
Vinod.C.S
|
|
|
|
|
Vinod CS wrote: "mfc42ud.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "mfcs42ud.lib" conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib "msvcrtd.lib"
those are the debug versions of the C/MFC runtimes, but you're apparently doing a release build. you can't mix debug and release builds like that.
if you're linking to a static library, make sure you're linking to the release build of the library for release builds of your EXE
|
|
|
|
|
I am Using Win32 Dialog based Application. And trying to add the string in Combo Box as runtime with following code.
HWND hComboBox = GetDlgItem(hWndDlg,IDC_NameCombo);<br />
LRESULT lr = SendMessage (hComboBox,CB_ADDSTRING, 0, (LPARAM)L"Item 1 ") ;<br />
But nothing is added in ComboBox. I checked the lr Value and it show 0. I.e. Operation Completed Successfully.
if you know please tell me what is the problem.
Thnx in Advance.
|
|
|
|
|
Your code is working perfect without any problem but did you check return value of hComboBox and whats value of lr?
|
|
|
|
|
It not working Here. I have Win32 Dialog Based Application
Earlier I was using the Code when Some press the Butoon. Now I have put it in
WM_INITDIALOG But it is still not working
The Value of Combo Box Handle (hComboBox ) is 0x002804c2
And the Value of LRESULT from SendMessage() is 0.
|
|
|
|
|
I dont know what was the problem. But i deleted the Combo box And Add new One. And Now Its working Fine.
|
|
|
|
|
If its working so you dont need to help .
|
|
|
|
|
GauranG033But nothing is added in ComboBox.
There is a difference between nothing being added vs. not being able to see the added item. Since SendMessage() returned 0 , the item was added.
"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
|
|
|
|
|
Hi
Can any one told me how we can change the caption font of button
can any one told me how we can do this. if possible plz send me any example
Regard's
Kaushik
|
|
|
|
|
|
You can use of SetFont function.
|
|
|
|
|
Hey guys , I vaguely remember an API like GetFilePath, that gives you the directory path of a file when you pass the complete file path. like
c:\windows\temp.txt ------>> c:\windows\
You remember that one? And there were also many functions like that to process the "\" "/" like that and to get root folder and many more things. damn nothing strikes for me now. I stronly remember I found them in MSDN, but couldn't spot any of them now. Please help!
|
|
|
|
|
|
I tried a hundred time "Shell" + api + path and all combination, I got all craps. The worst crap was the page that took me to "Shell("mspaint.exe")" .. A vb function just like createProcess. VB!!
Anyway I'm so happy I've found the exact page in MSDN . to you!
|
|
|
|
|
I'm bookmarking it with a grim face, like you do when your pet runs out of the compound making us to run through all the streets to find him. Good you got him, now with few smacks on his a*se, I'm kicking him back to his kenel.
|
|
|
|
|
|
What about PathRemoveFileSpec() ?
"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
|
|
|
|
|
DavidCrow wrote: PathRemoveFileSpec()
Yup, I was just trying to spot this guy, found and used it here[^].
Btw David, I have a simple question related to above, If you want to clear a char buffer[] (stack allocated) , what's the proper way?
like :
char szTemp[256];
<br />
strcpy(szTemp,"");<br />
*szTemp = 0;<br />
ZeroMemory(..)<br />
Memset(..)<br />
*szTemp = NULL;<br />
|
|
|
|
|
VuNic wrote: If you want to clear a char buffer[] (stack allocated) , what's the proper way?
like :
char szTemp[256];
I would use:
char szTemp[256] = { '\0' }; for initialization, and then memset() later on to clear its contents.
"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
|
|
|
|
|
Dear all
after i debugged my system, output showed me below: DlgOpenCylinder.cpp(376) : error C2601: 'OnCypasteImage' : local function definitions are illegal
Error executing cl.exe.
how to resolve this issue?
thanks
Li Zhiyuan
15/092007
|
|
|
|