|
I have an application that prints Names.
Extended characters are being discarded in the printing. (I.e. À Á Â Ã Ä Å Æ Ç È É Ê Ë).
I am using TextOut() to send the text to the printer. I have tried alternate fonts, alternate charactersets in the font, but nothing seems to change.
The printed text for the above string is always (in different fonts) A A A ? A ? ? C E E E E.
What am I doing wrong? What can I do differently?
Thanks,
Craig
|
|
|
|
|
Hi..
On my Tabcontrol Application,there are some n number of edit boxes(all are created dynamically)..
Now when i am outside the editboxes & press the "End" Button the control will shift to the end of that dialog..Similarly when i am at the end of the dialog and if i press the "Home" button the control should go to top of the dialog..This all is working fine..
I had used the following code which i kept it in the PreTranslateMessage()
if(lpMsg->message == WM_KEYUP && lpMsg->wParam == VK_END)
{
HWND hWnd;
hWnd = this->m_hWnd;
DWORD nPos = ::GetScrollPos (hWnd, SB_VERT);
nPos <<= 16;
DWORD nScrollCode = SB_TOP;
WPARAM wparam = nPos | nScrollCode;
::SendMessage(hWnd,WM_VSCROLL, wparam, 0);
return TRUE;
}
But the Problem is that when the control is in Edit Box & if i press the "End" button the control goes to the end of the text in the edit box and then it goes to end of the dialog which should not happen(the control should go to the end of text in edit box & not to end of dialog)...
i.e when the control is in edit box,the default functionality of "End" button should take place..How can i achieve this?????????
Plz Help ME!!!!
Thanks in Advance....
|
|
|
|
|
I think deriving a class from CEdit and making children of your derived CEdit: CMyEdit should do it. That way you could even ignore some keys if you wanted to, or perform some special action with some keys.
In short, I think you need to do some subclassing of the CEdit control.
this is this.
|
|
|
|
|
I have crated two dlls which contanins
some functions usefull in my application.
I need to include the "lib" file so i do it
from
>Project>Setting >Link>Object/library modules
i just add the name of my dll
dll5.lib
it works fine for fist dll
now i have another lib to include ,it gives me
error
Can anyone tell me the exact way to include the lib file
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Usually if you have the libraries in the same solution file; simply making the application dependant on those libraries automatically links with their LIB files. Right click on your application in the solution browser and choose 'Project Dependencies' - tick the boxes for your two DLL projects. That should get the linker working.
If, however, your libraries aren't in the same solution (and I recommend they are!), then you'll need to add both the 'lib' file as you describe but also you'll need to add paths to the places where the two LIBs are stored in the Project>Setting>Link>General>Addition Library Directories. Be sure to path the 'Debug' lib in debug and the 'Release' lib in release (or whatever's appropriate).
As you can see; it's a lot easier if you can make the application project dependant on the libs in the solution, as then .NET will automatically ensure the relevant lib file is linked.
Matt Godbolt
Engineer, ProFactor Software
StyleManager project
|
|
|
|
|
Thanks for ur reply
I will try this things first ,
but i am using the VC.6 and not .Net
anyway thanks
vikas
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
|
vikas amin wrote: I will try this things first ,
What about using #pragma directive to include lib file...
e.g.
#pragma comment(lib,"abc.lib")
"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 am a bit confused by the Performance monitor: I want to check a process for large-scale leak allocations. "Virtual Bytes" sounds like the best idea to monitor. Comments?
We say "get a life" to each other, disappointed or jokingly. What we forget, though, is that this is possibly the most destructive advice you can give to a geek.
boost your code || Fold With Us! || sighist
|
|
|
|
|
Virtual bytes should be fine. It represents the total address space used up by the application, including memory mapped files, DLLs, EXEs etc.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I would suggest you monitor Private Bytes and Handle Count (private bytes for memory leaks and handle count for handle leaks)
|
|
|
|
|
But private bytes wouldn't show leaks like memory mapped files which didn't get unmapped. Admittedly, such leaks are rare, but why take the risk?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
I was suggesting additional counters, not replacements. It's useful to monitor Private Bytes and Virtual Bytes, because how one changes relative to the other gives further clues about the nature of the leak.
|
|
|
|
|
Hi folks,
I've written and SDI program. In this program I've created a dialogbar and added it to a rebar control in the OnCreate method in CMainFrame. I would like to have the ability to let this control appaer and disappaer with a click in the view menu but I don't know how to do this.
Thanks for your help.
|
|
|
|
|
Have you tried
GetDlgItem(TOOLBAR_ID)->ShowWindow(SW_SHOW|SW_HIDE)
|
|
|
|
|
yes, I've tried it and it shows and hide the dialogbar but the additional rebar control for this dialogbar is still visible.
|
|
|
|
|
In a recent project I used WH_JOURNALRECORD to moniter certain events occur in a particular application window, but as MSDN said, as soon as the user press "CTRL+ESC" or "CTRL+ALT+DEL", all installed WH_JOURNALRECORD hooks will be wiped out by the OS... When this happens, my application does not know, so it would still wait for messages(which will never come anymore) from the target window.
My questions is that, is there any way to verify whether a HHOOK handle is still on a "valid" state, so I can reinstall the hook if needed? Thanks
|
|
|
|
|
=[ Abin ]= wrote: When this happens, my application does not know, so it would still wait for messages(which will never come anymore) from the target window.
You actually can detect eviction of the hook by the OS. From this[^] article,
"Windows sends a WH_CANCELJOURNAL Windows message when it evicts the hook. The trouble is, the message doesn't have a Windows handle, i.e., it is not directed at any window, so how do we get to know about it? By now, the answer should be obvious, use another systemwide hook, this time a Windows Message Hook (idHook = WH_GETMESSAGE). This hook will get called whenever any Windows application calls GetMessage or PeekMessage, so we can catch WH_CANCELJOURNAL there and inform our UI that recording/playback has been interrupted."
If you want source code, you can take a look at the linked article.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
|
Well, for some odd reasons the GetMsgProc function in my application was never called, even though SetWindowsHookEx(WH_GETMESSAGE,GetMsgProc,m_hInstance,0) had succeeded... Weird isn't it?
It was an MFC dialog based application.
|
|
|
|
|
One possibility is that some other app installed a GETMESSAGE hook and is not forwarding it to subsequent hooks in the chain.
I also realized that my code (the one in the article) is potentially buggy. According to MSDN, global hooks, except for journal hooks, need to reside in a DLL. But my GetMsgProc doesn't. Could you try making it a thread specific hook instead, by providing the current thread id as the last parameter?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
If he makes it a thread-specific hook, then it might still not receive the expected message notifying the journal hook was cancelled. Better to make it global and place it in a DLL.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
The MSDN[^] documentation does say that Windows sends the message to the application that set the journal hook, so I guess a thread hook should be okay.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
The hook's thread identifier should be the same thread identifier as the thread containing the window that will receive the message. If you set the hook from some secondary thread, it might not receive the message.
No shirt, no shoes, no brains, no service.
|
|
|
|