|
Green Fuze wrote:
void CHelperDlg::ReadFiles(CString TheVar, CFile ReadedFile)
Change to:
void CHelperDlg::ReadFiles(CString &TheVar, CFile ReadedFile)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Perfect!
and I think I just understood something really important!
thanks!
|
|
|
|
|
On top of that, make sure you pass your CFile object by reference or pointer, otherwise the state of the CFile object when returning from the function will be out of sync with the state of the operating system file handle.
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"
|
|
|
|
|
Do anyone know how to encrypt a data into a database in vc++?plz help me!!!
|
|
|
|
|
What do you want to know? The encrypt method, or the encripting with vc++? You can google and find encrypt method.
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
|
Hi,
I am trying to delete a value from my windows registry through VC++ code. Tried using a couple of win API's like RegDeleteValue(), DelRegTree but did'nt really work.
May be I am passing incorrect arguments or I am using the wrong functions. I would appreciate if someone shares his/her views, may be the method to be used or so.
eg.
I have to delete XXX from the registry. This is how my registry looks.
HKEY_CURRENT_USER
Software
Something
ProductV1
ProductV2
XXX
Thanks
|
|
|
|
|
Here is small Source code
#include <atlbase.h>
CRegKey key;
if(key.Open(HKEY_CURRENT_USER,"Software\\Something\\ProductV1\\ProductV2")==ERROR_SUCCEESS)
{
key.DeleteValue("XXX");
key.DeleteSubKey("123");
key.Close();
}
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Something has badly changed in .NET compared to vc 6.
I am getting an error
error C2065: 'CRegKey' : undeclared identifier
But I looked at .NET\atlbase.h, I see a class named CRegKey.
Anybody any ideas?
Thanks
|
|
|
|
|
It's going to be hard to show what you did wrong if you don't show us the code that is not working.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I copied and pasted the same code that Alok listed above.
Also included the header file #include <atlbase.h> in the source code. Thats all I did.
Thanks
|
|
|
|
|
Ok, but what about the code that you had before CRegKey was suggested? There is no reason why you should not be able to get that working.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I had tried this earlier. But RegDeleteValue always returns 2 (file not found error)
long retVal = RegDeleteValue(HKEY_CURRENT_USER, "Software\\Company Name\\Product Name\\File-TT");
Thanks
|
|
|
|
|
Maybe for this one you need to use:
HKEY MyKey;<br />
<br />
LONG RegOpenKey(<br />
HKEY_CURRENT_USER, "Software\\Company Name\\Product Name,<br />
&MyKey<br />
);<br />
<br />
RegDeleteKey( <br />
MyKey, <br />
"File-TT"<br />
);<br />
<br />
RegCloseKey(MyKey);
You delete registry values by opening the entire key, you delete registry keys by opening the parent key and then calling RegDeleteKey with the name of the child.
|
|
|
|
|
Hi All,
I want to write a simple C/C++ program which should be able to display All Unicode characters, that are present in character set of any Standard Unicode Font.
I am using the wchar_t data type to store the character constant but how can i pass the Unicode value for a literal like HINDI Aa (\u0905)
But it will always give the error literal constant extends limit
Can Anyone help me out
Thanks In Advance
Nitin Mahajan
|
|
|
|
|
|
#include <conio.h>
#include <locale.h>
#include <iostream.h>
#include <stdlib.h>
#include <stdio.h>
int wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] )
{
wchar_t wc = '\x0907';
cout<<wc;
getch();
}
now="" i="" am="" getting="" the="" error=""
ibcd.lib(wwincrt0.obj)="" :="" lnk2001:="" unresolved="" external="" symbol="" _wwinmain@16
and="" want="" to="" send="" this="" character="" <b="">wc to a notepad window for displaying the it there by pressing a button from my application. Is there any way you have for that?
I have tries the postmesage API but it doesn't work as:
PostMessage(HWND_BROADCAST,ch,WM_CHAR,0);
Thanks 4 Ur Reply
|
|
|
|
|
nitinmahajan80 wrote:
int wmain( int argc, wchar_t *argv[ ], wchar_t *envp[ ] )
Isn't that Decalartion Right,WinMain Sig. is something like this
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR cmdLine,
int nShowCmd)
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
No Mr Alok,
This is used only when we are making the MFC DLL but i am making the Win32 Application
And what about Postmessage that i am asking abot have u got any idea.
I am presently loking for WM_UNICHAR windows message to be send as parameter in Postmessage API which is not implemented for versions before windows XP
|
|
|
|
|
|
I have done that & so far i am successful in displaying string in the AfxMessage dialog box. But my problem is that I want to write the data into the file or to the notepad.
For this i am using the concept of :
i}
wmain()
{
wchar_t tch = L'\x311b';
TCHAR *tstring;
...
_stprintf(tstring,_T("Tchar Character : %su"),(LPCTSTR)tch);
...
}
2}
PostMessage , SendMessage API and trying to pass WM_UNICHAR message to that but till now not succesful
|
|
|
|
|
Hello guys,
Requirement:My Application should work with any baudrate starting from 01- 256k ideally and i need to implement for 76800 baud with out fail.
Constraint:We are able configure the bauds from 0 - 9600 (all the numbers), 10400,14400,19200,38400,56000,57600,etc..... when i give different baudrate from the above list, the error comes is Invalid Parameter.
Question: Is there any work around to overcome this constraint.It's really urgent.
can someone through light on this.????
Thanks in advance.
Adi
|
|
|
|
|
I take it your tryig to set the baud rate through a DCB structure and the BaudRate member.
Ar eyou setting it like this:
dcb.BaudRate = 76800;
The other issue could be that some of the othere DCB parameters are not filled out correctly.
If you vote me down, my score will only get lower
|
|
|
|
|
Hello Roger,
Thanks for your response. Yes i'm setting the baudrate and other configuration parameters of serial port using DCB structure only with SetCommState() Function.
so when i use baudrates like 76800, the return value of SetCommState() function is INVALID_PARAMETER. So i want to know if anyone has done something to achieve this kinda baudrates configured with serial port for their requirements.
Thanks
Adi
|
|
|
|
|
Some systems (drivers) have a list of accepted baud rates, I'm not sure if that could be your problem. Certainly on standard PC serial ports the hardware only allows a limited selection of baud rates and the driver will reflect this.
Elaine
The tigress is here
|
|
|
|