|
modify the createstruct parameter in the CMainFrame class's OnCreate() member function. I don't know the exact styles off the top of my head, but you'll want to change the styles with the 'window styles' constants. (the ones that begin with WS_), like WS_THICKFRAME,WS_MINIMIZE, etc.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
use following
cs.style &= ~WS_MAXIMIZEBOX;
|
|
|
|
|
I have a need to put together a simple installation that will run from the users CD ROM drive. I have 2 Visual C++ applications that would be installed on a users machine...a few dlls and I need to register an Active X control also at install time. Can someone help me with this? It does not need to be anything fancy. Just a simple installation program that works.
Thanks.
Jerry
|
|
|
|
|
I use Inno Setup freeware, very easy to use and I think it will install an active x control for you, check the features page.
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|
|
|
Hi everyone,
my app should update a listcontrol inside a while statement, but the data are shown only at the end of the whole function, when the app gets the idle state. Furthermore, all the buttons can't be pressed until the end of the function. Can somenone explain me the way to work with it?
Thanks
Vilmer
|
|
|
|
|
try putting a call to Sleep() for a few milliseconds in your while loop, or make the function static and use AfxBeginThread() to call the function.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
It sounds like you would benefit from a separate thread that updates the list control. This would allow the GUI to remain responsive to button clicks and repainting.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yeah, you hit the problem.
But the items of the listcontrol are related to some data which change in the while loop. If I use threads, the data taken from any thread won't be correct, because the while statement continue its run, not taking care of the threads execution.
My question is: is there any way to create a (or more) thread which can use dynamic data which depend on something outside the thread? I know that threads can refer to a pointer to parent, and they can use its member variables, but there's no way for me to make that data useful, because they change always.
|
|
|
|
|
I was thinking more of having the whole function with the while loop in it be executed through a thread. Then there's 3 choices I can think of:
1. send a pointer to your parent class's instance, and access its variables through this pointer.
2. send a pointer to your parent class's instance, then make the variables/values that will be changing static members of the parent class
3. make the variables/values global
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
I'll show you an example of how my code works:
CListCtrl myLC;
int Num; (as members of CMyClass)
void CMyClass::OnButtonStart()
{
Num = 0;
char* ptrItem;
while (Num < 100)
{
itoa(Num,ptrItem,10);
myLC.InsertItem(Num,ptrItem);
Num++;
}
}
If I use AfxBeginThread(MyThread,this) - where MyThread provides only the InsertItem statement - inside the while statement and then refer to a CMyClass instance, that instance show a value of Num which is already 100, beacause the while statement doesn't wait for the thread to finish its execution.
Aaarrgggghhhh
|
|
|
|
|
I was thinking more along the lines of this:
void CMyClass::OnButtonStart()
{
AfxBeginThread(FillListView,this);
}
UINT ListView(* pClass) :zzz:
{
CMyClass* pMyClass = (CMyClass*)pClass;
pClass->Num = 0;
char* ptrItem;
while (pClass->Num < 100)
{
itoa(pClass->Num,ptrItem,10);
pClass->myLC.InsertItem(Num,ptrItem);
pClass->Num++;
}
return 0;
}
the syntax may be a little off since I'm doing it out of my head, but I think you should be able to follow what I'm saying. I hope this helps in any way.
If I write code in my sleep, does that make me brilliant, or just a lazy programmer?
My articles
www.stillwaterexpress.com
BlackDice - the programmer formerly known as bdiamond
|
|
|
|
|
Hi guyz !
I want to develop a c++ application with speech recognition using visual studio .net 2003 and microsoft speech .net sdk beta 4.0 v.1.0. I've been looking over the documentation and tutorials for the speech sdk but they all seem to be for c# and visual basic applications and only for web applications. If anyone has some sample code that could help me get started I would be most greatful.
Thanx
Nina
|
|
|
|
|
Hi All,
Is there a fn() in SDK to list all the Computers names on LAN (Windows NT/2000)
Thnx in Advance
Comboy2080
|
|
|
|
|
There's a few functions you'll need. WNetOpenEnum , followed by repeated calls to WNetEnumResource , and finally WNetCloseEnum . Note that these functions will not give you the whole network in one go - they only give you one "level", and you'll need to recurse down to build up a picture of the entire network.
|
|
|
|
|
Anyone knows a foolproof method to retrieve the paths to the .pst files for a given Microsoft Outlook profile ?
I know where it is stored by default.However I am looking for something which will retrieve the paths even of the user chooses to save the .pst file to a custom location.
Thanks .
_KANE_
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
Hi,
if you mean to search a file just like using the Search tool of Win32, you can use the functions _findfirst and _findnext to search for all .pst on your hard drive.
See also http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt__findfirst.2c_._findfirsti64.2c_._wfindfirst.2c_._wfindfirsti64.asp
|
|
|
|
|
This should get you started.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Well guys, sorry for confusing things up, Searching for files won't do because i also wish to know which .pst file belongs to which profile.
Thanks david for ur solution, i am gonna try that one out
also any additional question that popped in my mind..using MAPI we can create new PST services for a profile, so now say a profile has 3 .pst files linked to it.Where will the mails be downloaded ? any idea ?
thanks for the replies in advance..
-kane
"Some guys hack just to get themselves a girlfriend.What a pathetic reason huh ?"
|
|
|
|
|
_kane_ wrote:
using MAPI we can create new PST services for a profile, so now say a profile has 3 .pst files linked to it.Where will the mails be downloaded ?
There's an option to set this in Outlook/Outlook Express. I'm not sure how you'd get access to this option - probably through the registry somewhere.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
How can I enable SystemMenu of an skined dialog that disabled its TitleBar?
I wnat to use CBkDialogST to skin my MFC Diolog based application by custom Region skin (non rectangular).
(SystemMenu apear by right-click on the dilog's taskbar button)
|
|
|
|
|
Behzad Ebrahimi wrote:
How can I enable SystemMenu of an skined dialog that disabled its TitleBar?
As far as I know, you can't. You have to have a title bar to have a system menu.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Hi,
I am new to .Net & have been using visual studio 6 for a long time. Now how do i compile & execute a simple Hello world C++ program in visual studio .net as the build button remains disabled.
Thank You.
|
|
|
|
|
Hello Friends,
I am having a rich edit control in which I am displaying some 10-15 lines of text. My problem is that Whenever I want to display the contents of the rich edit control on double click, it's not displaying. When I tried to debug I found that the double click message handler is not getting called. When I disabled the control then the double click is working but I am not able to scroll the text.
Please help me.
Thanking you in advance.
Neelesh K J Jain.
|
|
|
|
|
Have you called AfxInitRichEdit() ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|