|
I'm sorry, but where in that page says something about. wininet... I can't seem to find it.
Kamui
|
|
|
|
|
Linking error are arises due to the fact that linker can't find the actual defination of function at linking time.
as Internet...(...) related Api are defined in WinInet.lib, so thats why i ask you to include that in your project.
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Alok, that did it!!!!! Sorry I didn't reply sooner but I live in Japan and with the time diference I had to go.
But Thank you very much.
Kamui
|
|
|
|
|
|
for a point of sale software, we uses the dot matrix printer for printing, so we need the printer commands for skipping, rollbacking paper etc....any idea ?
thanks in advance
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
These commands almost ALWAYS absolutely vary by printer (or at least by manufacturer), and involve sending escape sequences to the printer to tell it to do such things.
You can communicate with printer in RAW data format mode, but you will still need to write an interface layer to send it the proper escape sequences. There is no special 'built in' windows commands I am ever aware of to tell printer to do such things. I think there is an article here on CodePrject about writing to printer in the RAW mode.
|
|
|
|
|
thanks,
i am using the EPSON printer ( atleast they have the same escape sequences ? )
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
Could someone help to explain what the two line statements below mean? Thanks,
int (*read_byte)(struct pci_controller*, pci_dev_t, int where, u8 *);
void (*fixup_irq)(struct pci_controller *, pci_dev_t);
|
|
|
|
|
|
Thanks,
WEll, I still cannot understand whys
Question 1. Why use "viod" here, this is not a "method" definition?
Question 2. Why use cast method here like "(*fixup_irq)"?
(I got these codes from linux.)
void (*fixup_irq)(struct pci_controller *, pci_dev_t);
|
|
|
|
|
looks like linux kernel code
Don't try it, just do it!
|
|
|
|
|
Hello!
I want to create an own ActiveX control whitch comprised the functionallity of the ShockwaveFlash Control. If I use the Shockwave Control in a normal *.exe application I have no problem to use the functionallity but if I want to test my own ActiveX in the Testcontainer it doesn´t run...
My problem is I think that I didn´t realy now were and how I have to initialize the Shockwave Control in an ActiveX... The rest of the control runs very well....
Is this kind of ActiveX creation realy possible???
Thank´s for every tip!
Andreas
|
|
|
|
|
hi friends,
I have one process running. I wanted to know it's parent.Is there any function available?
|
|
|
|
|
Hi,
I'm not sure what u mean. but the following may help.
FindWindow() - API.
thanks,
Zxczc
|
|
|
|
|
Hi all
Imconfused by a daft problem..
Our apps are written using MFC (CStrings etc) but we are using a library which uses ATL (strings). I understand string is a basic string but cant get my head around this simple problem...
I cannot assign a string longer than 15 chars...
To show an example..
string s1;
CString cs1;
cs1 = m_sRootURL.Left(10);
s1 = cs1.GetString(); // ok
cs1 = m_sRootURL.Left(12);
s1 = cs1.GetString(); // ok
cs1 = m_sRootURL.Left(14);
s1 = cs1.GetString(); // ok
cs1 = m_sRootURL.Left(16);
s1 = cs1.GetString(); // not ok, s1 = "5rf"
All help etc.. etc...
|
|
|
|
|
|
WTL header file. ?? please tell me more...
|
|
|
|
|
Ok, sorry, found it and investigating...
Ta everso..
mark
|
|
|
|
|
|
mlatimer wrote:
cs1 = m_sRootURL.Left(10);
s1 = cs1.GetString(); // ok
At this point, what is the fourth character in s1 ?
mlatimer wrote:
cs1 = m_sRootURL.Left(16);
s1 = cs1.GetString(); // not ok, s1 = "5rf"
At this point, what is the 14th and 15th characters in m_sRootURL ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Anyone can help will be greatly appreciated.
My program is having a few list box for the user to type in their details.
I will need to convert to html and use MSword to view the report on what they have keyed in and allow them to print out.
I'm using wsprintf command for each textbox and it did generate a html file. however, the multiline of all text boxes becomes one whole line shown in the html report. From the source of the html file, it becomes a blank space. If I manually add a , the new line will be shown in the html file.
How to solve this problem?
|
|
|
|
|
|
Hello,
I am working with serial communication for interacting with a hardware device i.e ControlPanel. The Control Panel has many buttons on it. I need to track which key is pressed or released and give appropriate messages to the application. On key press, I started a thread to track the key down and repeat states of the key. Then when the next key is down, I am ending the previously started thread and starting a new thread to track the state of this new button. This is working fine for me. But the overhead associated with constantly spawning and ending threads can be quite significant for a real time application.
The reason for using threads is that tracking of key state process should not hinder the user interface.
Can anyone please suggest any alternative to using threads in the above scenario.
Below is my thread function code for your reference:
unsigned WINAPI CControlPanel::KeyMsgThread(void *i_param)
{
CControlPanel *cp = (CControlPanel*)i_param;
//key hit
//
string Key;
Key = cp->m_KeyValue;
int repeat_count = 1;
//Create an event object for that thread
//
cp->m_hStopEvent = CreateEvent(NULL, TRUE, TRUE, NULL);
if(cp->m_hStopEvent)
{
ResetEvent(cp->m_hStopEvent);
}
else
{
CloseHandle(cp->m_hStopEvent);
cp->m_hStopEvent = NULL;
cp->m_IsActive = false;
return 0; //exit the loop
}
//Check for delay time first
//
if(WaitForSingleObject(cp->m_hStopEvent, cp->m_Delay) == WAIT_OBJECT_0)
{
CloseHandle(cp->m_hStopEvent);
cp->m_hStopEvent = NULL;
cp->m_IsActive = false;
return 0; //exit the loop
}
//Stop processing data
//
if(cp->m_bKeyMsgThreadStart == false)
{
CloseHandle(cp->m_hStopEvent);
cp->m_hStopEvent = NULL;
cp->m_IsActive = false;
return 0;
}
//If the key is still pressed down after the delay time,
//post additional key down message to the application thread
//
cp->PostKeyStateMessage(Key,"Repeat",repeat_count);
repeat_count++;
//Check for repate rate after the delay
//
while (cp->m_bKeyMsgThreadStart )
{
//Check for repeat rate
//
if(WaitForSingleObject(cp->m_hStopEvent, cp->m_Repeat) == WAIT_OBJECT_0)
{
CloseHandle(cp->m_hStopEvent);
cp->m_IsActive = false;
cp->m_hStopEvent = NULL;
break; //exit the loop
}
//Stop processing data
//
if(cp->m_bKeyMsgThreadStart == false)
{
CloseHandle(cp->m_hStopEvent);
cp->m_IsActive = false;
cp->m_hStopEvent = NULL;
break;
}
//If the key is still pressed down after the repeat time,
//post additional key down message to the application thread
//
cp->PostKeyStateMessage(Key,"Repeat",repeat_count);
repeat_count++;
}
CloseHandle(cp->m_hStopEvent);
cp->m_IsActive = false;
cp->m_hStopEvent = NULL;
return 0;
}//KeyMsgThread
To start the thread:
//Start thread to track its state(up/down) change
unsigned thread_id;
m_hKeyMsgThread = (HANDLE)_beginthreadex(NULL, 0, CControlPanel::KeyMsgThread, (LPVOID)this, 0, &thread_id);
To end the thread:
/Post Key Up State message to application
PostKeyStateMessage(m_KeyValue,"Up");
//End the thread that keeps track of repeat and delay msgs
if(m_KeyValue.compare(m_LastKeyDown) == 0)
{
SetEvent(m_hStopEvent);
}
Your expert guidance will be of great help to me!
Thanks
Madhavi.
|
|
|
|
|
Ignore other message
I wrote a program in VC++6 to load bitmaps and it works correctly when I place the same code into VC++7 it compiles but crashes when I try to load a picture
The code in question is it bombs on the verify command
if(m_hMyBmp != NULL )
DeleteObject(m_hMyBmp);
m_hMyBmp = (HBITMAP) LoadImage(AfxGetInstanceHandle(), filename, IMAGE_BITMAP ,0,0, LR_LOADFROMFILE);
m_DisPicture.GetClientRect( &rectStaticClient );
rectStaticClient.NormalizeRect();
//rectStaticClient is a constant so Stretchblt wont accept it
MyBoxWidth = rectStaticClient.Width();
MyBoxHeight = rectStaticClient.Height();
// Convert to screen coordinates using static as base, then to DIALOG (instead of static) client coords
// using dialog as base
m_DisPicture.ClientToScreen( &rectStaticClient );
ScreenToClient( &rectStaticClient);
GetObject( m_hMyBmp , sizeof(BITMAP), &m_bmpBitmap );
VERIFY(m_hMyBmp2 = (HBITMAP)SelectObject(dcMem, m_hMyBmp));
I get an assertion error on the last line above
|
|
|
|
|
I want to handle WM_MOUSEMOVE event of the toolbar. how to do it?
i created one class for that as below.
class CAnnotationBar : public CToolBarCtrl
{
// Construction
public:
CAnnotationBar();
// Attributes
public:
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAnnotationBar)
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CAnnotationBar();
// Generated message map functions
protected:
//{{AFX_MSG(CAnnotationBar)
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
and i created a instance variable for this class in my ActiveX control class.
i Added the following code in OnCreate.
CRect rc(0,0,600,50);
m_AnnotationBar.Create(WS_CHILD|WS_VISIBLE|CBRS_TOP|CCS_TOP ,rc,this,IDR_TOOLBAR);
m_AnnotationBar.MoveWindow(0,0,600,50);
m_AnnotationBar.ShowWindow(SW_SHOW);
|
|
|
|