|
MrMcIntyre wrote: but what I want is when you click on the application a login window appears so users can login to the project or create a new account with a new window.
And what is your doubt about?
It's just a dialog box with some text boxes and possibly static controls (and, maybe, one or two buttons...).
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]
|
|
|
|
|
It's on C++ and I am having trouble creating code for it and to connect it to a database with user accounts and that would be fantatic to have it on the project.
Andrew McIntyre
|
|
|
|
|
I hope you are using Win32/MFC or windows for creating UI.
|
|
|
|
|
Visual Studio can create a skeleton dialog-based application for you, either a MFC project or a Win32 one(if you use MFC the task is somewhat simpler). As for connecting to the database, you've a lot of options (personally, I like ADO ), have a look at CodeProject's articles about [^].
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]
|
|
|
|
|
Would it be easier if I pasted code onto here and I had one error but I don't think I have done right.
Andrew McIntyre
|
|
|
|
|
You may try.
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]
|
|
|
|
|
Please excuse me if I get it wrong the first time but I will get use to it quickly. Here is the top part of the code and the area I put the CreateWindow Code.
<br />
<br />
#include <windows.h><br />
#include <windowsx.h><br />
#include <d3d9.h><br />
<br />
#pragma comment (lib, "d3d9.lib")<br />
<br />
LPDIRECT3D9 d3d;
LPDIRECT3DDEVICE9 d3ddev;
<br />
void initD3D(HWND hWnd);
void render_frame(void);
void cleanD3D(void);
<br />
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);<br />
<br />
int WINAPI WinMain(HINSTANCE hInstance,<br />
HINSTANCE hPrevInstance,<br />
LPSTR lpCmdLine,<br />
int nCmdShow)<br />
{<br />
HWND hWnd;<br />
WNDCLASSEX wc;<br />
<br />
hWnd = CreateWindow(TEXT ("Login"),<br />
TEXT ("Login"),<br />
WS_OVERLAPPEDWINDOW,<br />
CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,CW_USEDEFAULT,<br />
NULL,NULL,NULL,NULL);<br />
ShowWindow(hWnd,SW_SHOWNORMAL);<br />
UpdateWindow(hWnd);<br />
hdc = CreateDC(TEXT ("Design Results"), NULL, NULL, NULL);<br />
I need help with the textboxes, size and button for the dialog to be created. If I have got it wrong could you help me amend it.
Thank you.
Andrew McIntyre
|
|
|
|
|
In your WindowProc implementation,
you should handle WM_CREATE message and try create textboxes, button.
This[^] article may be helpful to you.
HTH
|
|
|
|
|
Can you show me how my code should look like and I will follow on and learn it for next time.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: Can you show me how my code should look like and I will follow on and learn it for next time.
Why don't you learn it for this time?
|
|
|
|
|
As Chief Executive at iWorld, shouldn't your employees be handing this for you?
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Tim Craig wrote: As Chief Executive at iWorld
Oops! Looks like somebody forgot to do their research...
Have a look at his website, you duffer. 
|
|
|
|
|
As a matter of fact, I did. That's why I made the comment. Hard to tell if he's being tounge in cheek or just seriously out of touch. For going to Europe's largest school, I would have hoped their English department was doing a better job.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
Okay, fair point. Any chance I could have that "duffer" back - think I may need to assume that role for a little while.
Personally, I was left with the impression that it was a rather cheeky and informal tone on the site, though as you mention the spelling and grammar don't exactly put him in the queue for Pulitzer Prize winners. (not that I'll ever get one mind you)
|
|
|
|
|
Duffer? And I don't play golf at all. I infer that to you duffer probably means more like what dufus does to me. It did sound "cheeky" (and not the big butt meaning from this side of the pond) to me but I thought my reply could be taken either way depending on his meaning.
They do have a geek category for Pulitzer Prizes.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
You should handle WM_LBUTTONDOWN event for your client application.
After that you create a window using CreateWindow or use CMyDialog for logon
HTH
|
|
|
|
|
Is there any code floating around anywhere or a tutorial or someone who know how to create it anywhere just to help with this.
I am using Win32.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: Is there any code floating around anywhere or a tutorial or someone who know how to create it anywhere just to help with this.
Yes, there are lots; in books, here on CodeProject, on nearly every site in the world that offers technical support/resources. The trouble is you are too lazy to use them. The code you posted above is exactly the same (apart from the text strings) as the ones you posted previously, demonstrating that in the last few months you have not spent any time trying to learn any more about Windows programming.
I even went as far as providing you with a fully funtional basic Windows app a couple of months ago; obviously even that was too much for you to try and learn from.
|
|
|
|
|
Richard maybe you shouldn't be that cheeky as I don't think you know how powerful and well respectedand I am. I have close contacts with the BBC and serveral companies who are interested in sponsorship and advertising opportunities within my 3D virtaul world.
As the Chief Executive I have capabilities to learn very quickly and I am a very enthaustic individual who always puts 100% into my work, I know how to manage my employees at the company, I pay them a lot of money but I have seen a downside when they are programming they seem to have a hearing difficulty about what I require and it's really annoys me and the Board of Directors, so I've decided to take matters into my own hands.
As the saying goes "Treat others, how you would like to be treated"
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: I don't think you know how powerful and well respectedand I am. I have close contacts with the BBC and serveral companies who are interested in sponsorship and advertising opportunities within my 3D virtaul world.
This is the virtual world you created without being able to construct a simple Windows dialog.
MrMcIntyre wrote: I am a very enthaustic individual who always puts 100% into my work
And yet you cannot make the effort to learn Windows programming, even when provided with a full source code sample to help you.
MrMcIntyre wrote: I know how to manage my employees at the company, I pay them a lot of money
Your job advert here[^] says you won't pay until you have sold your product; hardly treating employees well.
MrMcIntyre wrote: so I've decided to take matters into my own hands.
Or rather you have decided to try and get CP members to do all the work for you, again.
|
|
|
|
|
Richard I want to clear a few things up for you as you are finding it extreemly difficult to understand this. I have over 125 employees at my company stretching over 30 countries and speaking different languages and payed around £200 - £300 per month you do not know how hard it is to communicate clearly to foreign people.
I don't mean to be rude to you but you can't tell someone what you think without actually investigating who they are first. Yes, it's true I am not very good at programming and that's exactly why I have employees so I decided to turn to CodeProject as it has great people for help and eventually I can help out my employees with things shortly, but quite frankly I haven't seen anyone who has attempted to help me.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: I have over 125 employees at my company stretching over 30 countries and speaking different languages and payed around £200 - £300 per month you do not know how hard it is to communicate clearly to foreign people.
That's nonsense and you know it. If you had even one employee with some programming knowldege you would not be posting the same basic question over and over on this site. Your previous questions are the evidence that demonstrates this.
MrMcIntyre wrote: you can't tell someone what you think without actually investigating who they are first.
I believe I already did. And I have investigated who you are.
MrMcIntyre wrote: so I decided to turn to CodeProject as it has great people for help and eventually I can help out my employees with things shortly, but quite frankly I haven't seen anyone who has attempted to help me.
I (and others here) have attempted to help you on a number of occasions in the past. We have provided links to articles which contain ready made solutions to many of your requests. We have provided links to tutorials, online documents, titles of books or author names to help you learn. As stated earlier, I have even posted a working example of a simple windows program, complete with source code, on the internet for you to use and change as much as you wish.
And yet you seem incapable (lazy or stupid, I can't figure out which) of using any of these tools to help yourself, you just come back here and post the same questions again.
|
|
|
|
|
Look, it doesn't matter what you think I have a lot of money and you can't tell me if I have or haven't got because I do have a lot of money and thats' final and I have more money than you get in a year. (if employeed, probably not, sitting at a computer programming, boring!). Get a job and earn money or setup a business and stop sitting like a dead monkey all day calling people names with is uncalled for.
Never call me lazy or most importantly stupid as I am more intelligent in my Mathematics, English and Reading Skills so never again do you EVER DARE and call me stupid. NEVER!!!.
I ask for help, I put code and you never seem to help but this is a place for help so why don't I get any help just constant abuse from you now that's not nice.
"TREAT OTHERS HOW YOU WOULD LIKE TO BE TREATED!"
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: Never call me lazy or most importantly stupid as I am more intelligent in my Mathematics, English and Reading Skills so never again do you EVER DARE and call me stupid. NEVER!!!.
More intelligent than what/who?
Your social skills, emotional intelligence, musical ability.
Or do you actually mean somebody else you've had the privilege of conversing with.
For even the grammar in that above piece of 'literature' I've quoted would make a newspaper editor or or
Too bad having money doesn't require brains or manners or social skills. Sometimes luck is enough, other times a departed relative can alter the financial standing of a person.
MrMcIntyre wrote: "TREAT OTHERS HOW YOU WOULD LIKE TO BE TREATED!"
Precisely the reason I speculate that nobody has taken to you with a good blowtorch and a serious round of tongue lashings. We all have bad days...
I assume you've had one of them today?
|
|
|
|
|
It's not a window I am trying to create, I've done the window already with the help from you a while back I am now on the login window dialog.
Andrew McIntyre
|
|
|
|