|
Because that is the way Microsoft designed it; maybe you should ask them. In many cases the next drawing command will start from the x,y point of the previous one, so I assume this is for efficiency.
|
|
|
|
|
thanks,
you said ask microsoft. do you mean I should post this to MSDN forum? or just mail to someone?
|
|
|
|
|
fitatc wrote: you said ask microsoft. do you mean I should post this to MSDN forum? or just mail to someone?
Try one of the Microsoft forums. How important is it to you to know?
|
|
|
|
|
Thank you very much.
Richard MacCutchan wrote: Try one of the Microsoft forums. How important is it to you to know?
To my work, not a bit.
To mySelf, I am kind of serious man,
|
|
|
|
|
anybody has clearly defination of De Boor method ??
thank very much !!
|
|
|
|
|
You can check out the book by Carl DeBoor: "A Practical Guide to Splines". The programs in that book are in FORTRAN but can be easily rewritten in C++. I read that book in 1986 and learned a lot. Hope that can help you, too.
|
|
|
|
|
We need more coders/designers on our team to develop an AI like none other. The AI, Codenamed Project Vital, will change the world and could turn over enormous profits, but only if it is successful. We could use any help we can get, from little experience to advanced experience. If this project is a success, and even if it isn't, it will be a great learning experience, as well as something, or something else, to add to your programming profile.
Thank you for considering Project Vital,
Gabe Parmley, CEO of Parmley Interactive
gabeparmley@gmail.com
|
|
|
|
|
Shouldn't this be in the 'Jobs' forum?
|
|
|
|
|
but its not a paying job, atleast not yet, its a C++ project and anyone can help
|
|
|
|
|
Your websites aren't very informative. Just a mass of broken links and dead pages.
You measure democracy by the freedom it gives its dissidents, not the freedom it gives its assimilated conformists.
|
|
|
|
|
yes, we are working on getting them back online, sorry for the inconvenience.
|
|
|
|
|
This is gonna sound like a really stupid question, but I'm new to C++ (been using C#).
If I have a pointer to a char, how can I display the char in a messagebox? (I know to use MessageBoxA but I'm not sure how to make the char into something the MessageBoxA function accepts)
|
|
|
|
|
Omnicoder wrote: If I have a pointer to a char...
Which looks like:
char c;
char *p = &c; Omnicoder wrote: how can I display the char in a messagebox?
You'll need a pointer to an "array" of characters, like:
char *p = "Hello World";
MessageBox(p); MessageBox() expects a pointer to a null-terminated string which is different than a pointer to a character.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
In addition to David's answer, I want to say that you should never call a specific version of a function like MessageBox (so, calling MEssageBoxA or MessageBoxW is wrong). You should always stick to the generic version (without the A or W at the end). Character encoding causes in general a lot of troubles to new programmers, so I strongly suggest this excellent article[^] in order to better understand the concepts. Even if your code compiles now, reading this article can save you a LOT of time for the future (and probably a lot of problems too ).
|
|
|
|
|
i create a popup dialog with mfc, and the dialog entered DoModal function, how can i close the dialog by pressing right-up close button and keep main-software keep going
|
|
|
|
|
Your main application should not stop running if you close a pop-up dialog box that it created. Unless there is some kind of crash happening on the pop-up dialog box clean up.
Suhredayan
|
|
|
|
|
my application only have a dialog with some other win32 windows
|
|
|
|
|
Can you post the code part that is creating the pop up dialog. Just to see how you are creating this pop-up dialog within your application.
Suhredayan
|
|
|
|
|
OK
My CApp:
InitInstance()
{
...
static CDlg dlg;
m_pMainWnd = &dlg;
//int nResponse = dlg.DoModal();
//if (nResponse == IDOK)
// ...
//
dlg.Init();
return TRUE;
}
i create win32 window in dlg.Init() and its CallBackWnd code segment :
case WM_COMMAND:
{
if (IDD_CONTROL_PANEL == wParam)
{
((CDlg*)AfxGetApp()->GetMainWnd())->DoModal();
}
}
|
|
|
|
|
This looks to me like a Dialog application, where the dialog is the main window. So when the dialog closes that is the end of the application. If you want a normal window application that uses dialogs then create a proper framewindow as the main window. If you are using Visual Studio then there are standard framewindow templates to build from.
|
|
|
|
|
Handle the WM_CLOSE message and in the handler, hide the dialog instead of calling DestroyWindow .
This way the dialog is not shown anymore but the program is running.
|
|
|
|
|
i had tried, but it happened exception-error
|
|
|
|
|
Since you said you called DoModal I assume you created a modal dialog box. When this dialog box is closed by clicking the top-right corner's close button, your application should still be running. You don't have to do anything to "keep it running".
Clicking the close button should cause the DoModal to return the value IDCANCEL (and the dialog box being closed) unless you override the handler and do something else.
|
|
|
|
|
maybe i make some wrong, if i closed the dialog box, it'll happen errors
|
|
|
|
|
Try to overwirte the virtual function OnCancel(), and call EndDialog(n) in that.
Or just call EndDialog(n) in OnClose() function.
|
|
|
|