|
no need. pack with winzip, just write a quick program that opens your zip file and writes a new mangled one.
STL is a religeon. Enquiries to Reverend Christian Graus
|
|
|
|
|
I added exactly this capability to zziplib some time ago.
|
|
|
|
|
|
EnumFontFamiliesEx gives you NEWTEXTMETRIC for each font. NEWTEXTMETRIC::ntmFlags has flags which may help you determine if font is OpenType or not.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
i am actually a C# programmer, i need to find out the type, but i dont really want to cann enumfontfamiliesex as there is a .net collection to get the fonts, but if i cant get the font type, then i suppose ill have to use this instead to enumerate fonts.
Email: theeclypse@hotmail.com URL: http://www.onyeyiri.co.uk "All programmers are playwrights and all computers are lousy actors."
|
|
|
|
|
I tried EnableMenuItem to disable a menu. It's not working the menu always ramains enabled. Why
|
|
|
|
|
I'm assuming you're using MFC. MFC calls EnableMenuItem for you - you need to provide ON_UPDATE_COMMAND_UI handlers for menu items you want to enable/disable/check/uncheck.
You don't need ON_UPDATE_COMMAND_UI handlers for menu items which stay enabled all the time.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
|
Hi, i'm working with a CListCtrl, i would like that when the user clicks on it, to hide the selection.
I couldn't find a style that could do it for, (there is that option with CListBox), so i did like :
void CBy_City::OnNMClicklsccity(NMHDR *pNMHDR, LRESULT *pResult)
{
POSITION p = m_lscCity.GetFirstSelectedItemPosition();
int Select = m_lscCity.GetNextSelectedItem(p);
m_lscCity.SetItemState(Select,~LVIS_SELECTED,~LVIS_SELECTED);
}
The last two arguments of SetItemState are obvisously wrong, but i don't know how to deny those constants...
Thank you for your time
rui
|
|
|
|
|
One line:
m_lstCity.SetItemState(-1, 0, LVIS_SELECTED);
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Thank you Tomasz,
It works, but it is still possible to see that that item was clecked, is there a way that it never happends?
Thank you once more
rui
|
|
|
|
|
Use LVIS_SELECTED | LVIS_FOCUSED instead of LVIS_SELECTED.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Well, it is still possible to see that the user tried to select an item, thank you the same.
rui
|
|
|
|
|
Hello,
i wrote an mdi-app with c++/mfc under winnt 4.0. When logging off the current user from winnt, winnt closes all running apps before the login-dialog will be displayed. This works correct for all apps i tested, but when winnt wants to close my app before logging off, the explorer crashes. it seems that the app closes the right way, because no debug-message created by my app is missing in the corresponding debug-file. Where is the difference between closing an app by hand and closing an app automatically by winnt before logging off ? And why can my app cause the explorer to crash ? Please help me, i don't know a way to fix this
Best regards
tabor25
|
|
|
|
|
You might want to try handling the messages WM_QUERYENDSESSION and WM_ENDSESSION . They are sent to all running applications during the shutdown process.
Gary R. Wheeler
|
|
|
|
|
I have a static control with the bitmap style and the notify style set.
I have an on click handler as well
ON_STN_CLICKED(IDC_LANG, OnStnClickedStaticlang)
void CRegularDialerDlg::OnStnClickedStaticlang()<br />
{<br />
.....<br />
m_langstatic.SetBitmap(LoadBitmap(NULL,<br />
MAKEINTRESOURCE(IDB_BITMAP5)));<br />
.....<br />
}
Now as you can see the only thing I do is to change the bitmap [the rest of
the code has nothing to do with the static control]
Now my problem is that the on click does not work anywmore [as if it lost
the notify style bit somehow]
I used Spy++ and found that after one click it won't accept this static
control as a window (( [means I cant drag the cross and select this
control]
has anyone else encountered this issue? Is this some kinda bug?
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
You're passing NULL as 1st argument to ::LoadBitmap. ::LoadBitmap fails. CStatic::SetBitmap (which is just a wrapper over STM_SETIMAGE) gets NULL bitmap and sets the size of control to 0x0 pixels.
You need to pass AfxGetResourceHandle() to LoadBitmap, or, better yet, use CBitmap::LoadBitmap.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz Sowinski wrote:
You're passing NULL as 1st argument to ::LoadBitmap. ::LoadBitmap fails
Hmmm. Tomasz, can you take a look at this URL :-
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmfc98/html/_mfc_cstatic.3a3a.setbitmap.asp
and scroll down to the example :-
[I copy/paste below for your convenience]
Example
CStatic myStatic;
myStatic.Create(_T("my static"),
WS_CHILD|WS_VISIBLE|SS_BITMAP|SS_CENTERIMAGE, CRect(10,10,150,50),
pParentWnd);
myStatic.SetBitmap( ::LoadBitmap(NULL, MAKEINTRESOURCE(OBM_CHECK)) );
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nish,
You seem to not believe in my explanation
Anyway, the LoadBitmap call with NULL in the example loads so-called OEM bitmap embedded in one of Windows modules. OBM_CHECK is special, predefined identifer. Obviously, you're loading your own bitmap, not the OEM one. That's why you need non-NULL as first argument to LoadBitmap call.
Read the LoadBitmap docs for more details.
Tomasz Sowinski -- http://www.shooltz.com
** Putt knot yore thrust inn spel chequers. **
|
|
|
|
|
Tomasz Sowinski wrote:
You seem to not believe in my explanation
Nope, not at all, but I was confused about the sample
Who would dare disbelieve Tomasz
Tomasz Sowinski wrote:
Read the LoadBitmap docs for more details.
Yup, just read it and feel silly about not having done so previously
Thanks again, Tomasz!
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
In the program the following code prints the symbols corresponding to the data array:
for (WORD i = 0; i <65536; i ++)
{
CString str = (TCHAR) i;
int x =...;
int y =...;
pDC-> TextOut (x, y, str);
}
On Windows98SE the string will be transformed in ANSI
Whether it is possible on Windows98 to display Unicode. If yes, as it to make (and if it is possible with a small example)
Best regards,
Eugene Pustovoyt
|
|
|
|
|
|
Thank you!
Following code is work on Win98:
WCHAR chSymbol[] = {nValue};
::TextOutW(hDC, x, y, chSymbol, 1);
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Hello!
How can I pass a pointer for a class correctly to a CWinThread derived class?
I've got the pointer global decleared as
CMyThread* pThread;
CComPort* pGSM = new CComPort();
and when I start the workerthread I pass along the pointer like this
<br />
void CMyView::OnStartThread()<br />
{<br />
extern CMyThread* pThread;<br />
extern CComPort* pGSM;<br />
<br />
if (NULL != (pThread = new CMyThread()))<br />
{<br />
ASSERT_VALID(pThread);<br />
pThread->m_pThreadParams = NULL;<br />
pThread->m_pMainWnd = AfxGetMainWnd();<br />
pThread->m_hWnd = this->GetSafeHwnd();<br />
pThread->pGSM = pGSM;<br />
pThread->m_hMutex = CreateMutex( NULL, FALSE, NULL );<br />
if (!pThread->CreateThread(CREATE_SUSPENDED))<br />
{<br />
delete pThread;<br />
return;<br />
}<br />
VERIFY(pThread->SetThreadPriority(THREAD_PRIORITY_BELOW_NORMAL));<br />
pThread->ResumeThread();<br />
}<br />
<br />
return;<br />
}<br />
The application works on some computers, but on others it can halt or even show diffrent status on a bool returned from pGSM.
Thanks,
Floppe
|
|
|
|
|
There's nothing wrong in passing a pointer to a thread the way you're doing. What I think could be causing your problem is that you set pThread->pGSM after the thread has started, which opens the possibility that the thread is trying to access the pointer before it is pointing to where it should.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
PS: Excuses, you're not starting the thread before setting its parameters, so the problem must lie somewhere else.
|
|
|
|