Click here to Skip to main content
15,926,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionProblem with pageup and pagedown keys Pin
Sunayna14-Jul-08 21:23
Sunayna14-Jul-08 21:23 
AnswerRe: Problem with pageup and pagedown keys Pin
Nelek14-Jul-08 21:26
protectorNelek14-Jul-08 21:26 
GeneralRe: Problem with pageup and pagedown keys Pin
Sunayna14-Jul-08 22:57
Sunayna14-Jul-08 22:57 
GeneralRe: Problem with pageup and pagedown keys Pin
Nelek15-Jul-08 1:34
protectorNelek15-Jul-08 1:34 
QuestionHow to use command line arguments in a win32 application? Pin
Sauce!14-Jul-08 21:14
Sauce!14-Jul-08 21:14 
AnswerRe: How to use command line arguments in a win32 application? Pin
Cedric Moonen14-Jul-08 21:26
Cedric Moonen14-Jul-08 21:26 
GeneralRe: How to use command line arguments in a win32 application? Pin
Sauce!14-Jul-08 21:36
Sauce!14-Jul-08 21:36 
AnswerRe: How to use command line arguments in a win32 application? Pin
CPallini14-Jul-08 21:41
mveCPallini14-Jul-08 21:41 
Your code has several flaws.
Try
int iLen = _tcslen(lpCmdLine);
for (int i = 0; i < iLen - 2; i++) // supposing at least a digit following -h or -w option
{
  if ( lpCmdLine[i] == _T('-'))
  {
    if (lpCmdLine[i+1] == _T('h'))
    {
      WINDOW_HEIGHT = _tstoi(&(lpCmdLine[i+2]));
    }
    else if (lpCmdLine[i+1] == _T('w'))
    {
      WINDOW_WIDTH = _tstoi(&(lpCmdLine[i+2])); 
    }
  }
}

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.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


[My articles]

GeneralRe: How to use command line arguments in a win32 application? Pin
Sauce!14-Jul-08 21:50
Sauce!14-Jul-08 21:50 
GeneralRe: How to use command line arguments in a win32 application? Pin
CPallini14-Jul-08 22:00
mveCPallini14-Jul-08 22:00 
GeneralRe: How to use command line arguments in a win32 application? Pin
Sauce!14-Jul-08 22:21
Sauce!14-Jul-08 22:21 
GeneralRe: How to use command line arguments in a win32 application? Pin
CPallini14-Jul-08 22:38
mveCPallini14-Jul-08 22:38 
GeneralRe: How to use command line arguments in a win32 application? Pin
Sauce!15-Jul-08 2:39
Sauce!15-Jul-08 2:39 
GeneralRe: How to use command line arguments in a win32 application? Pin
CPallini15-Jul-08 3:15
mveCPallini15-Jul-08 3:15 
GeneralRe: How to use command line arguments in a win32 application? Pin
Sauce!15-Jul-08 5:51
Sauce!15-Jul-08 5:51 
GeneralRe: How to use command line arguments in a win32 application? Pin
CPallini16-Jul-08 7:04
mveCPallini16-Jul-08 7:04 
AnswerRe: How to use command line arguments in a win32 application? Pin
David Crow15-Jul-08 3:21
David Crow15-Jul-08 3:21 
QuestionHow to verify that calling process has read access to the specified range of memory in vista Pin
V K 214-Jul-08 20:33
V K 214-Jul-08 20:33 
AnswerRe: How to verify that calling process has read access to the specified range of memory in vista PinPopular
Stephen Hewitt14-Jul-08 20:42
Stephen Hewitt14-Jul-08 20:42 
AnswerRe: How to verify that calling process has read access to the specified range of memory in vista Pin
Stephen Hewitt14-Jul-08 20:53
Stephen Hewitt14-Jul-08 20:53 
Questionfatal error: Cannot open type library file: 'msxml.dll' in Vista Pin
NiceNaidu14-Jul-08 19:48
NiceNaidu14-Jul-08 19:48 
AnswerRe: fatal error: Cannot open type library file: 'msxml.dll' in Vista Pin
Stephen Hewitt14-Jul-08 20:22
Stephen Hewitt14-Jul-08 20:22 
Questionenable DHCP using win32 API Pin
an8914-Jul-08 19:45
an8914-Jul-08 19:45 
AnswerRe: enable DHCP using win32 API Pin
Stephen Hewitt14-Jul-08 20:36
Stephen Hewitt14-Jul-08 20:36 
Question[Window Mobile Owner Draw] Pin
jjobluewind9714-Jul-08 19:39
jjobluewind9714-Jul-08 19:39 

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.