Click here to Skip to main content
15,914,795 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: CDateTimeCtrl Pin
David Crow6-Dec-05 3:56
David Crow6-Dec-05 3:56 
AnswerRe: CDateTimeCtrl Pin
JohnZed6-Dec-05 3:58
JohnZed6-Dec-05 3:58 
QuestionRe: CDateTimeCtrl Pin
David Crow7-Dec-05 9:47
David Crow7-Dec-05 9:47 
Questionregarding the focus on help button through arrow key Pin
simhadri6-Dec-05 3:02
simhadri6-Dec-05 3:02 
AnswerRe: regarding the focus on help button through arrow key Pin
David Crow6-Dec-05 3:57
David Crow6-Dec-05 3:57 
QuestionNeed to get Command line argument and add to this simple function Pin
andreas_sweden6-Dec-05 2:55
andreas_sweden6-Dec-05 2:55 
QuestionRe: Need to get Command line argument and add to this simple function Pin
David Crow6-Dec-05 3:59
David Crow6-Dec-05 3:59 
AnswerRe: Need to get Command line argument and add to this simple function Pin
andreas_sweden6-Dec-05 4:09
andreas_sweden6-Dec-05 4:09 
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

GeneralRe: Need to get Command line argument and add to this simple function Pin
David Crow6-Dec-05 4:11
David Crow6-Dec-05 4:11 
GeneralRe: Need to get Command line argument and add to this simple function Pin
andreas_sweden6-Dec-05 4:16
andreas_sweden6-Dec-05 4:16 
GeneralRe: Need to get Command line argument and add to this simple function Pin
David Crow6-Dec-05 4:43
David Crow6-Dec-05 4:43 
GeneralRe: Need to get Command line argument and add to this simple function Pin
andreas_sweden6-Dec-05 4:49
andreas_sweden6-Dec-05 4:49 
GeneralRe: Need to get Command line argument and add to this simple function Pin
David Crow6-Dec-05 4:57
David Crow6-Dec-05 4:57 
GeneralRe: Need to get Command line argument and add to this simple function Pin
andreas_sweden6-Dec-05 6:07
andreas_sweden6-Dec-05 6:07 
QuestionOverloading << operator? Pin
Cristoff6-Dec-05 2:03
Cristoff6-Dec-05 2:03 
AnswerRe: Overloading << operator? Pin
toxcct6-Dec-05 2:37
toxcct6-Dec-05 2:37 
GeneralRe: Overloading << operator? Pin
Cristoff6-Dec-05 2:53
Cristoff6-Dec-05 2:53 
GeneralRe: Overloading << operator? Pin
toxcct6-Dec-05 2:55
toxcct6-Dec-05 2:55 
GeneralRe: Overloading << operator? Pin
Cristoff6-Dec-05 6:08
Cristoff6-Dec-05 6:08 
AnswerRe: Overloading << operator? Pin
toxcct6-Dec-05 6:13
toxcct6-Dec-05 6:13 
GeneralRe: Overloading << operator? Pin
Cristoff6-Dec-05 11:16
Cristoff6-Dec-05 11:16 
GeneralRe: Overloading << operator? Pin
S. Senthil Kumar6-Dec-05 4:06
S. Senthil Kumar6-Dec-05 4:06 
Question[Message Deleted] Pin
Eytukan6-Dec-05 4:46
Eytukan6-Dec-05 4:46 
AnswerRe: Overloading << operator? Pin
toxcct6-Dec-05 5:43
toxcct6-Dec-05 5:43 
AnswerRe: Overloading << operator?Correct way Pin
Amol Ravatale6-Dec-05 20:15
Amol Ravatale6-Dec-05 20:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.