|
can you write the W32 api code for changing a cursor. I never got to do it. . ..
I hate cursors
gabby
|
|
|
|
|
hi Jack Rabbit
thanks a lot.
it worked for me.
|
|
|
|
|
hello
I want to use mscomm32 activex in an mfc activex that I am writing now.
but because my activex is not a container, I can not create an instance of it!!
what should I do?
thanks
Kamyar Souri
|
|
|
|
|
I need to delete the row that was clicked !!!
How should i do?????
|
|
|
|
|
|
This is the code:
selected=SendMessage(GetDlgItem(hdlg,IDC_LIST1),LB_GETCURSEL,0,0);
SendMessage(GetDlgItem(hdlg,IDC_LIST1),LB_DELETETEXT,selected,0);
gabby
|
|
|
|
|
Hi,
I'm trying to build an application that needs to read the position of a mouse (not the system's mouse) from the serial port.
Can anyone help me, and explain me how the mouse reads data from a port?
Thanks.
|
|
|
|
|
dont think on this problem as a hardware problem!!
easiest way is to handle onMouseMove for a big static control!!!
and use the passed x,y
Kamyar Souri
|
|
|
|
|
Anonymous wrote:
(not the system's mouse)
What does this mean? There is normaly only one mouse attached to a computer. You can retreive its positon on the screen at any time by calling GetCursorPos() (on a Windows machine).
If you need lower level access, then you may need to write your own driver (not a good idea!).
INTP
|
|
|
|
|
Hey every one...
I am asking about how to creat exe files from my application...
I want to make a program that creat other .exe files with a specific values.
for example, When I am running my application, I enter a value (let's say my name) and click on a button named "creat", then an valid exe file will be created and the value (my name) will be inside it.
thanks : )
|
|
|
|
|
what you're asking is very simple but I am curious what would you like the exe to do.
and then I will give you a solution
gabby
|
|
|
|
|
I liked your answer.
To many of the quesions (small amount) seem to be aimed in the wrong direction.
This is a new one and I would also like to know what he would what it to do.
INTP
|
|
|
|
|
:-DHey
what's happening here.
????????
|
|
|
|
|
I don't know why you thing I will use it in the wrong way?
( I don't know how it can be used in a wrong way?)
and I want the exe file to include some buttons and edit box, or maybe include some codes to solve a math. question or any thing else.
why I want exe file?
because it is an extension file, and I already study how to make the other files, like .txt or .html, but never learnt how to make .exe files
so I will be thankful for any help, and Believe me I am not going to use it in wrong way.
|
|
|
|
|
I think you are looking for Dialog based application.
here is Some step that will help-:
!-Open MS Visual Studio 6.0
!-Click on FILE|NEW,and wait for property page to open.
!-select PROJECTS|MFC AppWizard(exe),Do remember to give the name of project.CLick Next
!-Select type to Dialog based,and click next till wizrad over.
!-now you are presented with Dialog Box editor,drag and drop your Control to Dialog box,build and execute the Preoject to see your exe
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Yeah I know, but I want my project which is an exe file to creat other exe files.
thanks alot
|
|
|
|
|
you must first have the contetnt of the exe file somewhere. in the resources or just in an ordinary file.
then you open the new file where you want it to be created:
FILE *exec;
exec=fopen();
while(true)
{
data=readfile(oldfile);
fprintf(exec,data);
}
this is the idea of the code.
To load it from the resources is a little longer code and I am tired so I won't write the code. try to read the MSDN more.
good luck.
|
|
|
|
|
thank you. I think he ust said what the exe should do but it seems kind of hard to do.
gabby
|
|
|
|
|
Thank you very much for your help.. I got also the idea of how to do it, but I still can't do it.... can you give which title i should search in MSDN
I know it is hard, but I will not give up
thanks again
|
|
|
|
|
Hmmm hard to tell.... The MSDN is really big.
What sort of problem are you having now. If it is about manipulating files read about I/O functions which you can find by going to the index tag in the MSDN and type any of the functions (ex CopyFile) and in the bottom of the page you get a link like this:
See Also
File I/O Overview, File I/O Functions, CopyFileEx, CreateFile, MoveFile ;
You may choose any of those but it advisable that you should choose "File I\O overview".
Then if you have problems with manipulating strings go to the index tag as well in the MSDN and write a str function ( ex: strcmp) then you will see that the function has also an example along with the explanation. In the bottom of the page you get this link: "String Manipulation Routines". Push it and you will see al the possible functions all with an exapmle each.
I thing that these were the issues you where concerned in, otherwise tell what exactly can't you do.
Good Luck.
gabby
|
|
|
|
|
Thanks alot man... your replay includes many things, so I need to be over them all, and try it one by one... so it will take some time until I ask the next question
I am very thankful for your help
thanks again
|
|
|
|
|
no problem I am here to help whenever is neccesary.
gabby
|
|
|
|
|
Hi,
I'm a C++ newbie and have a liitle problem I hope someone can help me with here.
I have a Visual C++ project consisting of about 20 source files, one of which contains main(). I originally built a dialog-based application, and have no menus in the application. I am trying to run main(), by clicking on a Control button, "Analyze", inside the OnAnalyze() function.
From my understanding, main() is supposed to harness all my other source files and implement it. Now, I need to run main() from a control button, in my MFC application. The project compiles with no errors at present but I don't know how to run main() with the control button.
Or would it may be necessary to implement an instance of the control in main()? Otherwise, since I'm running Visual C++, do I need to make any changes to WinMain()? or do I make a call to WinMain() from my control? how would i do this?
Thaanks a lot in advance!
|
|
|
|
|
I tried
void CKuchukDlg::OnAnalyze()
{
// TODO: Add your control notification handler code here
extern main();
return main();
}
but because OnAnalyze() already has type "void", it cannot return a value; so I get error C2562.
Thanks.
|
|
|
|
|
How did you manage to get to 20 source files without knowing how to program?
(Never mind) The main() it the enterance to your program. That is you have to have one and only one main() function (routine, method or what ever you what to call it), otherwize you have no program.
Now down to business!
What ever code you put in the main() function move it to another function (name it anything you like). Now all you have to do is call that new function (simple).
Oh! By the way the new fuction should not be in the same file as the origanal main() funtion and the file containing the origanal main() funtion should not be included in the build.
INTP
|
|
|
|