|
I want to show the .PDF file on every help button click.
So I have to load the .PDF file when every user clicks the help button but at the same time I have to show the related topic on which help is required.
So how should i implement this?
Please tell that how I am going to search the concern text of topic in the .PDF file or the help file.
|
|
|
|
|
deadlyabbas wrote: So I have to load the .PDF file when every user clicks the help button but at the same time I have to show the related topic on which help is required.
Probably you need a PDF library in order to do the above task (try googling for...).
As an alternative, you may launch a (possibly free) PDF reader but then you'vew the issue of showing the proper page (you may split the help in more files or pass the page number as command line argument to the reader , if the latter allows it).
As another alternative you may instead consider HTML help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
i am using sample code of Rs232 communication in VC++ using below link.
http://www.orgler.it/visualc01.htm#
I have an application where PC com port is connected to RS232 device. On key press(trigger) from the Device, the software should receive the data from the device.
Using this above example, i need to press Rx Bytes button to read the data. However, my application cannot provide any button on the software.
kindly suggest on how to resolve above problem.
|
|
|
|
|
I don't really get your question Let me rephrase your question to see if I correctly understood it: you have a device connected to your PC through a serial port connection. This device can send data to the PC when you press a button on it. Your problem is that you don't want to put a button in your software to tell the software to read data ? Am I right ?
If that's your problem, then one solution would be to use a thread in which you call ReadFile with an infinite timeout (the call will block until you receive some data).
|
|
|
|
|
If you have adequtley sized buffers connected to the serial ports ReadFile then you could also use OnTimer() function in your MFC. In the OnTimer() you can read the serial port and the directly update controls in the dialog in the way you want. I have serial port control stuff that works this way fine.
You could use this as a model :
#define IDT_UPDATE 1000
#define UPDATE_INTERVAL 500
BOOL CDRMEXECDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetTimer(IDT_UPDATE, UPDATE_INTERVAL, NULL) ;
return TRUE;
}
void CDRMEXECDlg::OnTimer(UINT nIDEvent)
{
switch (nIDEvent) {
case IDT_UPDATE :
KillTimer(nIDEvent) ;
UpdateData(FALSE) ;
SetTimer(IDT_UPDATE, UPDATE_INTERVAL, NULL) ;
break ;
default :
CDialog::OnTimer(nIDEvent);
}
}
|
|
|
|
|
Ya your understanding is correct. How to use use thread for RS232?
|
|
|
|
|
Read this essay: http://www.flounder.com/serial.htm[^]
It shows that serial programming is not trivial, explains mnay of the mistakes you can make, and gives good sample code.
Good luck.
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: It shows that serial programming is not trivial, explains mnay of the mistakes you can make, and gives good sample code.
I would like to have a beer too, sir...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
See what happens when you don't read an article on serial programming? You get transmission transcription errors.
As for Beer? Real men use Scocth Whisky on their cereal!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Iain Clarke, Warrior Programmer wrote: Real men use Scocth Whisky on their cereal!
I see...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
This is why I think intellisense is so good!
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Klingon developers need intellisense like a fish needs a cheeseburger (or like "The Edge needs a handycam").
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Klingon developers
for (int nKaplah = 0; nKaplah < AGoodDayToDie (); nKaplah++)
{
ShoutUnintelligibly (nKaplah);
}
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
Hi Friends,
I have one problem i m creating MDB(access databse) file from text file.i get field name and field value sequentially.But when mdb file is generated,it's sequence is different.So how to solve this problem.I want MDB file data sequential.
Reply me.
Thanks in advance..
|
|
|
|
|
The SQL statement would be
SELECT * FROM <TABLENAME>
WHERE <CONDITION>
ORDER BY <FIELD>
Not sure if there is any change for access database.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
jadhavjitendrar wrote: How to use order by clause in insert into statement
AFAIK you cannot do than. However, you may add a counter field to the table and then use it to order data when querying.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have compiler design in C practicals and i have encountered a problem. This goes as :
We have to take n number of productions(string) from user.
Each production is of different size.
I want the array size for each production to be dynamic with exact size as that of the entered string. There should not be any blank elements in array as it would spoil the output.
How this can be achieved. I am someone who not so good in C.
|
|
|
|
|
You could create an array of pointers if you know the value of n at compile time.
char *strings[50];
Now as you save each string to this array allocate the size.
strings[count] = malloc(sizeof(string) + 1);
strcpy(strings[count], string);
If the value of n is not known at compile time, create a pointer to a pointer.
char **strings;
When you get the value of n, allocate the array.
*strings = malloc(sizeof(char*) * n);
Allocation for each string is the same as above.
Don't forget to increment the count variable after to store every string.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi All,
Can anybody tell me how to use command EXECUTE_OFFLINE_DIAGS and subcommand SMART_SHORT_SELFTEST_OFFLINE.How to get its result.I know its used with IOCTL code SMART_SEND_DRIVE_COMMAND.But I am unable to get the result of SMART_SHORT_SELFTEST_OFFLINE.It would be better if anybody could help me with the help of a source code.
Regards
Abinash
|
|
|
|
|
Hi
how to Drawing lines, shapes on bitmaps ??
Plz give any sample pgm
thanks
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
1 Create a memory DC( CreateCompatibleDC )
2 Select the bitmap to that dc ( memdc.SelectObject )
3 Draw your lines/shapes to that DC.
4 Unselect the bitmap from dc.
Now your original bitmap will be having the drawings...
|
|
|
|
|
Hi naveen
Thanks for your replay .. i tried
HDC pDC=::GetDC(0);
HDC TmpDC=CreateCompatibleDC(pDC);
CImage _image;
_image.Load(_T("//read.tif"));
CRect Recto(20, 20, 20, 20);
int width=_image.GetWidth();
int height=_image.GetHeight();
HDC dcBmp=CreateCompatibleDC(TmpDC);
HGDIOBJ TmpObj2 = SelectObject(dcBmp,(HGDIOBJ)_image);
BitBlt(TmpDC,0,0,width,height,dcBmp,0,0,SRCCOPY);
SelectObject(TmpDC,TmpObj2);
DeleteDC(dcBmp);
but its not showing the rectangles in image ..??
plz reply
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
You could try changing the line
SelectObject(dcBmp,(HGDIOBJ)_image);
with
SelectObject(dcBmp,(HGDIOBJ)(HBITMAP)_image);
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
its not working "superman"
its not showing any effect on images till the same image ...
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
Check are return values for errors.
There was probably some error encountered at Load or one of earlier functions called.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|