Windows Buttons

Started by
10 comments, last by Quantrizi 22 years ago
I''m making a simple Window Program to convert a text file to a dat file, and visa versa...and would like to know how to get the buttons working correctly. If you care about her/him, you''''ll listen If you love her/him, you''''ll heal his/her wounds If you like her/him, you''''ll do all of the above, and help her/him in need A person who cares is a person who never speaks
Advertisement
Um... use a menu instead. Investigate WM_COMMAND ... provide a little more detail in your question...
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
What is wrong with the button(s) now?


_____________________________________________________

ICQ #: 149510932

Google - OpenGL - DirectX - Windows Guide Network - MSDN - Symantec Virus Info

"Imagination is more important than knowledge." - Albert Einstein

I suggest you look up the Win32 API functions ConvertTextFileToDatFile and UseButtonsCorrectlyEx on MSDN
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
why even use buttons? use a console interface or make it a commandline app. since you dont seem to need much input for what your doing (source file, dest file, and maybe conversion type if the converter cant figure out by the files extension/headers)
If someone can tell me a link or something to a tutorial on how to do a console app with command lines, then i''ll be happy to do that instead.

If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need

A person who cares is a person who never speaks
quote:Original post by Quantrizi
If someone can tell me a link or something to a tutorial on how to do a console app with command lines, then i''ll be happy to do that instead.


Um... are you serious?

Here''s some boilerplate...


  /* --- The following code comes from c:\lcc\lib\wizard\textmode.tpl. */#include <stdio.h>#include <stdlib.h>#include <string.h>void Usage(char *programName){	fprintf(stderr,"%s usage:\n",programName);	/* Modify here to add your usage message when the program is	 * called without arguments */}	/* returns the index of the first argument that is not an option; i.e.   does not start with a dash or a slash*/int HandleOptions(int argc,char *argv[]){	int i,firstnonoption=0;	for (i=1; i< argc;i++) {		if (argv[0] == ''/'' || argv[0] == ''-'') {<br>			switch (argv[1]) {<br>				/* An argument -? means help is requested */<br>				case ''?'':<br>					Usage(argv[0]);<br>					break;<br>				case ''h'':<br>				case ''H'':<br>					if (!stricmp(argv+1,"help")) {<br>						Usage(argv[0]);<br>						break;<br>					}<br>					/* If the option -h means anything else<br>					 * in your application add code here <br>					 * Note: this falls through to the default<br>					 * to print an "unknow option" message<br>					*/<br>				/* add your option switches here */<br>				default:<br>					fprintf(stderr,"unknown option %s\n",argv);<br>					break;<br>			}<br>		}<br>		else {<br>			firstnonoption = i;<br>			break;<br>		}<br>	}<br>	return firstnonoption;<br>}<br><br>int main(int argc,char *argv[])<br>{<br>	if (argc == 1) {<br>		/* If no arguments we call the Usage routine and exit */<br>		Usage(argv[0]);<br>		return 1;<br>	}<br>	/* handle the program options */<br>	HandleOptions(argc,argv);<br>	/* The code of your application goes here */</font><br>	<font color="blue">return</font> 0;<br>}<br>  </pre></DIV><!–ENDSCRIPT–><br>    
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Yes, I''m serious. If anyone here has played StarCraft, and used MPQ2K, they know what I want

If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need

A person who cares is a person who never speaks
quote:Original post by Quantrizi
Yes, I''m serious. If anyone here has played StarCraft, and used MPQ2K, they know what I want

I''ve played StarCraft/Broodwar etc. I''ve also looked at a couple of MPQ ''rippers'' or what not - storm.dll comes to mind. I also recall an article describing the particulars of the mpq format - last I checked the page was 404. But - having that knowledge doesn''t translate into a program - there''s a lot more to it you know? I ask if you''re serious because using the command line seems like such a basic C/C++ task, that when you ask how to do it makes me wonder if you know how to program at all....
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man
Yes, I know how to do some really basic stuff*char, and stuff like that*

If you care about her/him, you''''ll listen
If you love her/him, you''''ll heal his/her wounds
If you like her/him, you''''ll do all of the above, and help her/him in need

A person who cares is a person who never speaks

This topic is closed to new replies.

Advertisement