I don't do much MFC, but ...
see MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cwnd.3a3a.setwindowtext.asp
There example starts with:
// set the text in IDC_MYEDIT
CWnd* pWnd = GetDlgItem(IDC_MYEDIT);
pWnd->SetWindowText(_T("Hockey is best!"));
...
Q1. A classic way to process a switch statement is something like:
...
cout << your choices are: ... [whatever] << endl;
while ((choice = cin.get()) != EOF)
{
switch (choice)
{
case 'A': //do something when a is found
break;
case 22:
case 73: // do...
Hey thanks Globos,
Ya, I will ponder your embellishments some more and include those too. Yes, I have already overloaded several of the template functions. So far, I have made templates for memcpy, memcmp, memicmp, and memset. That's probably all I will need.
I started programming in 1968...
Not to worry Globos, I found the STAR thing at thebottom of your first post.
You will never know [maybe] how helpful you have been.
I'm gonna vote for you for President!
Thanks again,
Norm
Hi Globos,
I got this working right for me now. Here is the source:
//*** src: boo.cpp
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <typeinfo>
using namespace std;
// ---------------- *** A generic memcpy:
template<class G>
G * gen_memcpy (G * dst, char * src)
{...
Hi Globos,
The first test that I did was to comment out the s1.c[4]='0'; statement.
The program is reading from a flat file directly into a struct that matches the data EXACTLY. There is no notion of null termination. The program only moves n number of characters from input structs to...
OK ...
I notice that you null terminated s1.c I don't have that luxary. I need the generic memcpy to be able to determine the length by somehow getting THE DECALRED LENGTH of s1.c which is 5 in this example.
Hey. Thanks Globos,
Geeee, I never would have thought of that!!
I ran your sample. I ran just fine. Now I will massage it, [lol], to wotrk in my app.
Thanks, thanks, thanks again,
Norm
Hi C++ Pros,
I have a lecacy C program that has been converted to C++, but is really still C. The program reads column delimited data into structures. The structures are designed to receive the data EXACTLY as mapped for each data element. To read each data element from the structures...
Hi again,
In order to show the table as the results of the SQLcmd string, just pass the string like:
...
<% showTable SQLcmd %>
Note that the showTable subroutine will accept any reasonable SQL command and try to build a HTML table by using the result set. Pretty nifty huh!!
As for the SQL...
Hi,
Does this help?
Your SQL might look something like:
select Organization Name, Address, count(Category)
from Organization O , Rooms R
where O.Org_Id = R.Organization_Idi
and R.Availability = 'yes'
group by R.Category
Then you can pass the select statement to a subroutine that...
Hi Dri...,
Go to www.google.com and search on "JavaScript Tutorial"
Also, Danny Goodman is the guru: www.dannyg.com
Also www.gamelan.com
...
Good luck,
Norm
Yup, that worked.
I was trying to be lazy by not specifying the table column names, but that doesn't work in ACCESS when using autonumber feature. I tried to keep my original post to a braindead example. The real ASP insert statement looks more like:
SQLcmd = " INSERT INTO RESERVATION...
HI,
I have NOT been able to get "autonumber" to work with the ACCESS 2000 database when using SQL when the table is defined as:
CONF_ID autonumber (Indexed, No Duplicates)
FLD_2 text
FLD_3 text
INSERT into JUNKTABLE values ('Foo1', 'Foo2');
ERR: Number of query values and...
Typically, a C++ programmer will place assert statements in programs to test for certain conditions.
If the test returns True,
execution continues uninterupted.
else if the test returns False,
info about the error is displayed and terminate is called.
Before deployment, the programmer...
namespace is a fairly new addition to C++ to solve to age old problem of name/scope conflict resolution.
C++ How to Program by Deitel & Deitel 3rd Ed. Ch 21 talks about this.
Also goto google.com and enter "C++ namespace" to learn more than you want to know about it.
Ain't life...
It's called a variadic argument list, which means "any number or typeof arguments." ... from Bruce Eckel's book "C++ Inside and Out" (out of print now). It might still be in his newer book "Thinking in C++".
http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.