|
On the codeproject is an article is about convert pdf to text but on that article is source code of Nero maybe it will be helpful for you.
|
|
|
|
|
Hi,
Did you maybe forget to select the device before?
pObj->SelectDevice(0)
for the first device.
Greets,
toolsche
|
|
|
|
|
I follow the COM article of Michael Dunn (about context menu).
and I accomplish this job.
But I don't know that, when I want to bring this DLL file to run in another machine.
how can I do.
Please advise me for this issue.
|
|
|
|
|
use REGSVR32.EXE, it is situated in SYSTEM32 folder!
"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
Support CRY- Child Relief
|
|
|
|
|
Hi, I am currently a mechanical engineering student and have wondered into the realm of C++ programming.
I have created a list that displays lines of a code upon clicking on will perform certain functions. The list is repeated with in a pop-up dialog although the list itself is slightly different.
I am looking for a piece of code that when I select the list in the dialog will enable me to select the same one in the main programme window. I have ID numbers for all the different lines.
I am sorry if this seams a menial problem but even the slightest help would be much appreciated.
jason
|
|
|
|
|
Hi Jason,
The easiest way is to pass the address of the listbox in your main program to the dialog. When your selection changes (you could for example use the ON_CLICK event to check this) you can select the same item in the main window using SetSelectionMark: pPassedListCOntrol->SetSelectionMark(IDOfSelection);
William
|
|
|
|
|
Do you want when you select an item of a listbox then you can select same item of other listbox on main dialog?
|
|
|
|
|
I am using VC++ and want to display UNICODE String on a Dialog box
Doing it like this :
CString str="Name";
wchar_t buf[255];
strcpy(pc_char1,str);
mbstowcs(buf,pc_char1,str.GetLength()+1);
SetDlgItemTextW(hWnd,IDC_VIEW,buf);
and HWND hWnd is declared in .h File
The problem is even though code compiles fine but nothing gets displayed.
|
|
|
|
|
CString str=_T("name");<br />
<br />
SetDlgItemText(IDC_BTN_RESET,str);
works fine
does that solve it?
|
|
|
|
|
Thanx
yaa , it has but what is the problem with the above code.
still figuring this out ...
in case of any suggestions , do reply
|
|
|
|
|
sonsam wrote: CString str=_T("name");
no. this instead :
CString str = L"Name";
|
|
|
|
|
I guess UNICODE is not defined else
Suneet.03 wrote: CString str="Name";
will not compile.
|
|
|
|
|
spsharma wrote: CString str="Name";
will not compile
sure it will, and it does !
but it doesn't work properly if UNICODE and _UNICODE are not defined...
|
|
|
|
|
In fact it will not compile if UNICODE is defined.
|
|
|
|
|
Suneet.03 wrote: CString str="Name";
wchar_t buf[255];
strcpy(pc_char1,str);
mbstowcs(buf,pc_char1,str.GetLength()+1);
SetDlgItemTextW(hWnd,IDC_VIEW,buf);
CString , strcpy() are not handling unicode...
use CStringW and wcscpy_s() instead, and of course, when using literals, type them with a prepending L
|
|
|
|
|
The data is not Unicode until the call to mbstowcs(...) at which point buf (a Unicode/wide character buffer) should contain Unicode data. At that point, the CString and strcpy(...) are no longer involved.
Most ANSI/MBCS applications are capable of handling Unicode data and vice-versa simpy by using/omitting the L prefix on strings to indicate a wide/narrow string and using the appropriate W /A suffix on the Win32 API. Your application configuration (UNICODE #define d or not) mostly indicates the default character width and version of the Win32 API to link with.
There is something else going on...
Peace!
-- modified at 7:49 Monday 16th July, 2007
(Posted before complete...)
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Assuming that pc_char is a suitable char buffer, the conversion to Unicode looks OK from here.
I would try a few things...
1: Remove the CString usage - it is not necessary and only adds time and another point for exception handling.
LPCTSTR pcData = "Name";
wchar_t wcaBuf[255];
::mbstowcs( wcaBuf, cpData, ::_tcslen( cpData ) );
::SetDlgItemTextW( hWnd, IDC_VIEW , wcaBuf );
<code>
2: Make sure that the conversion to Unicode was successful by checking the return value from mbstowcs(...)
3: Check the return value of SetDlgItemTextW(...) , and maybe try using SetWindowTextW(...) by first obtaining the HWND of the IDC_VIEW control.
4: This may be a stupid question, but are you sure that IDC_VIEW is a "text-able" control (edit, button, static/label, drop-list combobox)?
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Wow. Alot of discussion and 1-voting on this thread
Isn't this sufficient?
CStringW str=L"Name";
SetDlgItemTextW(hWnd,IDC_VIEW,str);
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
or this
CStringW str("Name");
SetDlgItemTextW(hWnd,IDC_VIEW,str);
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Or this:
SetDlgItemTextW( hWnd, IDC_VIEW, L"Name" ); :P
Peace!
-=- James Please rate this message - let me know if I helped or not!<HR> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Mark Salsbery
Microsoft MVP - Visual C++
"Great job team! Head back to base for debriefing and cocktails."
|
|
|
|
|
Thanx guys for such quick replies.
One more thing , is UTF-8 conversion same as UNICODE conversion?
i think its same ...
|
|
|
|
|
Can anyone tell me how to change the caption of the button in a file dialog to
a cutomized one.....
thanx'n'advance
|
|
|
|
|
arshadkc wrote: Can anyone tell me how to change the caption of the button in a file dialog to
you have to subclass that CFileDialog class, and OnInitDialog of that function you can perform your required 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
Support CRY- Child Relief
|
|
|
|
|
Send the button a WM_SETTEXT message.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|