Click here to Skip to main content
15,924,036 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: how to change the alpha value of bitmap Pin
Hamid_RT18-Jan-08 19:16
Hamid_RT18-Jan-08 19:16 
GeneralRe: how to change the alpha value of bitmap Pin
trioum18-Jan-08 23:06
trioum18-Jan-08 23:06 
General_AfxCheckDialogTemplate Pin
Chandrasekharan P17-Jan-08 19:14
Chandrasekharan P17-Jan-08 19:14 
GeneralRe: _AfxCheckDialogTemplate Pin
Don Box17-Jan-08 20:00
Don Box17-Jan-08 20:00 
GeneralRe: _AfxCheckDialogTemplate Pin
Hencil15-Jun-10 2:04
Hencil15-Jun-10 2:04 
GeneralExecute a function using command line parameters. Pin
CodingLover17-Jan-08 18:58
CodingLover17-Jan-08 18:58 
GeneralRe: Execute a function using command line parameters. Pin
Don Box17-Jan-08 19:59
Don Box17-Jan-08 19:59 
GeneralRe: Execute a function using command line parameters. Pin
CPallini17-Jan-08 21:05
mveCPallini17-Jan-08 21:05 
A simple approach is choosing the function to call based on a numeric argument.

Suppose the application name is myapp.exe (I suppose you're writing a console application), you can type
myapp.exe 1


to make the application call func1,
myapp.exe 2

to make it call func2 and so on, provided your application main is structured a way similar to the following:

void main(int argc, char * argv[])
{
  int n;
  if (argc != 2)
  {
    printf("usage %s <number>\n", argv[0]);
    return;
  }
  n = atoi(argv[1]);
  switch(n)
  {
  case 1:
    func1();
    break;
  case 2:
    func2();
    break;
  /* and so on... */
  default:
    printf("invalid function number\n");
   break;
  }
}
</number>

Smile | :)

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.

[my articles]


GeneralRe: Execute a function using command line parameters. Pin
CodingLover17-Jan-08 21:49
CodingLover17-Jan-08 21:49 
GeneralRe: Execute a function using command line parameters. Pin
CPallini17-Jan-08 22:04
mveCPallini17-Jan-08 22:04 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover17-Jan-08 22:34
CodingLover17-Jan-08 22:34 
QuestionRe: Execute a function using command line parameters. Pin
CPallini17-Jan-08 22:46
mveCPallini17-Jan-08 22:46 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover17-Jan-08 22:54
CodingLover17-Jan-08 22:54 
GeneralRe: Execute a function using command line parameters. Pin
CPallini17-Jan-08 23:00
mveCPallini17-Jan-08 23:00 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover17-Jan-08 23:03
CodingLover17-Jan-08 23:03 
GeneralRe: Execute a function using command line parameters. Pin
CPallini17-Jan-08 23:09
mveCPallini17-Jan-08 23:09 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover22-Jan-08 18:41
CodingLover22-Jan-08 18:41 
GeneralRe: Execute a function using command line parameters. [modified] Pin
CPallini22-Jan-08 21:15
mveCPallini22-Jan-08 21:15 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover22-Jan-08 21:41
CodingLover22-Jan-08 21:41 
GeneralRe: Execute a function using command line parameters. Pin
CPallini22-Jan-08 21:49
mveCPallini22-Jan-08 21:49 
GeneralRe: Execute a function using command line parameters. Pin
CodingLover22-Jan-08 22:14
CodingLover22-Jan-08 22:14 
GeneralOpening a running process programmatically Pin
lctrncs17-Jan-08 18:46
lctrncs17-Jan-08 18:46 
GeneralRe: Opening a running process programmatically Pin
Iain Clarke, Warrior Programmer18-Jan-08 2:34
Iain Clarke, Warrior Programmer18-Jan-08 2:34 
GeneralRe: Opening a running process programmatically Pin
Member 75496018-Jan-08 7:37
Member 75496018-Jan-08 7:37 
GeneralFull screen stop function Pin
gentleguy17-Jan-08 17:48
gentleguy17-Jan-08 17:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.