|
chen wrote:
I have read the materials about ASPI for win32. and download
some files. I try to make a simple test program.
I have scsidefs.h, wnaspi32.h and some code such as AspiStart()
ScsiBusScan(),ScsiInquiry(), ... , but i failed. Is there other header files i am missing ?
I have not gotten a chance to write any code, so am not sure what the problem would be.
Did the program compile? If so, then the header files should be ok.
That's about all the help I can offer with my experience.
--
Dana Holt
Xenos Software
|
|
|
|
|
You might want to check out akrip.
|
|
|
|
|
I have a static control on a dialog which has the 'Notify' style set, so that it sends notification messages when clicked on. But if I click on the control when it contains no text it pops up an Explorer window, this doesn't happen when the control contains text. I used Spy++ to check the messages the dialog window was getting and this is the result:
1. Mouse click on static control containing text (ok)...
<00207> 00170324 R WM_ACTIVATE
<00208> 00170324 S DM_GETDEFID
<00209> 00170324 R DM_GETDEFID wHasDef:DC_HASDEFID wDefID:0001
<00210> 00170324 S WM_COMMAND wNotifyCode:STN_CLICKED wID:1003 hwndCtl:0016048E
2. Mouse click on static control not containing text (pops up Explorer window)...
<00173> 00130326 R WM_ACTIVATE
<00174> 00130326 S DM_GETDEFID
<00175> 00130326 R DM_GETDEFID wHasDef:DC_HASDEFID wDefID:0001
<00176> 00130326 S WM_DDE_INITIATE hwnd:000A0418 aApp:C049 ("Folders") aTopic:C04A ("AppProperties")
<00177> 00130326 R WM_DDE_INITIATE
...
<00228> 00130326 S WM_COMMAND wNotifyCode:STN_CLICKED wID:1003 hwndCtl:001104DE
I looks like the WM_DDE_INITIATE message is the problem, but where is this message coming from?! and why?
|
|
|
|
|
|
Hello,
I'm have the need to write a custom window arrangement routine (like the normal tile, cascade, etc) in an MFC MDI app.
What i'm need to do is "stack" MDI child windows of a certain CMdiChildWnd derived type, while minimizing all other MDIChild frame windows.
Does CMidFrameWnd maintain a list of pointers to it's child frame windows? If not, any idea how i can enumerate the child frames, and figure out what CMDIChildWnd-derived type they are?
Thanks,
Heywood
|
|
|
|
|
Hi !
I was working on Device Independent Bitmap (DIB) and wanted to shrink my image down to a thumbnail size, so used the
StretchDIBits() function.
But the shrinking lead to a severe color loss. Why ????
Is there anyway I can shrink my DIB without color loss.
Please Help
|
|
|
|
|
SetStretchBltMode(COLORONCOLOR);
-c
Cheap oil. It's worth it!
|
|
|
|
|
Hi !!
It worked just fine.. The image is perfect now.
Thanks a lot.
Green.
|
|
|
|
|
If you don't mind it still looking bad on Win9x, you can try calling SetStretchBltMode(HALFTONE); prior to calling StretchDIBits() . Caveat: i know it works with StretchBlt() , but i've never tried it with StretchDIBits() .
---Shog9---
From now on we can call C# and MC++ "The square wheel languages" -- Jack Handy, The Lounge
|
|
|
|
|
Hi !!
Well, It did work for StretchDIBits().
The image is perfect now...
Thanks a lot.
Green.
|
|
|
|
|
Hi !!
Well, It worked for StretchDIBits().
The image is perfect now...
Thanks a lot.
Green.
|
|
|
|
|
Hi.
I have an interesting problem. I am working on a program with with a CEditView window. I use GetEditCtrl().SetWindowsText to update the view with new text. Whenever I call SetWIndowsText, the CEditView repaint the entire view, but it always resets the scroll position. For example, let say I am view line 200. (line 200 is at top of view). Whenever I update the view, CEditView resets the current view to line 0.
Is there a way to set what line should CEditView beginning?
Thanks,
Kuphryn
|
|
|
|
|
Use
CEdit& edit = GetEditCtrl() ;
edit.LineScroll(200,0) ;
|
|
|
|
|
Thanks.
A special thanks to Scott McPhillips of MSDN newsgroup also for the solution (he posted it yesterday).
Kuphryn
|
|
|
|
|
Hi,
CStringArray& MyArrayFunction()
{
CStringArray aArray;
aArray.SetSize(...
aArray.SetAt(...
...
return aArray;
}
Question1: is the return line OK?
Question2: how can I fill another array in my code with the returned stringarray?
I tried
CStringArray aMyArray = MyArrayFunction();
but
error C2440: 'initializing' : cannot convert from 'class CStringArray' to 'class CStringArray'
is the answer.
Could you please help me?
Thanks a lot
Ricardo
|
|
|
|
|
change to:
CStringArray* MyArrayFunction()
{
CStringArray *paArray = new CStringArray();
paArray->SetSize(...);
return paArray;
}
getting the array
CStringArray *paMyArray = MyArrayFunction();
do not foget to delete paMyArray;
soptest
|
|
|
|
|
|
I have the following problem. I have included this header file many times in my code with no problems. Then I "included" it into a new file which now produces errors in my typedef statement. I really dont know if it is a problem with namespace as I have no idea how to use that correctly anyway.
Code for "entity.h"
<br />
#include <list.h><br />
<br />
using namespace std ;<br />
<br />
typedef struct<br />
{<br />
int ref;<br />
std::string name;<br />
<br />
}EntityData;<br />
typedef list<EntityData> ENTITYLIST;<br />
How can I include this file with out errors??
Code for "NewFile.cpp"
<br />
#include "stdafx.h"<br />
#include "NewFile.h"<br />
#include <list.h><br />
#include "entity.h"
using namespace std;
Pease help!!
---
|
|
|
|
|
Ooops, Rather than delete this message I will just post my solution.
Use <list> instead of <List.h>
---
|
|
|
|
|
what is the error?
soptest
|
|
|
|
|
It didnt understand the list definition in my header file. This is now fixed due to the way I included the list.h file. I.E #include <list> without a .h
Thanks anyway.
---
|
|
|
|
|
The list.h is the old header file from the old C++ standard and is included to prevent old code from breaking. That is why if you are developing new code you should use the plain <list> header.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Also to make sure your header is included only once you must do the #ifdef stuff
#if !defined __ENTITIY_H
#define __ENTITIY_H
....
#endif
Best regards,
Alexandru Savescu
|
|
|
|
|
This is kind of trivial, but I have an ATL DCOM server project, and when I monitor it in the task manager, the .exe's name gets mangled. So, instead of the process entry reading DCOMServer.exe, I see DCOMS~1. Sometimes the problem doesn't show up. I just wondered if anyone knew why this happens.
|
|
|
|
|
If you look at how its registered, either in the registry or in OLEView, its probably using short file names. Its probably not a big deal unless you need it to be in long name format.
Like it or not, I'm right.
|
|
|
|