|
Hope it [^] helps.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Thanks for your article.
I tried the following:
SendMessage(hdlg, WM_NEXTDLGCTL, (WPARAM)hwndControl, TRUE);
But it has exactly the same effect. Focus is on textbox B and the insertion bar is in textbox A
If i switch to another application and come back to my application, the focus and the bar is correctly displayed.
That's strange to me :S
|
|
|
|
|
Well, you could use use Invalidate () to make the dialog redraw for a quick bodge - but I'm curious why the WM_NEXTDLGCTL isn't working properly.
Can you get to your desired control by pressing TAB a lot? If not, that may be a clue for you.
Iain.
Plz sir... CPallini CPallini abuz drugz, plz plz help urgent.
|
|
|
|
|
Iain Clarke wrote: but I'm curious why the WM_NEXTDLGCTL isn't working properly.
i'm sure it's working like the OP told it to work
|
|
|
|
|
Thanks for the answer, but it also don't work.
But i see a reason :
If i hit the return-Key i execute the "OnButtonClick" block, there in i open a MessageBox.
With this messagebox it failes. If i comment out this line, it works nicely.
If i click really with the mouse on the button, to launch the operation, i change the focus
by clicking on the button... Then it works nicely (using the MessageBox)
So, i change the focus myself, programatically on the button BEFORE i open the MessageBox.
Then it works again ...
But it's seriously not the solution to set at the beginning the focus on a button, then on another textbox ... or?
Thanks for answers
|
|
|
|
|
Hi all,
I am working om an ftp client module in MFC C++ 6. Using the CInternetSession and CFtpConnection. This all works fine. However, I have a customer who is connecting through a Socks proxy. I have tried to install such a proxy myself and get my ftp client to connect through that proxy, but I don't seem to get it to work. First of all, the CInternetSession has the ability to specify a CERN proxy name, but I am not using a CERN proxy here. Even if I specify the name and port number of my proxy (using the name:## format) my tcp sniffer does not see any attempt to connect to the proxy at all! Secondly, I need to pass the connection a second username/password in order to satisfy the needs of my customer's proxy (In a normal ftp session, this is done using a "USER" command twice: first for the proxy's username/password and secondly for the ftp server)
I can't seem to find any usefull information on the internet either. Does anyone have any realy bright ideas that can shed some light on the subject please?
Many thanks in advance
William
|
|
|
|
|
Hello I have a little problem,
Have a program in borland C++ and wanted to transfer it in Visual C++ but i got some error. One of it is with randomise and rand function. What should I include? Or is there other function that do the work in term of randowm numbers in visual c++ ?
|
|
|
|
|
Without seeing the code and the exact error it's a bit difficult to see what the exact problem is. Anyway, you have to use srand to generate the seed and rand to retrieve the random number (see those functions in MSDN if you need more info). You have to include <stdlib.h> also.
|
|
|
|
|
rand function is used in vc++ also.
int rand( void );
Do you include "stdlib.h" library.
Please send your code or error message.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
modified on Thursday, May 15, 2008 4:11 AM
|
|
|
|
|
Please explain me why low score.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Shilpi Boosar wrote: Please explain me why low score.
Actually it did not deserve it. I've balanced.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
ok
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
mihai123 wrote: Have a program in borland C++ and wanted to transfer it in Visual C++ but i got some error.
Oh, you're so informative...
mihai123 wrote: What should I include? Or is there other function that do the work in term of randowm numbers in visual c++ ?
Documentation my, friend, documentation [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Hello all,
My requirement is to place hyperlink in Message Box along with some other message. How could i accomplish this??
Any help is greately apprecited.
Regards,
Hemang
|
|
|
|
|
I don't think you'll be able to put that on a standard MessageBox. Anyway, you can still make your own little dialog box and put something like this[^] on it (there are quite a few other articles about hyper link controls).
|
|
|
|
|
Hi All,
Is there a way by which I could reset the registry to its original state. All the writes to registry should not be flushed to the disk.
Thank you,
AJ
|
|
|
|
|
Using regedit tool, you can eport the registry and then restore it.
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
And why is that you say it to CPallini? He's not the one in need of it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
I guess maybe its helpful for him.
|
|
|
|
|
Did you have any backup of registry? or did you use of applications for get bakcup of registry?
|
|
|
|
|
Hi all,
I'm busy trying to create a screensaver in VS2008 (using C++). The screensaver works fine in Vista, but when in XP it gives me an error message of "The procedure entry point ChangeWindowMessageFilter could not be located in the dynamic link library USER32.dll".
According to Bradwich[^], "To allow your program to run on both XP and Vista, you need to retrieve the pointer to the ChangeWindowMessageFilter function dynamically instead of importing it at compile time". I have absolutely no clue how to do this, as I'm still new to C++. Does anyone know how to do this?
Thank you.
PS: I'm using the "framework" from How to Scr[^]
|
|
|
|
|
I think you need to use LoadLibrary to load "user32.dll" and user GetProcAddress to get the function ChangeWindowMessageFilter.
|
|
|
|
|
Thanks for the response
I got as far as:
HMODULE library = LoadLibrary("User32.dll");
FARPROC method = GetProcAddress(library, "ChangeWindowMessageFilter");
FreeLibrary(library);
I don't know how to actually tell the program to use the retrieved method/function. Could someone show me how to that please?
Thank you.
|
|
|
|
|
"method" is a function pointer. You should cast it to a function pointer type that is the same as ChangeWindowMessageFilter.
Then, instead of calling ChangeWindowMessageFilter(...) , call method(...) .
|
|
|
|