|
Paul Watt,
Thank you, this is exactly what I was looking for. I had done some searching at the MSDN site, but could not find that specific information. What I did find was information about the build process and how Visual C++ scans and interprets the file identifiers and translation units.
|
|
|
|
|
i am running my service on a computer and i want to know wheather a system is in logoff or login state?
how to get its state?
r00d0034@yahoo.com
|
|
|
|
|
Anybody got any ideas here? I have an active X control on a form view, and I am trying to do the following, with less than impressive results:
hWnd hWndControl = GetDlgItem(IDC_ACTIVEXCONTROL);
UINT nID = GetDlgCtrlID(hWndControl);
nID is equal to 0. I had hoped it would be equal to IDC_ACTIVEXCONTROL.
A dollar for anyone that can make this work.
|
|
|
|
|
I'm trying to use FindResource like this:
<br />
hResInfo = FindResource(NULL, "IDB_LOGIN", "Bitmap");<br />
I've tried "BMP", "RT_BITMAP", and RT_BITMAP as the type, but it still always fails. What am I doing wrong?
Thanks!
|
|
|
|
|
Try
<br />
hResInfo = FindResource(NULL, MAKEINTRESOURCE( IDB_LOGIN ), RT_BITMAP );<br />
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Thanks, that works! Unfortunately, the OleLoadPicture in LoadFromBuffer in CPicture (www.codeproject.com/bitmap/cpicture.asp) fails
|
|
|
|
|
I have a subclassed CListBox class (the name is CMyListBox ).
class CMyListBox : public CListBox
{
...
virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
...
};
The problem is that the overloaded virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct); member function of my class will never called!
How can I fix that?
(I am working with Embedded Visual C++ 3.0 + PocketPC / PocketPC 2002 + MFC)
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
You should:
a) make sure the listbox in question has the ownerdraw checkbox checked
b) make sure your declaration of DrawItem looks exactly like the one in the baseclass.
If this does not help then I'm afraid I can't either
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
The problem is that the same code does run perfectly under WinXP, only under CE (PocketPC / PocketPC 2002) the code doesn't run!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
From MSDN's WinCE pages:
"Windows CE does not support owner-drawn list boxes, so you cannot specify ODT_LISTBOX in the CtlType member of a DRAWITEMSTRUCT or a MEASUREITEMSTRUCT structure."
You should be able to use an ownerdraw CListCtrl though.
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
I’m using Microsoft Layer For Unicode on 98. I’m not using any of CCM_Get/SETUNICODEFORMAT messages. Some of the common control as property sheet acts weired when I use IE 4. If I upgrade to IE 5, every things works as expected. I could not find any Microsoft documentation which says that I’ve to use IE 5, with UNICODe support. Is there any documentation on this?
I guess it is requirement to use IE 5 with UNICOWS, but I was hoping to find some doc to justify this
Thanks
Kasturi
|
|
|
|
|
It would be best to ask this question on the MS newgroup for MSLU. Michka, the guy who wrote the DLL, is there and will answer any questions you have.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Hi,
CFileDialog dlg(TRUE);
dlg.DoModal();
the above code usually pops up a file dialog WITHOUT the outlook bar at the left (which contains shotcuts to last documents, desktop, documents, my computer, and network).
But I experienced that this very same code can open the file dialog WITH the outlook bar at its left in certain cases.
Is there some rule I am not aware of? Could somebody please enlighten me.
Thanks
R.
|
|
|
|
|
See Davide's excellent CFileDialogST[^] class for details. I now use his class exclusively.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I have a small app that just needs to open the (preferably default) web browser. The biggest problem I see is that I need to set the options, like you can in JavaScript with window.open. It there a way of doing this inside my program? If not could I have a hidden instance of the browser that uses window.open?
Thanks,
Steve
|
|
|
|
|
if you run "about:blank" using your favorite system-command-executor (WinExec, spawn, etc.) it will launch the default browser.
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
Yes but that gives me no control over the look of the browser, size, toolbars ect.
|
|
|
|
|
write a little HTML page that contians the JScript to set the things you need, then launch that page (again, using WinExec) ?
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
Well yea, I could do that. But then I would have another open window that I don't want. I found a soultion to another problem that will let me do it a different way so this is no longer needed. Thanks for your help.
|
|
|
|
|
My problem is that when i try to use ICDraw, nothing happens. I've done exactly what the MSDN says, but it's not working
Here's my code:
DWORD dw;
DWORD dwNumBuffers = 0;
ICDrawBegin(hVideo, ICDRAW_FULLSCREEN, NULL, NULL, NULL, 0, 0, 0, 0, &VideoInfo.bmiHeader, 0, 0, VideoInfo.bmiHeader.biWidth, VideoInfo.bmiHeader.biHeight, VideoHeader.dwRate, VideoHeader.dwScale);
avi.ReadNextVideoFrame(lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, VideoInfo.bmiHeader.biCompression);
ICGetBuffersWanted(hVideo, &dwNumBuffers);
for (dw = 0; dw < dwNumBuffers; dw++)
{
ICDraw(hVideo, 0, (LPVOID)&VideoInfo.bmiHeader, lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, dw);
}
ICDrawStart(hVideo);
dw = 0;
for (int i = 1; i < (int)((float)VideoHeader.dwRate / VideoHeader.dwScale * 60); i++)
{
avi.ReadNextVideoFrame(lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, VideoInfo.bmiHeader.biCompression);
ICDraw(hVideo, 0, (LPVOID)&VideoInfo.bmiHeader, lpData, VideoInfo.bmiHeader.biWidth * VideoInfo.bmiHeader.biHeight * 24 / 8, dw);
}
ICDrawStop(hVideo);
ICDrawFlush(hVideo);
ICDrawEnd(hVideo);
The avi.ReadNextVideoFrame() is a function that reads the next videoframe from the avifile. I'm not sure i'm doing it right, i don't think the MSDN illustrates very clearly how to do it.
Thanks all!
-Rune Svendsen
|
|
|
|
|
Hi,
I get an error with this code when I try to delete the object (CWindowImpl)
LRESULT CWndNotify::OnTimer(UINT nMsg, WPARAM wParam,
LPARAM lParam, BOOL& bHandled)
{
switch( nTimer )
{
case ...:
{
break;
}
case ...:
{
KillTimer( TIMER_COLLAPSE );
delete this;
break;
}
...
I get this assertion error:
pThis->m_pCurrentMsg == &msg
I tried Detatch() and DestroyWindow() before delete but it doesn't help. How should I destroy the window?
Thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
Hello,
Use DestroyWindow and forget the "delete this". "Delete this" doesn't make any sense here.
-Dominik
|
|
|
|
|
I works with DestroyWindow() but I still have one question: I created the window like this:
<br />
CNotifyWnd* pWnd = new CNotifyWnd();<br />
does DestroyWindow() will also get rid of my pointer or am I leaking memory here?
thanks!
---------------
Concentrating on Ideas
http://www.edovia.com
|
|
|
|
|
In this case you need to delete the class...
delete pWnd;
pWnd = NULL;
First call DestroyWindow and then the code above. The code above automatically calls the class'es deconstructor.
|
|
|
|
|
I'd suggest overriding OnFinalMessage( ) and do the delete this; there.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|