944,144 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2338
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Nov 26th, 2006
0

I need help again

Expand Post »
I have recently began programming in the windows api rather than the command prompt\ms-dos environment.
I am still using windows 98 and bloodshed dev-cpp 4.9.9.2.
I need to know how to disable the START MENU, TASK BAR, and the little boxes in the top right hand corner of the application {Minimize, Restore, Maximize, and Close (1 at a time)} I also need to know how to make a password box rather than meere text\edit, how to set up tabs, how to center objects\elements(Buttons,text,checkboxes...) I will also need to know how to make my app fullscreen, but still have a title bar.
Another problem i have is comparing strings\character arrays...I have to compare the one char. at a time
Example:

cpp Syntax (Toggle Plain Text)
  1.  
  2. //includes
  3.  
  4. char Compare1[] = "Yellow house";
  5. char Compare2[13];
  6.  
  7. //Still having trouble with cin.get
  8.  
  9. //This is what I want to do
  10. cin >> Compare2 //Type "Yellow house"
  11. if (Compare1 == Compare2)
  12. {
  13. cout << "Compare1 == Compare2";
  14. }
  15. else
  16. {
  17. cout << "Compare1 != Compare2";
  18. }
  19. //End of what I have to do
  20.  
  21. //Even when I type the text exactly the same it still says it isn't the
  22. //same... I know that the above cin would more than likely skip the
  23. //spaces\white space, but even when the string has no white spaces it
  24. //still does it.
  25.  
  26. //This is what I have to do
  27. if (Compare1[0] == Compare2[0])
  28. {
  29. if (Compare1[1] == Compare2[1])
  30. {
  31. if (Compare1[2] == Compare2[2])
  32. {
  33. //and so on until all characters are compared
  34. }
  35. }
  36. }
//The above is actually being done in a windows api program with text
//boxes and buttons, but that file was much to unorganized to put here

I appreciate any answers to any or all of my questions...Constructive criticism welcome.
Last edited by WaltP; Nov 27th, 2006 at 3:17 am. Reason: Added code tags
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Brent.tc is offline Offline
90 posts
since Oct 2006
Nov 26th, 2006
0

Re: I need help again

Before you jump into windows programming with both feet, you should read this intoductory tutorial.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Nov 27th, 2006
0

Re: I need help again

Before you jump into windows programming with both feet, you should read this intoductory tutorial.
As well as this
and this, the Keep It Organized section at least.
Last edited by WaltP; Nov 27th, 2006 at 3:18 am.
Moderator
Reputation Points: 3281
Solved Threads: 895
Posting Sage
WaltP is offline Offline
7,749 posts
since May 2006
Nov 27th, 2006
0

Re: I need help again

>>if (Compare1 == Compare2)

you can not compare C character arrays like that. All that is doing is comparing two addresses, not the strings. use strcmp() for that

C++ Syntax (Toggle Plain Text)
  1. if( strcmp(Compare1, Compar2) == 0)
  2. {
  3. // the two strings are the same
  4. }
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Nov 27th, 2006
0

Re: I need help again

I had downloaded that tutorial as I was typing my question.
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Brent.tc is offline Offline
90 posts
since Oct 2006
Nov 27th, 2006
0

Re: I need help again

I am sorry for my mistake...I had no idea I HAD to encase the code in tags...I thought it was optional.
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Brent.tc is offline Offline
90 posts
since Oct 2006
Nov 27th, 2006
0

Re: I need help again

Click to Expand / Collapse  Quote originally posted by Brent.tc ...
I am sorry for my mistake...I had no idea I HAD to encase the code in tags...I thought it was optional.

It is optional, DaniWeb does not enforce that rule, but moderators do. -- If you don't follow the rules then you will greatly decrease the probability that anyone will take you very seriously and answer the question. Many people see unformatted code and just ignore the whole thread.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005
Nov 27th, 2006
0

Re: I need help again

I have looked and looked for a good tutorial covering c++ api programming and the only downloadable one that is even remotely close (Yet still so far away) to what I am looking for is the one by theForger...If anyone can recommend a good tutorial that is for both experienced and very inexperienced programmers, I would be very grateful!
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Brent.tc is offline Offline
90 posts
since Oct 2006
Nov 28th, 2006
0

Re: I need help again

No one has even said ANYTHING about disabling the start menu...In the mean time I have found out how to not allow a user to click it, but they can still use the windows key (on the keyboard to access it...I have already been accused of trying to make viruses on other sites, but I am actually trying to lock my computer from unwanted access (little brothers, sisters) So if anyone could tell me how to do it that would be wonderful.
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
Brent.tc is offline Offline
90 posts
since Oct 2006
Nov 28th, 2006
0

Re: I need help again

Click to Expand / Collapse  Quote originally posted by Brent.tc ...
No one has even said ANYTHING about disabling the start menu...In the mean time I have found out how to not allow a user to click it, but they can still use the windows key (on the keyboard to access it...I have already been accused of trying to make viruses on other sites, but I am actually trying to lock my computer from unwanted access (little brothers, sisters) So if anyone could tell me how to do it that would be wonderful.
The first place to begin your research is at Microsoft. There appears to be several threads about that.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2283
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,963 posts
since Aug 2005

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: int mixed always returns huge negative number
Next Thread in C++ Forum Timeline: how to copy adirectory in C programming





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC