|
OK, the sample works on GlobalAlloc too.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
HI ,
I need to implement custom print in mshtml i.e iam using my print dialog . I need to know the page range and margins setting. The Exec command takes OLECMDID_PRINT takes these setting in its third parameter.Can anyone tell me how to get it?I need to implement span tag also.
lokiz
|
|
|
|
|
HI .
I WANT TO SEND THE SPECIFICE VALUE TO MY HARD WARE ATTACHED WITH COM PORT .... AFTER SPECIFICE TIME REPETEDLY.
FOR EXAMPLE AFTER EVERY 5 SECONDS I WANT TO SEND A VALUE TO HARDWARE .
HOW CAN I HANDLE IT ( MEANS REPETITION ).
IS IT WITH TIMER ... OR BY CERATING EVENT ...
ANY SAMPLE LINES .. THAT IS BETTER
THANX
|
|
|
|
|
can't you write in lower case ?!
for your problem, set a timer... (SetTimer ())
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
The below function is not working for usergenerated excel files.
AFX_SQL_ASYNC( this, ( ::SQLTables ) ( m_hstmt, strQualifier,SQL_NTS,ustrOwner,SQL_NTS,ustrName,SQL_NTS,ustrType,SQL_NTS ) );
The functions retrieves the parameters if the given excel fiel os genereated by some softwares like DTS but not with the manually generated excel files. Can anyone help me out on this.
Thanks
Chitra
|
|
|
|
|
Try adding a name for your table by doing in excel Insert->Name->Define
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
hi,
how can i get combobox item data?
i used CComboBox::GetItemData(). i dont know how to convert the DWORD value to a string.
any help?
thanks,
jim
|
|
|
|
|
|
"..i dont know how to convert the DWORD value to a string."
Quality!
I know its cruel to laugh at this, but it soo damn funny
I Dream of Absolute Zero
|
|
|
|
|
You cannot directly store string values into the item data parameter of a combo box. You can only store DWORDs (unsigned long), or other valid numeric casts.
What you may be after is the text that you populate the combobox with. In that case you need to call GetLBText() .
e.g.:
<font color=green>
CString strText;
int nSel = m_ComboBox.GetCurSel();
if( m_ComboBox.GetLBText(nSel, strText) != CB_ERR )
{
std::cout<< (LPCTSTR)strText << std::endl;
}
I Dream of Absolute Zero
|
|
|
|
|
Hi,
After installing a WINZIP which adds it's option in WINDOWS default right-click menu. i.e. whenever we select any file and right-click then we see the WINZIP option in MENU.
I want to add my own option in WINDOWS right-click menu just as of WINZIP.
Is there any idea ?
Thanks in advance.
|
|
|
|
|
|
Bikram Singh,I used SetFocus,also SetForegroundWindow,and SetActiveWindow.Everything is OK.But when I set focus combobox(containing playlist),Windows repaints Windows Media Player, so I can't select any item in this combobox.
For other commands such as Ctrl+P,Alt+Enter,..it's ok,only for combobox,i can't choose any item.
|
|
|
|
|
hi guys i hope you can help me i've been stuck for hours now...
i have 2 *.cpp files
file1.cpp has an array of a structure:
struct vertices_structure
{
int array_pos;
int adjacentVerts[20];
};
vertices_structure vert[200];
in file2.cpp i have declared the structure array as extern:
extern vertices_structure vert[];
and now i wanna use the array in a normal way like any other array.
example:
int muh=vert[0].array_pos;
but that doesnt work at all.
there are NO error messages when i compile the code, but i know it doesnt work. i cant use vert[] as normal array either in file1.cpp nor file2.cpp.
cause when i run the debugger the vert[] isnt shown as array but its shown as a pointer. when i delete the row above with "int muh..." from file2.cpp the debugger shows vert[] as array again and everything works normal as its supposed to be.
can someone explain that and helpme here?
|
|
|
|
|
I did not reproduce your problem. I have inplemented the similar code but it ran well. I dont know why.
|
|
|
|
|
I do not see any problem. The variable vert is a pointer to an array of type vertices_structure. The [] (brackets) are just away to access the items in the array.
If you did something like this:
vertices_structure temp;
vertices_structure* pTemp = &temp;
int muh = pTemp[0].array_pos;
int muh = pTemp[1].array_pos;
Good luck!
INTP
|
|
|
|
|
how would i go about allowing a dll to call a function in my program? i have a hook setup in the dll in which i append a few items to the system menu of all applications, and based on some settings in my main application i would like to append different menu items.
should i pass a function pointer? or is there some easy magical way to do this? thanks.
jason
|
|
|
|
|
No magic. Pass an object or a function pointer or give the dll a window handle and have it send a message to the window or... anything else you can come up with that does not rely on magic.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
i like the message idea. thanks!
jason
|
|
|
|
|
Hi Group,
for a project[1] I am trying to find an OS independant way to measure the amount of cpu usage
and memory consumption of the program. It would be nice if I could do that in my C++ code, so I
can show the results at runtime or even plot a nice graph (I got wild dreams).
After some google'ing I found some (nice) examples[2] but they are all windows based. Does
universal code for this problem exist?
Of course I can make different classes (one for windows and another for *nix), I do something
similar to assign sockets. But then I also need code for *nix, without using bash-scripting of
course.
So I am looking for something OS independant, but examples for windows or *nix can help me out
for now as well.
Goodnight everyone and thanks in advance,
--wim
______
[1] I am trying to compare some differint multicast protocols, and yes, also cpu usage and
memory consumption is an important part of that
[2] if anybody wants them, I can always post links, just ask
|
|
|
|
|
Does universal code for this problem exist?
Highly unlikely. The best you could do is write generic code for the other parts of the application and write OS specifics in wrapper DLLs keeping a common interface for each wrapper you create.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
Yeah, I kind of gave up the search to "universal code" (I just like the sound of it (- . I guess I'll have to write separate implementations for each OS and use conditional compile statements in the source code.
Another major problem is that I haven't found interesting code concerning memory consumption. Until now, I only found ways to measure CPU-cycles and only for windows. Can anyone help me?
Many kind greetings and thanks in advance,
--wim deprez
|
|
|
|
|
I use embedded visual c++ to write a video cam software, so that the pocket PC show the screen of the cam. But my menubar does not work.(I tick the top up box) When I click the top up button in menubar, the menubar hangs. But the screen still can show the video.
void CGroup7Dlg::OnPreview()
{
unsigned char *pbuffer = (unsigned char *)malloc(m_PrvWidth * m_PrvHeight * 3);
unsigned char *rpbuffer = (unsigned char *)malloc(m_PrvWidth * m_PrvHeight * 3);
if ((PreviewFrame((unsigned char*) pbuffer)) == false)
AfxMessageBox(_T("Preview Frame Fail!"), MB_OK);
Rectify(pbuffer, rpbuffer); //<----- a
CBitmap bitmap;
bitmap.CreateBitmap(m_PrvWidth, m_PrvHeight, 1, 24, rpbuffer);
CVOImage image;
RECT pic_rect;
m_picture_window.GetWindowRect(&pic_rect);
HDC picDC = ::GetDC(m_picture_window.m_hWnd );
CString path_fname;
::WriteBitmapIntoJpegFile(TEXT("\\pic1.jpg"), 80, (HBITMAP)bitmap);
UpdateData(true);
path_fname ="\\My Documents\\pic1.jpg";
image.Load (picDC ,path_fname );
image.Draw (picDC ,2,13 );
free(pbuffer);
pbuffer = NULL;
free(rpbuffer); //<-------b
rpbuffer = NULL;
}
There will be out of memory if I comment out line b but menubar works. There will be no problem but the screen pixel is in wrong order of course. I don't know how to fix this bug. Please help...
|
|
|
|
|
There will be out of memory if I comment out line b but menubar works
There will be a memory leak if you did that.
Howabout to set your pbuffer and rbuffer as a member variable?
And why don't you use new/delete instead of malloc/free?
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Thank you so much, I have tried your method:
unsigned char *pbuffer = new unsigned char[m_PrvWidth * m_PrvHeight* 6];
unsigned char *rpbuffer = new unsigned char[m_PrvWidth * m_PrvHeight* 6];
.
.
.
delete[] pbuffer;
delete[] rpbuffer;
But, the same problem is still there. And the "out of memory" dialog pop up continuously..........help.........please
Do you have any idea?! >_<
|
|
|
|