|
GDavy wrote: If during a build that is meant to be for unicode only UNICODE is defined in the preprocessor definitions and not _UNICODE, might that have negative consequences?
Why are there 2 different definitions anyway?
_UNICODE is for TCHAR support.
More Information[^]
Nibu thomas
Software Developer
|
|
|
|
|
UNICODE is for the Windows header files and _UNICODE is for the CRT.
Steve
|
|
|
|
|
Hi all,
In my MDI application, I have 10 toolbars. Initially nothing will be visible. They are selected from the menu "Toolbar". Now lets say, I open one toolbar. Then I goto print preview. Once I closed print preview, all toolbars are visible. How does it happen? If anyone could help me, I'd be grateful.
Thanks in advance,
Sarvan AL
|
|
|
|
|
this is a probelem of your code - only solution is to check ur code - i.e. add a message-box at show toolbar fuction to see why invisible toolbars are shown.
only guess: if u use "swith-case", do u have "break" for every bar?
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
Hi includeh10,
I've solved it now. But I had to maintain the display status of all toolbars explicitly. This is how I am doing:
CMainFrame::OnPaint()<br />
{<br />
....<br />
if(m_bHideToolBars)<br />
{<br />
HideAllToolbars() ;<br />
m_bHideToolBars = FALSE ;<br />
RecalcLayout() ;<br />
}<br />
....<br />
}<br />
CMainFrame::HideAllToolbars()<br />
{<br />
m_tb1.ShowWindow(m_bVisibleTb1) ;<br />
m_tb2.ShowWindow(m_bVisibleTb2) ;<br />
m_tb3.ShowWindow(m_bVisibleTb3) ;<br />
...<br />
}<br />
CMyView::OnEndPrinting(..)<br />
{<br />
...<br />
((CMainFrame*)AfxGetMainWnd())->m_bHideToolBars = TRUE ;<br />
}
Sarvan AL
|
|
|
|
|
I can not find good documents about Format of true-type-font file.
could you give me some links or comments?
thx
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Here.[^]
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
thanks,
but-
main link inside your link is invalid.
I navagated to other links there and found only software, which is not about file format.
could u give me a direct link to file-format?
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
includeh10 wrote: main link inside your link is invalid.
Huh? The first link on that page is to here: http://www.microsoft.com/typography/otspec/[^]. It works perfectly for me and the second link on that page give the file format...
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
OpenType is an extension of TrueType - currently I should learn basic - TrueType, not OpenType - for start.
A special image tool for C++ programmers, don't miss it!
The world unique Software Label Maker is here for you and me ...
A nice hyper tool for optimizing your MS html-help contents.
|
|
|
|
|
That page covers both. If you're wanting to learn about font files, TrueType is a legacy, older format that Microsoft doesn't directly support any more. Learn OpenType as well.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
hi
How to use a DLL developed in VB.NET in VC++, i am using VC2005 IDE
|
|
|
|
|
It needs to be a COM dll, then you can use it via COM. Unless it's a VB 2005 DLL, then you can create a C++/CLI project, which means your C++ project is reliant on the .NET framework, and you can then add it as a reference.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I think you'll have to wrap the DLL in a COM callable wrapper (CCW).
Steve
|
|
|
|
|
Do you know where I can get a printable version of the MSDN Winsock 2 Reference? My eyes hurt when i have to read online much so I like to print out and read offline instead.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/winsock_reference.asp
Thanks
|
|
|
|
|
buy a very dark screen-filter, which is very useful for your eyes - I am using it now.
Before I used the screen-filter, I got big headache if watched online too long every day. it is fine now.
A special image tool for Windows C++ programmers, don't miss it!
The world unique Software Label Maker is waiting for you and me ...
A nice hyper tool for optimizing your Microsoft html-help contents.
|
|
|
|
|
Install a virtual printer (such as virtual pdf printer),
then press ctrl+P in Firefox for save it to virtual printer.
|
|
|
|
|
Have you checked the refresh rate of your display? That is a common cause of headaches after long periods, try to get it up to 80-85Hz.
The tigress is here
|
|
|
|
|
"Windows Sockets 2 Application Programming Interface" at
ftp://ftp.microsoft.com/bussys/winsock/winsock2/wsapi22.doc[^]. I think there are pdf'd versions of it around, if you search for them.
But even though it's written for Winsock 2.2, it was released in August of 1997. So, some parts are clearly out-of-date (e.g., SO_RECVTIMEO is supported currently, even though the above 1997 release says it's not).
So, at the end of the day, you will still need to check at the on-line docs for complete currency.
Best regards,
Mike
|
|
|
|
|
I have developed a dll say MyExtension.dll which is in folder say c:\data\ but it can be really anywhere. ( One step beyond this is that the dll filename can be renamed to anything)
This dll is loaded by another process SomeProcess.exe which is running from say c:\windows. This process and its code is not in my control.
From within the code in my dll can I programatically determine the name of the dll and the path from which the dll is located (i.e I want to find the current executing code resides in c:\data\MyExtension.dll.)
The best I can think of is using toolhelp api to take a snapshot of all modules in the current process. Then search by my module name by iterating over the MODULEENTRY32 data structure. But this means that I have to hardcode atleast the module (dll) name to search. Is there any other way to basically determine the filename of the dll under which the code is executing.
(From a real world perepective I am developing a ISAPI extension dll loaded by IIS worker process. The file name and path is mapped using IIS configuration)
|
|
|
|
|
Use the GetModuleFileName API. The hModule parameter is the hinstDLL passed to your DllMain . You will need to cast it to a HMODULE . i.e. HMODULE hMod = reinterpret_cast<HMODULE>(hinstDLL); .
Steve
|
|
|
|
|
Thanks for letting me know that.
Unfortunately because the dll is a atl server dll it has a different dll main method as defined by the ATL server framework. So the above method won't work.
I am quoting from MSDN.
CAtlDllModuleT::DllMain
The optional entry point into a dynamic-link library (DLL).
BOOL WINAPI DllMain(
DWORD dwReason,
LPVOID /*lpReserved*/
) throw( );
Parameters
dwReason
If set to DLL_PROCESS_ATTACH, the DLL_THREAD_ATTACH and DLL_THREAD_DETACH notification calls are disabled.
lpReserved
Reserved.
Stephen Hewitt wrote: Use the GetModuleFileName API. The hModule parameter is the hinstDLL passed to your DllMain. You will need to cast it to a HMODULE. i.e. HMODULE hMod = reinterpret_cast<hmodule>(hinstDLL);.
Steve
|
|
|
|
|
Use this instead:
HMODULE hMod = reinterpret_cast<HMODULE>(_Module.GetModuleInstance());
Steve
|
|
|
|
|
Thanks very much.
Just one thing it should be _AtlBaseModule.GetModuleInstance()
Cheers
kanad
Stephen Hewitt wrote: HMODULE hMod = reinterpret_cast<hmodule>(_Module.GetModuleInstance());
|
|
|
|
|
Ok. I haven't got the latest ATL (I still use MSVC6, pity me) so I just gleamed this advice from the documentation and knowledge of MSVC6's version of ATL.
Steve
|
|
|
|