|
If I understand your problem correctly, you just want to display a progress dialog during lenghty operation. If this is the case, have a look at Feb'97 issue of MSJ; there's a column titled 'Wicked Code' which describes CWaitDialog class.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Cool, thanks...
Josh
josh@that-guy.net
|
|
|
|
|
use Progress.DoModal()
but put your function code into the dialog class's InitInstance() so that the function runs when the dialog opens up. Then you can send function-related info to the dialog using member variables of the dialog and UpdateData()
Hope this helps...
|
|
|
|
|
Hi,
I would like to respond to the message WM_DRAWITEM within a CFrameWnd derrived Class. Unfortuanetly it doesn't appear within the list provide by class wizzard.
I want to use this message, to support an owner drawn CListCtrl.
Can anyone offer me any advice?
Cheers
Rich
|
|
|
|
|
If you plan to host your control in any CWnd-derived class, there's no need to handle WM_DRAWITEM in the parent. Just override CListCtrl::DrawItem in CYourListCtrl and MFC magic will work for you.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I have created an Dialog-based MFC .exe Application and was wondering how to add a menu to the dialog box. I have found and used code adding toolbars and statusbars to dialog boxes successfully.
|
|
|
|
|
Create a menu. Right-click on your dialog box. Select Properties. You will see Menu: combobox. Select ID of your menu.
That's all
Jerzy
|
|
|
|
|
I want to know if it is possible to make a cell in a list control "span" both rows and columns (separately). I also want to change the font/orientation of text in a cell.
My request:
I want my list control to have visual highlights such as a whole row (item) be highlighted to show a visual break in the list - such as a grey block that spans all my columns and contains nothing.
I also want my list control to have a side-bar column that can have text displayed vertically to span a block of rows (items) - such as to indicate a block of related items.
In crude ASCII, I want something that looks like below (4 columns, XXX=grey blocks)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
P Last Name: First Name: MI:
e Address: City: State:
r Zip Code: Phone (H): Phone (W):
s
o
n
a
l
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
O Item 1: Price: Quantity:
r Item 2: Price: Quantity:
d Item 3: Price: Quantity:
e Item 4: Price: Quantity:
r Total Price: Total Items:
s
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Thanks all.
Johnny
|
|
|
|
|
You could achieve this with so-called custom draw, but I think you should switch to some grid control. There's one here on CodeProject; have a look in the Controls/Miscellaneous section.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Does each application have it's own message queue? Or is it one shared queue.
The VB function DoEvents()
and the C++ code
MSG msg;
while(PeekMessage(&msg,NULL,0,0,PM_REMOVE))
{
TranslateMessage(&msg) ;
DispatchMessage(&msg);
}
Would indicate that there is one queue.
Philip McGahan
|
|
|
|
|
Each thread that creates a window is allotted its own message queue, and must include a message pump like the one you've litsed in order to process messages for that thread.
Think thread, not application. Here's a snip from the "Multiple Threads in the User Interface" article in the MSDN:
Changes to the Message Loop
"Applications with multiple threads must include a message loop in each thread that creates a window. The message loop and window procedure for a window must be processed by the thread that created the window. If the message loop does not reside in the same thread that created the window, the DispatchMessage function will not get messages for the window. As a result, the window will appear but won't show activation and won't repaint, be moved, receive mouse messages, or generally work as you expect it to."
later... as usual...
Hmmm - maybe this is more helpful - from the PSDK docs on windowing and messages:
"The system maintains a single system message queue and one thread-specific message queue for each GUI thread. To avoid the overhead of creating a message queue for non-GUI threads, all threads are created initially without a message queue. The system creates a thread-specific message queue only when the thread makes its first call to one of the Win32 User or GDI functions."
|
|
|
|
|
Thank you.
That was very informative.
|
|
|
|
|
Has anyone here ever seen this error.
"fatal error C1084: Cannot read type library file: 'TLBs\astm.tlb': Error loading type library/DLL."
I really have no idea what is going on. I get that when doing a regual #import statement. We designed the TLB. The tlb file was just compiled with no errors. It isn't a sharing violation since i made a complete copy of the file just for use in this application. The TLB file comes from a ATL/COM project. (note: I have also posted this in the COM forum: Didn't really know where it belonged.) If anyone has seen this and knows whats going on please help. I have tried everything i can think of. There doesn't seem to be much of anything on the internet about it and there is NOTHING of MSDN about it.
Any help is greatly appreciated.
Joseph Dempsey
jdempsey@cox.rr.com
Joseph.Dempsey@thermobio.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Hello.
I am developing a project that includes a Dialog containing a CTreeCtrl object.
When running my application in a WindowsNT machine and i display the Dialog i can see correctly the CTreeCtrl.
But when i run my application in a Windows98 machine when i display the Dialog if i don´t click on the CTreeCtrl i can´t see it.
Could you help me?.
Thanks in advance
Yolanda
|
|
|
|
|
Is there a possibility to clear the output window content from C++ code ?
|
|
|
|
|
Yes. IIRC WndTabs (wndtabs.com and article(s) here at CodeProject) has complete access to the IDE.
|
|
|
|
|
Hi,
This is the code I use, the error occurs at line "delete [] helper", but why??
LPWSTR helper = new WCHAR[cchBufferSize+28];
...
...
delete [] helper; <-----here is the debug assert!
One more question: I'm working the first time with unicode strings and functions like wcs****
Will my app work in every microsoft OS or only on NT/2000?
|
|
|
|
|
I need to see the rest of the code.
Specially this part:
some string manipulations like wcsncpy and so on...
Cheers!!!
Carlos Antollini.
|
|
|
|
|
here is the complete code, hth:
LPWSTR wszURL = new WCHAR[cchBufferSize];
LPWSTR helper = new WCHAR[cchBufferSize+28];
helper = wcsrev(wszURL);
int len = wcslen(helper)-2;
wcsncpy(wszURL,helper,len);
helper = wcsrev(wszURL);
wcscpy(wszURL,helper);
wcsncat(wszURL, lpwszSearchURL, cchBufferSize);
ZeroMemory(lpwszSearchURL, wcslen(wszURL));
wcsncpy( lpwszSearchURL, wszURL, cchBufferSize);
delete [] wszURL;
delete [] helper;
|
|
|
|
|
Just hazarding a guess here, but I think your assignment to 'helper' on the line
helper = wcsrev(wszURL); are the cause of the difficulty. After this line I don't think helper points to the memory that was originally allocated.
Chris Meech
|
|
|
|
|
Hello All,
I need C++ classes for doing basic statistics-preferable a template based one!
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
|
I mean basic mathematical statistics.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Delphi can not use my lib file so how can I provide dll that I write in vc++ to client that works in Delphi ????
|
|
|
|
|
Is your DLL exporting C style functions or C++ classes?
Michael
|
|
|
|