|
Hakan Bulut wrote: maybe I am agressive
or too lazy ?!
|
|
|
|
|
toxcct wrote: or too lazy ?!
me to..... don't want to work
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
week end is coming
|
|
|
|
|
no my weekend yet to come
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Instead of trying to remove it, don't include it when you create the window initially. If this is an MFC app, change the style in CMainFrame::PreCreateWindow
Judy
|
|
|
|
|
The thing is:
If you want to remove the maximize but you do want to have the minimize, its pretty difficult to erase the first one. But you can easily disable it. Take a look in the PRECREATESTRUCT.style is just a flag to disable one of the buttons, or remove both. But just remove one... too much work :P
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Thanks guy.;P i didn't want to remove just to mean that disabled.
|
|
|
|
|
If it's never enabled, I'd still suggest you don't bother to create it in the first place.
However, if it's both enabled and disabled at different times, I can think of two things to try.
1) Catch the WM_SYSCOMMAND message and if the command id is SC_MAXIMIZE, ignore the message - don't pass it to your default windows procedure. This means the window doesn't maximize. However, it does not cause the button nor system menu item to be shown in grayed disabled state.
2) I haven't tried this to know if it works. It's worth you trying if you want the button and menu item to be disabled. Get a handle to the system menu and disable the menu item for maximized. That will definitely cause the entry in the system menu to be disabled, but I don't know if it will percolate over and cause the maximize button to also disable. Let us know how it goes.
Judy
|
|
|
|
|
Using Visual C++ and web browser control (CDHTMLDialog).
I would like to do the same thing as IE or FF does. Capture email and password on a form when user clicks submit.
I noticed that when the user clicks a button or input that would submit a form, Firefox asks the user if he wants FF to save the password. I want to reproduce the same behaviour using the web browser control.
I think it boils down to 'how can I detect that a form is being submited ?'
Louis.
"Ambition without knowledge is like a boat on dry land"
-Mr. Miyagi
|
|
|
|
|
Hi myself,
* For anyone who is interrested, I managed to do it this way:
1) I can receive mesages when a user clicks on elements in the page. So, i handle clickin on <buttons> and tags. If the type attribute is submit (buttons and inputs) or image (inputs), then it is about to submit the form.
2) Get the form object, get the email and password input fields and retrieve their values.
I am not sure if this is how the browsers do it, but seems to work fine for me.
Louis.
"Ambition without knowledge is like a boat on dry land"
-Mr. Miyagi
|
|
|
|
|
On this site at:
http://www.codeproject.com/java/sharedmem_jni/sharedmem_jni_src.zip
...is a sample program that illustrates its accompanying article, "Using Memory Mapped Files and JNI to communicate between Java and C++ programs."
On the C++ client portion of the sample, I was wondering if someone here would know how to remove its windowing aspect, frames, its window area that paints in text that was broadcast from the java server--and recreate the client as an MFC DLL. I want its functionality preserved, but I don't want to see a window. The resultant C++ code would just write the received broadcast into a flat file or a MessageBox.
I tried to make an MFC DLL out of it, but I can't. I'm just not able; I don't have enough knowledge of the language.
|
|
|
|
|
I think you'll be lucky to find anyone here with the time to do that for you.
The most likely person might be the article author. You could try posting against the article or contacting them directly.
Much more likely to be fun and educational is to do it yourself despite your lack of knowledge. My approach would be to start by creating a vanilla MFC Dll using the wizard. Anyone can do that. Then look at what you get, get the hang of exporting functions and classes from the Dll and create a small executable with the wizard as well. Test that you can load your toy Dll into the toy executable and call a sample function or two.
Now you have all the structure you need, start porting one class or function at a time from the article into your Dll. Keep rebuilding the code at each stage and adding functions on the executable to test what you're adding to the Dll. Very soon you'll have what you want and can post an article on CP trumpeting your success and acknowledging the original article author.
If you get stuck with anything specific along the way there will no doubt be CPians available to help you out. Enjoy
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Another possibility:
If you want all functionality of that programm but you dont want the window... and you are integrating it into another project. You can always write de code into a CObject derived (generic) class, where the methodes will continue working but no windows. Or just try to hide the window to this part.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
how read from file *ini?
how load bitmap from file *.ini into button ?
|
|
|
|
|
hoangtungoc wrote: bitmap from file *.ini
you have bitmaps into a ini ?
|
|
|
|
|
toxcct wrote: you have bitmaps into a ini ?
Shhhh, that's an undocumented feature. Blab about it and Microsoft will surely take it away from us.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
toxcct wrote: you have bitmaps into a ini ?
off course the binary part...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hoangtungoc wrote: how read from file *ini?
GetProfileString(...)[^] GetPrivateProfileString(...)[^]
hoangtungoc wrote: how load bitmap from file *.ini into button ?
Once you have the path from the ini file use LoadImage(...) to load the image file. Then to put it on a button look for documentation on CButton and examples for CButton. There are likely Articles here on Code Project that show how to put an image on a button.
|
|
|
|
|
I have found *.ini files that may be opened with notepad and they are readable, other not. I guess is due to Binary / Text flags by creating the file. But... some of that *.ini I have opened with Ultraedit, had no real sense. I mean, if you are saving a letter in binary you are having to have the ASCII number to represent the letter, aren't you? So, if in the *.ini are only squares, or symbols that don't appear correctly... It is because there is no "letters" just a relation of numbers that the programm understand because of the structure or place, but any (i.e) path to a file or something like that, isn't it?
Or am I misunderstanding something??
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Nelek wrote: Or am I misunderstanding something??
Several things. You do not understand the term "binary" and the concept that data is "viewed", as in Ultraedit, which involves things like fonts etc. It is also possible that you do not understand the concept of storing data on disk and loading the data into memory.
This is interesting because I would suggest that, as a developer, ones work life would be significantly simplified if they clearly understand these issues. There are many others as well.
|
|
|
|
|
|
|
c:\Machine Controller - Source Code\Machine Controller.cpp(529): error C3363: 'int StartListening::initStartListening(void)' : cannot create a delegate handler for 'System::Threading::ThreadStart' from a non-member function or a member of an unmanaged class
Does anyone know how to resolve this error.Thanks
|
|
|
|
|
staticplus wrote: 'System::Threading::ThreadStart'
That appears to be .NET BCL classes and therefore you are in the wrong forum. Go to the C++/CLI forum for C++ .NET Managed development.
staticplus wrote: Does anyone know how to resolve this error.
Yes, you must use a managed delegate as the thread function for a managed thread.
|
|
|
|
|
This is my code snipped where i get this error:
if ((HWND)lParam == hwndStartListening) {
EnableWindow(hwndStartListening, false);
StartListening *a = new StartListening();
Thread *test = new Thread(new ThreadStart(a,StartListening::initStartListening));
test->Start();
//initStartListening();
break;
}
can you tell me how to create a managed delegate as the thread function for a managed thread for the code above. Thanks a lot
|
|
|
|