|
chen1000 wrote: if I know how to do it I will not ask for help
indeed...
chen1000 wrote: if you know how to work it why not provide some methods on it
assignments are made to test you a your knowledge... so if you don't know the principle, it's your problem, not ours.
now, you can always ask the forum for a particuliar question on a specific point, but don't give the entiere subject you were assigned to, or you will always get flamed !!
chen1000 wrote: perhaps you also don't know it
i help programmers in help here only because i want it as a pleasure... i'm not forced, not payed, so i'm not obliged to.
if you want an answer, read Chris Maunder's message here[^]...
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
-- modified at 6:42 Wednesday 7th December, 2005
|
|
|
|
|
ok, let's start again.
there's no question, so i don't know exactly what you're looking for...
is the analysis already done ?
does it have to be object oriented (i suggest to though) ?
does you project have to be built upon a DataBase ?
what are E1~E9 ? different situations to be played ? or only management rules ?
i'm waiting for more precisions sir.
ps: look at my profile, i'm not american
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20] | soon : [VisualCalc 3.0]
|
|
|
|
|
Hi,
Is there anybody knows how to change the row height in the function OnCustomDraw below ? Is there an easy way to change the current font that the CListCtrl uses to Bold ?
void CColoredListCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
{
*pResult = 0;
LPNMLVCUSTOMDRAW lplvcd = (LPNMLVCUSTOMDRAW)pNMHDR;
int iRow = lplvcd->nmcd.dwItemSpec;
switch(lplvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT :
{
*pResult = CDRF_NOTIFYITEMDRAW;
return;
}
// Modify item text and or background
case CDDS_ITEMPREPAINT:
{
lplvcd->clrText = RGB(0,0,200);
SelectObject (lplvcd->nmcd.hdc, m_fFont);
// If you want the sub items the same as the item,
// set *pResult to CDRF_NEWFONT
*pResult = CDRF_NOTIFYITEMDRAW;
return;
}
// Modify sub item text and/or background
case CDDS_SUBITEM | CDDS_PREPAINT | CDDS_ITEM:
{
if(iRow %2){
lplvcd->clrTextBk = m_colRow2;
*pResult = CDRF_NOTIFYITEMDRAW;
return;
}
else{
lplvcd->clrTextBk = m_colRow1;
*pResult = CDRF_NOTIFYITEMDRAW;
return;
}
*pResult = CDRF_DODEFAULT;
return;
}
}
Regards,
sdancer
|
|
|
|
|
Hi All
Which would be the best way to pass a CString to a TCHAR myVar[]
for example
what i want to do is something like
CString myStr = "hello";
TCHAR myVar[] = myStr;
thanks
si
|
|
|
|
|
si_69 wrote: Which would be the best way to pass a CString to a TCHAR myVar[]
Variables do not get passed to each other.
You can, in some cases, convert from one type to another.
CString myStr = _T("hello");
TCHAR *myVar = (LPTSTR) (LPCTSTR) myStr;
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
you meant using _tcscpy() , strcpy() or strncpy() , not using operator=() , didn't you ?
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20]
|
|
|
|
|
non, the original poster just wanted to cast a CString to something alse, not make a copy ...
or at least that's what it looked to me.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
toxcct wrote: you meant using _tcscpy(), strcpy() or strncpy(), not using operator=(), didn't you ?
No, not at all.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
|
|
si_69 wrote: Which would be the best way to pass a CString to a TCHAR myVar[]
try lstrcpy function
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I'm trying to read a Dump file from a client, and I'm not sure how to do this with WinDbg.
1. If I'm not certain about the client's OS, can I download multiple Windows OS symbols to the same path, or do I need to download the symbols to seperate path for each OS version?
2. If I have the symbols for an OS with service packs installed, can I still use these symbols with a dump file from an OS that doesn't have any service packs installed?
3. Is there any clean way to examine the dump file to determine which OS it's for, and what version or service pack it has with it?
4. If I wanted to use VC++ 7.1 to examine the dump file, exactly how would I do that?
I'm currently waiting for the client to send some msinfo32 output that I believe will tell me about the OS and service pack, but I was wondering if there are other options for getting this information via the dump file.
Top ten member of C++ Expert Exchange.
http://www.experts-exchange.com/Cplusplus
|
|
|
|
|
How do I change the color of the edit portion of a CDateTimeCtrl
|
|
|
|
|
Have you looked into the WM_CTLCOLOR message, or the OnCtlColor() handler?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Yes I have tried both, but they dont appear to work with CDateTimeCtrl's
Thank You
|
|
|
|
|
What about overriding PreSubclassWindow() in your derived class and changing the color there?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
hi,
I have created a dialog using Cproperty sheet but facing difficulty while setting the focus on Help button from Cancel button and vise-versa using arrow keys, though using tab it works properly. Also, its not using Active Control X.
|
|
|
|
|
You need to look into the WS_GROUP style.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi there!
I'm quite new with C++, using other languages but now i needed to write an Printer USB routine in C++, and i need some help!
It's like this
BytesToWrite = sprintf( (char *) szBuffer, "\033F\r\033B 512 600 4 1 2 3 150 1 999999999\r\033I\r");
WriteFile( hDevice, szBuffer, BytesToWrite, &cbWritten, Null);
etc, etc, etc
I need to replace the 999999999 with the first command line argument (paramstr(1) Can someone help me with this!?
What this function does, is to send ESC commando codes to an Zebra Eltron printer.. Print barcode.. 999999999 is the barcode, but i need be able to call this little application from another application then with the barcode as command line argument.!
Best regards
Andreas
|
|
|
|
|
andreas_sweden wrote: I need to replace the 999999999 with the first command line argument (paramstr(1) Can someone help me with this!?
Does your program have a main() function?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi, yes!
Srry, didn't mention.. but here it comes!
int main(int argc, char* argv[])
{
TCHAR DeviceName[1024];
HANDLE hDevice = NULL;
DWORD cbWritten;
DWORD cbRead;
BYTE szBuffer[1024];
DWORD BytesToWrite;
StringType SlumpNum;
// This function enumerates the printer class devices and detects the appropriate
// device
CCmdLine cmdLine;
EnumeratePrinter(( LPGUID) &GUID_CLASS_ZEBRA_USB,
DeviceName,
PRINTERNAME);
hDevice = CreateFile(DeviceName,
GENERIC_READ | GENERIC_WRITE,
0,
NULL,
OPEN_EXISTING,
0,
NULL);
// Read Ribbon
BytesToWrite = sprintf( (char *)szBuffer,
"\033!RIBBON\r");
WriteFile( hDevice,
szBuffer,
BytesToWrite,
&cbWritten,
NULL);
// To read you need to send "\033E 2\r"
BytesToWrite = sprintf( (char *)szBuffer,
"\033E 2\r");
WriteFile( hDevice,
szBuffer,
BytesToWrite,
&cbWritten,
NULL);
ReadFile( hDevice,
szBuffer,
1024,
&cbRead,
NULL );
// End of ribbon read
// Start Encode Data
// Fill in the data in firmware buffer
// First track ZEBRA1 command: \033&B 1 ZEBRA1\r
// Second track Age command: \033&B 2 28\r
// Third track YOB command: \033&B 3 1975\r
// Encode all three track
// command: \033E*\r
BytesToWrite = sprintf( (char *)szBuffer,
"\033F\r\033B 512 600 4 1 2 3 150 1 999999999999\r\033I\r");
WriteFile( hDevice,
szBuffer,
BytesToWrite,
&cbWritten,
NULL);
And you can see the 999999999999 that i would like to insert the first command line parameter instead...
Regards
Andreas
|
|
|
|
|
andreas_sweden wrote: int main(int argc, char* argv[])
Command-line arguments are supplied in the argv (argument vector) variable.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi again, thankyour for answering so quickly.
May i ask you to be a little more specefic.. since i no 1% of c++ . well, not really but almost..
I havn't the got the clue how i must do to get that inserted at that position where i needed it..
If you had time to help my it would be very kind!
Thnakyou !
/Andreas
|
|
|
|
|
andreas_sweden wrote: since i no 1% of c++
Actually it has nothing to do with C++. See here and here for more.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Okey, so one step further .. guess i used the argv correct
same as ParamStr in Delphi and so on.
Ok, now i'm having trouble to inserting that string into the function.
Like this, wich doesn't work:
Argument = argv[1];
BytesToWrite = sprintf( (char *)szBuffer,
"\033F\r\033B 512 600 4 1 2 3 150 1 "&Argument&"\r\033I\r");
Thankyou!
/Andreas
|
|
|
|
|