|
Thanks. I'll take a look at it.
Danny
The stupidity of others amazes me!
|
|
|
|
|
Hello,
I have a CTreeCtrl-derived class. I want it to continue to show what item is selected when the control loses focus. I want the same behavior Windows Explorer has: when the control loses focus, the currently selected item's highlight goes from blue to grey.
Currently, when the object loses focus, the selected item loses its high-light.
Does anyone know how to fix this?
Thanks!
Ian
|
|
|
|
|
Does the TVS_SHOWSELALWAYS style do what you want?
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Unfortunately, no (I am using that style).
|
|
|
|
|
You can set the property Show selection always in the properties dialog box.
Neelesh K J Jain.
|
|
|
|
|
Well, according to the documentation I've read, that is what the TVS_SHOWSELALWAYS style is for. However, I'm using that style, and I'm not getting the desired behavior...
???
|
|
|
|
|
Did u mentioned the style at the creation time or else r u modifying at the a particular message handler.
Better set this property at the time of creating the tree control. If you have placed the tree control on the dialog box, then its very simple as I mentioned earlier.
Neelesh K J Jain.
|
|
|
|
|
Hi,
With yahoo messenger installed, if you would like to send
an instant message, you can goto Run and type like this
ymsgr:sendIM?somebody
The instant message window will popup. If the yahoo messenger is not running in tray, it will popup after it gets signed.
The same can be done with a hyperlink in a html page.
" Yahoo Id: <a href="ymsgr:sendIM?somebody">somebody</a> "
Now the point how is yahoo messenger achieving this. I would like to do the same for a simple dialog based application. I would like add my application name in the html page and the application should run when the hyperlink is clicked.
Please refer this.
http://www.codeproject.com/html/Yahoo.asp
Thank You
|
|
|
|
|
You need to install a handler for the protocol (e.g. in your example, it would be for ymsgr that maps the protocol name to your EXE.
Full details here[^].
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
I am programming a Socket enabled with SSL.while asking for credentials
ie AcquireCredentialsHandle returns with SEC_E_INTERNAL_ERROR.I
searching in the net i found that similar problem is faced by some
people and they were suggested that their private key is not available
at the time of getting credentials.
I have created Certificate Request using openssl.i used a command to
obtain private key and certificate request.
openssl> req -newkey rsa:1024 -keyout server.key -nodes -days 365 -out
server.csr
server.key contains RSA private key
server.csr contains the request for certificate.
I clicked the Advance option in the Certificate service and pasted the
contents in the block .i got the certificate named certnew.cer.i opened
this file clicked an option "copy to a file"and marked the option
pkcs#7(.P7B).i named the file "FileStore".the file generated is
"FileStore.p7b" .Also i have not used installed certificate option
since my certificate store provider is a file provider so i did this
/*code for file store*/
#define ENCODING_TYPE (PKCS_7_ASN_ENCODING | X509_ASN_ENCODING)
HCERTSTORE m_hMyCertStore;//handle to certificate store
m_hMyCertStore = CertOpenStore(CERT_STORE_PROV_FILENAME_A,
ENCODING_TYPE,
NULL,
NULL,
_T("FileStore.p7b"));
I want to know that with above procedure i followed whether my private
keys are available when my CERT_CONTEXT gets created.and if any other
problem please suggest me.
Thansx in advance for any suggestion
|
|
|
|
|
Hi,
when I use the MFC Application Wizard to generate a MFC application (dialog based), I can't even run this basic generated code anymore. "Anymore" because it worked 2 days ago. But I really didn't change anything in my VS .NET 2003 installation.
I can compile and link the generated program, but when i run it, i get the following error (it's german...):
Die Anweisung in "0x0000000" verweist auf Speicher in "0x00000000". Der Vorgang "read" konnte nicht auf dem Speicher ausgeführt werden.
Any suggestions?
|
|
|
|
|
That is a classic. Your reading a null pointer. The following program will cause the same error.
int* x = 0;
*x = 1638;
When you get the message, click cancel so that it will load it in the debugger. Use the call stack to see where your reading the null pointer.
|
|
|
|
|
This is probably not the case, because it says that the instruction is also at 0x00000000 .
The most possible reason is memory corruption, whose causes range from the lack of VS6 service packs, through link conflicts, to the physical damage of the hardware.
Regards,
BB
http://spin.bartoszbien.com
|
|
|
|
|
rncwnd wrote:
Die Anweisung in "0x0000000" verweist auf Speicher in "0x00000000". Der Vorgang "read" konnte nicht auf dem Speicher ausgeführt werden.
ok, it's german, but we used to speak english on CodeProject, so could you please make a brief translation to allow us to understand what VStudio tells you ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
|
Google says:
The instruction in "0x0000000" refers to memory in "0x00000000". The procedure "READ" could not be implemented on the memory.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Well, thanks so far.
I recompiled the project with a map-file an debugging infos. Now I get this call stack:
testMFC.exe!ATL::CRegParser::MAX_VALUE() + 0x1f<br />
mfc71d.dll!CWnd::OnWndMsg(unsigned int message=272, unsigned int wParam=459270, long lParam=0, long * pResult=0x0012f990) Zeile 2013 + 0x11<br />
mfc71d.dll!CWnd::WindowProc(unsigned int message=272, unsigned int wParam=459270, long lParam=0) Zeile 1745 + 0x1e<br />
mfc71d.dll!AfxCallWndProc(CWnd * pWnd=0x0012fe3c, HWND__ * hWnd=0x000300e6, unsigned int nMsg=272, unsigned int wParam=459270, long lParam=0) Zeile 241 + 0x1a<br />
mfc71d.dll!AfxWndProc(HWND__ * hWnd=0x000300e6, unsigned int nMsg=272, unsigned int wParam=459270, long lParam=0) Zeile 389<br />
mfc71d.dll!AfxWndProcBase(HWND__ * hWnd=0x000300e6, unsigned int nMsg=272, unsigned int wParam=459270, long lParam=0) Zeile 209 + 0x15<br />
user32.dll!77d18734() <br />
user32.dll!77d18816() <br />
user32.dll!77d1b89b() <br />
user32.dll!77d24e28() <br />
user32.dll!77d2514c() <br />
user32.dll!77d39b1b() <br />
mfc71d.dll!CWnd::CreateDlgIndirect(const DLGTEMPLATE * lpDialogTemplate=0x004188d8, CWnd * pParentWnd=0x00000000, HINSTANCE__ * hInst=0x00400000) Zeile 310 + 0x2a<br />
mfc71d.dll!CDialog::DoModal() Zeile 519 + 0x20<br />
testMFC.exe!CtestMFCApp::InitInstance() Zeile 58 + 0xb<br />
mfc71d.dll!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00141f0c, int nCmdShow=1) Zeile 39 + 0xb<br />
testMFC.exe!WinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, char * lpCmdLine=0x00141f0c, int nCmdShow=1) Zeile 25<br />
testMFC.exe!WinMainCRTStartup() Zeile 390 + 0x39<br />
kernel32.dll!7c816d4f() <br />
ntdll.dll!7c925b4f() <br />
kernel32.dll!7c8399f3() <br />
|
|
|
|
|
|
Annoying, isn't it? I thought it was a little funny how he gave us an error code written in German and expected us to understand it, when this site is worldwide.
Danny
The stupidity of others amazes me!
|
|
|
|
|
And yet, english is the dominant language. Why aren't we all writing in Chinese?
babelfish and google have free translation services.
--
Look straight into the light!
|
|
|
|
|
Ever heard of lingua franca? It was a term that began back when French was the dominant language. Everyone used French, to dicuss science, art, international anything.
When England became a world power dominating a fourth of the world's population, "the country that the sun never set on" or something like that, English became the dominant language.
America became the dominant world power, well, at least since the atomic bomb was created, but before that as well. Hey, they beat England to become free! Hence, the world speaks American English.
If the Chinese could become anything worth not laughing at, maybe we would be speaking Chinese.
Thanks for the tip on the translation services, though.
Danny
The stupidity of others amazes me!
|
|
|
|
|
Someone said I should read the call trace to find a solution for this error. Well, there it is, but I don't understand it. The program which produced this error (stated above - translation just some post under my first post!!) is an empty MFC-app generated from the MFC-Application Wizard. I made NO changes to the code.
If you guys (BugDanny & toxcct) would have read my first posting and the postings from the other guys, maybe you wouldn't have judged me stupid and annoying.
No I am NOT a VC++/MFC guru like you might be. That's why I thought I could find some answers on this board.
|
|
|
|
|
rncwnd wrote:
If you guys (BugDanny & toxcct) would have read my first posting and the postings from the other guys, maybe you wouldn't have judged me stupid and annoying.
I did read all the postings before I made my post. My post was intended as a comment on the mildly annoying, albeit funny way that you posted your error in German originally, since you seem to be able to write English as well and this is a worldwide slight. I did not judge, or even all you stupid. (This is bugDanny writing, from a computer a don't usually use.) Neither did toxcct, I don't think.
rncwnd wrote:
No I am NOT a VC++/MFC guru like you might be.
And that's all right. This is the place to come for questions. You do not need to be a VC++/MFC guru to post your questions in Enlighs on a worldwide site (see my earlier post on lingua franca) or to make a statement or comment along with your long stack call list.
rncwnd wrote:
That's why I thought I could find some answers on this board.
And this is the perfect place to come. As another noted, I would suggest, if the error was produced just by using the MFC App Wizard, to redo the action in another directory and see if the problem reproduces. If it does, I would suggest uninstalling and reinstalling your VC Studio. Perhaps the program had gotten corrupted somehow. As an alternative, you could post exactly which selections you made in the App Wizard. Perhaps there were selections you made that put this program in this state. At the very least, someone might be able to reproduce your error.
I'm sorry if I deeply offended you. I did not intend my post to be taken that seriously.
|
|
|
|
|
Anonymous (that is bugDanny) wrote:
I did read all the postings before I made my post. My post was intended as a comment on the mildly annoying, albeit funny way that you posted your error in German originally, since you seem to be able to write English as well and this is a worldwide slight. I did not judge, or even all you stupid. (This is bugDanny writing, from a computer a don't usually use.) Neither did toxcct, I don't think.
Well, then I misunderstood you both and I'm sorry for that.
I didn't know that e.g. google translates of error messages are that good (I didn't want to translate the error message because I was afraid to give it a completly diferent signification...)!!!
My program works now. After I deinstalled VS and installed it again after a memory and hdd check... After a "new rebuild" of all my MFC-programs they worked again.
Sometimes computers drive me really crazy.
|
|
|
|
|
If your app was generated with the application wizard and you didn't change anything (at least, not intentionally), I'd suggest creating a new one in a separate directory and see if it produces the same error. If not, as I would expect, compare all the sources (*.cpp; *.h; *.rc) to see what's causing the problem.
Other than that, and according to the call stack you posted, the problem occurs while your dialog receives the WM_INITDIALOG message. From CWnd::OnWndMsg (the second item from the top of the stack), it's going to ATL::CRegParser::MAX_VALUE, which is weird and would indicate some corruption.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|