|
Perrin01 wrote: // Redraw the old element so it disappears from the view
m_pTempElement->Draw(&aDC);
That's what prevents it from leaving drawing artifacts as the cursor is moved.
R2_NOTXORPEN is non-destructive to the destination pixel when done twice over the same pixel.
Comment out the line of code there (at the "// Redraw the old element so it disappears from the
view" comment) and see what happens
Mark
-- modified at 20:17 Sunday 15th July, 2007
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Ohh, thanks, I finally understand it!
Thank you very much.
|
|
|
|
|
Hi everybody,
we have a 2-tier (unmanaged) C++ application (being compiled with VS 2005) that is connected to MS-SQL and allows the user to browse and edit order records. The data access and business layer objects are well defined (so-called “core”) and the UI layer uses them and the MFC to provide a rich user interface.
Now we want to “web enable” this application, which means that the user shall be able use the application via a web browser (IE and Firefox).
Which “technology horses” could and which should we ride?
a) enabling the core to become a “server” (IIE extension?, C++.NET and web services?, creating own server with native C++ SOAP? ...?)
b) bringing a rich UI to a web browser including performant data exchange with the server (ASP.NET with Web Forms? AJAX based Javascript UI library? ...?)
On what topics should we start reading to create a base for deciding?
I'd appreciate your input very much!
Mike.
PS: If I could expect more specific answers in another newsgroup/forum then I'd appreciate a quick hint or a FUP as well.
|
|
|
|
|
You may also want to post this on the Web Development Board[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
creating a SOAP-Server with gSOAP[^] is pretty straightforward.
For you client, you could then use a crippled WEB-Gui, which is so fancy these days, or a real client written in almost anything.
Failure is not an option - it's built right in.
|
|
|
|
|
can anyone tell me the different %f ect for the different variable types
|
|
|
|
|
Are you referring to these[^]?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
what im trying to do is on a keystroke it +1 to an int and on my dialog im just trying to print the value in a static text box
|
|
|
|
|
To format a string for an int, you could use sprintf() (or similar) with %i/%d (signed int) or
%u (unsigned int), something like:
// generic - works for unicode and non-unicode builds
int MyInt = ...;
// get string representation of MyInt
TCHAR IntString[16];
_stprintf(IntString, _T("%d"), MyInt);
// set the static control text
::SetWindowText(hwndStatic, IntString);
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Dane Grant wrote: what im trying to do is on a keystroke it +1 to an int...
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi!
i have a visual c++ prog which gives me value( dist ) which i have calculated.The value varies between 1-5.( i.e not a lot ). I want to plot this in real time. Maybe just a simple bar which changes size as this would be much more eaasier than a graph as it would need scrolling.
Any one have a code for this ??or a suggestion
Thx !
[code]
LONG FAR PASCAL
MainMessageHandler(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam)
{
HDC hDC; /* handle for the display device */
PAINTSTRUCT ps; /* holds PAINT information */
TEXTMETRIC tm; /* holds TEXT information */
static HRGN hRgn; /* Rectangle region Handles */
static int CharWidth, CharHeight;
...
...
...
y += CharHeight*2; /* Print raw data value */
sprintf (OutString,"dist = %lf ", dist);
TextOut(hDC, x, y, OutString, strlen (OutString));
}
[/code]
thanks!
|
|
|
|
|
To draw a bar you could use something like FillRect().
Can you be more specific about what part is giving you trouble?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
thanks for the reply.
To be honest, i have no idea how to start the plotting. The only thing i have now is my value which has to be plotted ... The book which i have doesnt say anything about real time plotting
|
|
|
|
|
How you plot depends on what you want to see...
You showed what looks like a window procedure - Is the value being delived at regular intervals
through a window message?
The basic steps for drawing to a window are:
Create or obtain a device context (DC)
Set up the DC for drawing - select the appropriate pen/brush/font into the DC
Do the drawing
Restore the DC's original pen/brush/font
Free the DC
You can do all this in response to the WM_PAINT message.
When the value changes, invalidate the rectangle or region that you want redrawn and call
UpdateWindow() to force a WM_PAINT to be sent immediately.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
thanks !
yes i am already having a bunch of cases. I get out about 10 values per second so its really current. I give out the value right now in WM_paint.
i shpuld read up on the deice context!
Thanks for the reply ..
|
|
|
|
|
Sam Rens wrote: i shpuld read up on the deice context!
Yes, definitely! Also check out the BeginPaint()/EndPaint() APIs for obtaining a DC when drawing
in response to WM_PAINT.
MArk
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
i cant remember how to create dialogs like buttons
thanks
|
|
|
|
|
Dane Grant wrote: cant remember how to create dialogs like buttons
A dialog that looks like a button? What are you asking?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Mark Salsbery wrote: A dialog that looks like a button?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
im sorry my question is stupid what i mean is controls
i just need an example of adding a button
|
|
|
|
|
just noticed i mave have posted in the wrong forum to this is not in mfc obviously
|
|
|
|
|
you're in the right place.
MArk
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Dane Grant wrote: my question is stupid
No such thing IMO - misworded maybe
You can add buttons to the dialog resource or
CreateWindow()/CreateWindowEx() can be used to create buttons on an already-created dialog.
For the appropriate window class to use when creating controls, see
Windows Controls[^]
Mark
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
yes my question was messed up i meant adding controls thanks for the help
|
|
|
|
|
Come on, Mark. Put your double-quote fingers up when you ask those questions:
You want to create "dialogs" that look like "buttons?"
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|