|
TVS_HASBUTTONS and just to make it look better add TVS_HASLINES and also TVS_LINESATROOT
Nish
Bow wow wow,
Yippee yo yippee yay,
My miniputt high,
Is now 30 yay.
|
|
|
|
|
You are my hero for the day. I have been playing with this thing for hours
What about the images though? I have them in a CImageList, and I've tried using the GetImageInfo and adding a mask to IMAGEINFO::hbmMask variable, but it doesn't seem to do anything... Right now I've made my tree background black and my text white so I don't have to look at the black boarder around the images And I just don't want to keep it that way...
Programming in binary is as easy as 01 10 11.
|
|
|
|
|
Never mind, I just solved my own problem Actually, I solved it by reading a different post on a different problem! But it used a CImageList in there, and it works!!!!!!!!!
(I'm happy)
Programming in binary is as easy as 01 10 11.
|
|
|
|
|
Assuming Visual Studio 7, can anyone point me in a direction that would show me how to consume a .Net WebService in a C++/MFC desktop application. Sample code would be most helpful. Thanks in advance.
|
|
|
|
|
I have a large button toolbar based on the MFCIE samples toolbar. However it only has a limited set of colours. how could i make it 24-bit colour like Winzip 8's toolbar?
.NET or not .NET? MFC is the question......
|
|
|
|
|
Try this function:
void SetImageList(CToolBar &tb, UINT nMessage, UINT nIDBitmap)
{
CImageList imageList;
CBitmap bitmap;
bitmap.LoadBitmap(nIDBitmap);
BITMAP bm;
bitmap.GetBitmap(&bm);
imageList.Create(bm.bmHeight, bm.bmHeight, ILC_COLORDDB|ILC_MASK, 0, 1);
imageList.Add(&bitmap, RGB(255,0,255));
tb.SendMessage(nMessage, 0, (LPARAM)imageList.m_hImageList);
imageList.Detach();
bitmap.Detach();
}
You call it like this:
SetImageList(yourToolbar, TB_SETIMAGELIST, nNormalBitmapID);
SetImageList(yourToolbar, TB_SETHOTIMAGELIST, nHotBitmapID);
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi
I need to do raw harddisk access under 98/Me. The information I've seen tells me that the only way to this (If I don't want to make one 32-bit and one 16-bit dll) is to write a VXD.
VXD:s run in 16-bit mode, doesn't they? I belive that windows does some kind of memory translation when parameters are passed via DeviceIOControl. Is that correct?
But say that I want to read 5 sectors. I must then pass at least 2 parameters, but DeviceIOControl allows only one. I must therefore send a pointer to a struct, say
struct READINFO
{
DWORD nSectors;
char *pBuf;
};
But then the buffer pointer will be incorrect, doesnt it? How can I fix that?
|
|
|
|
|
Hey Guys
what are the advantages behind merging the proxy and the stub in a dll file and is there any need to enable MTS. In other words what do this features allow you to do i can't do in a standard dll with MFC support.
Peter
|
|
|
|
|
COM has nothing to do with MFC at all.
Proxy and stub also has nothing to do with MTS.
When COM marshals and unmarshals interface it uses proxy and stub of that interface. So if proxy/stub is merged with your COM object that means no one can use it but owner.
soptest
|
|
|
|
|
Hi,
When I’m not using MFC and starting worker threads with _beginthreadex
I can give them message queues by calling:
PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
and then later on in the thread use GetMessage. I can do this without a window which is pretty cool. I tried putting PeekMessage into the ThreadFunc of a CWinThread derived class but it fails and, of course, the later call to GetMessage causes the program to hang.
Before I start pounding my head against the wall I figured I would ask here to see if anybody would know why this would fail and if it is possible to workaround (without creating a window and using a UI thread).
Thanks,
-Kevin
|
|
|
|
|
GetMessage will hang if you don't have a message waiting. Are you using PostThreadMessage to post a message to that thread?
If so, make sure you are doing that properly.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Tim,
I’ve been writing server apps w/o a GUI so bear with me on my next question. Why would the GUI hang if a message queue has been created on an independent worker thread? I’m beginning to believe that a queue has not been created because the call to PeekMessage returns FALSE.
-Kevin
|
|
|
|
|
I figured out why the GUI was hanging. A mistake not related to the Message Queue. But I still can't get the Message Q to work. Is there any reason why the scheme in my first post would not work?
Is the thread ID that I get from the CWinThread valid to use in:
PostThreadMessage(pThread->m_nThreadID, 1,1,1);
Thanks,
Kevin
|
|
|
|
|
Without more example code, I have no idea.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
I gave up on trying to create a message queue in an MFC worker thread by calling PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE);
There is a good article by Joseph M. Newcomer titled "Using User-Interface Threads" which describes what I wanted to do using UI Threads.
I still would like to know why i can't create the message queue, though!
-Kevin
|
|
|
|
|
I am having much trouble getting my shellnew object to appear on Explorer's right click New> menu...
I have tried putting it in the Winnt\ShellNew, I have tried creating the ShellNew key (and even tried values) under my filename under HKEY_CLASSES_ROOT...
There just seems to be nothing I can do to get it to work.
I would appreciate ANY pointers you have, because this is crucial to my application's release.
-- Chas
gte761u@prism.gatech.edu
|
|
|
|
|
Assuming your extension is .foo, under HKCR\.foo\ShellNew you need to create a value that tells the shell how to create new .foo files:
Command Executes an application. This is a REG_SZ value specifying the path of the application to be executed. For example, you could set it to launch a wizard.
Data Creates a file containing specified data. Data is a REG_BINARY value with the file's data. Data is ignored if either NullFile or FileName is specified.
FileName Creates a file that is a copy of a specified file. FileName is a REG_SZ value, set to the fully qualified path of the file to be copied.
NullFile Creates an empty file. NullFile is not assigned a value. If NullFile is specified, Data and FileName are ignored.
--Mike--
Rollin' in my 5.0
With the rag-top down so my hair can blow.
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
Big fan of Alyson Hannigan and Jamie Salé.
|
|
|
|
|
I tried to use NullFile with no success... I tried Data too.
Any other ideas? (or should I really do Command)
Is there some kind of COM object in which you have to modify the context menu with InsertMenu or something?
-- Chas
gte761u@prism.gatech.edu
|
|
|
|
|
Anyone know how to increase the height of a tab header (the bit with the label and image on it).
I have an override for DrawItem, but basically it just changes the font and colour. The trouble when the font is bigger than the default it gets clipped. It would be nice to work to work out the width and height (using GetTextExten32 I guess), but it's the height I want to increase specifically.
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
I'm not sure about tab control, but with owner-draw listbox you handle WM_MEASUREITEM if you want to change item height. At least give it a try.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Hi all,
In one of my program parts, i must make almost 25 fields in atleast 4 table.
I used CDaoTableDef for making tables and fields, i have strange problem in that.
When i wanna make a boolean field i got this error: "Data Type Conversion Error.".
But i have not any problem for creating text or double and ... fields !
Here is my source code:
tdP.CreateField( "PVISIBLE", dbBoolean, 1 );
What is wrong in this code ?
Please help me ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
dose anybody know the code for clearing editboxs, radio buttons etc? Like a refresh button on my dilaog box.
thanks
|
|
|
|
|
For edit box check CEdit::SetSel
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
When people place refresh buttons, they manually reset every control on the dialog.
For radio buttons call:
CheckRadioButton
Checkboxes uses:
CheckDlgButton
To clear the text in an edit box call:
SetWindowText
|
|
|
|
|
If this is an MFC program you can do a short-cut trick. Call UpdateData(false) and assuming you have not misused UpdateData at all [which means your DDX member variables get UpdateData'd only on OK] this will reset every control back to how it was on dialog-load. Understand me?
Nish
Bow wow wow,
Yippee yo yippee yay,
My miniputt high,
Is now 30 yay.
|
|
|
|