|
If anyone out there is feeling particularly adventuresome and has VC7 I could use some help. I have a C++ framework that I have been working on in VC 6 called the Visual Component Framework. However I have heard from some people who have downloaded it that it doesn't compile under VC7. I don't have the cash to get VC7 and I was wondering if there might be someone here who might be willing to give it a go ? The framework is free and can be found at http://sourceforge.net/projects/vcf
If you want to help out on this and have questions feel free to contact me.
Thanks
|
|
|
|
|
Hi,
I have an application which when run, starts with a menu, IDR_menu1. When I open a dialog box from the menu how can I change the menu from IDR_menu1 to say IDR_menu 2 which contains options for the dialog box. E.g (the original menu has File,Edit,View,Options,Test,Window and help and the new menu I want to replace it with has only File,Options,Window and Help)
Thanks in advance
|
|
|
|
|
Use LoadMenu to load your menu from the resource file, you will receive an HMENU from this function. Then you can call SetMenu(hWnd, hMenu) and this will set the new menu.
Then you may have to call DrawMenuBar in order to make sure that the menubar gets refreshed.
|
|
|
|
|
Hi,
I need a timer to count how long the program has been waiting:
e.g.
if (x=10)
{
pause indefinitely //i want the function pause for 1000ms......
if (timer = 1000ms) //function pause for 1000 ms already
continue to do stuff here....
}
How can i implement this timer??? Any example!????
Thanks!!!!
|
|
|
|
|
use QueryPerformanceCounter.
here is an example.
LARGE_INTEGER liFrequency;
LARGE_INTEGER liStart;
LARGE_INTEGER liEnd;
if (FALSE == QueryPerformanceFrequency (&liFrequency))
{
MessageBox("Your computer will not support this test. It does not contain a high resolution timer.", "Error", MB_OK | MB_ICONEXCLAMATION);
return FALSE;
}
QueryPerformanceCounter(&liStart)
...
QueryPerformanceCounter(&liEnd)
LARGE_INTEGER liDiff;
double dTime;
liDiff.LowPart = liEnd.LowPart - liStart.LowPart;
liDiff.HighPart = liEnd.HighPart - liStart.HighPart;
dTime = (double)liDiff.LowPart / (double)liFrequency.LowPart;
I cannot remember what units dTime is in at this point, but if you test it in your debugger you should be able to figure it out. Then use dTime to test if it has been the second that you are looking for.
|
|
|
|
|
Thanks..........;P
|
|
|
|
|
Anonymous wrote:
if (x=10)
{
pause indefinitely //i want the function pause for 1000ms......
if (timer = 1000ms) //function pause for 1000 ms already
continue to do stuff here....
}
I'm not sure I understand entirely. The first comment says you want the function to pause for 1000ms. If that's the case, you can call Sleep(1000);
If, however, you want to know how long the pause was, you can do a fairly cheap & sleazy trick here, depending on the granularity you require:
DWORD dwThen = GetTickCount();
DoSomethingYouWantToTime();
DWORD dwElapsedMilliseconds = GetTickCount() - dwThen;
Be advised that GetTickCount() has a granularity of the system quanta, which is 10ms under NT and 55ms under 9x. If that granularity isn't good enough, then the performance counter example will definatly do the trick for you.
Chistopher Duncan
Author - The Career Programmer: Guerilla Tactics for an Imperfect World (Apress)
|
|
|
|
|
Hello , I`ve just signed in and I want to ask a question:
How can I get the progress in a webbrowser control... I mean:
I know how to get it when i push "load" or something like that,but
I want to know how to get the progress when I am browsing
I hope you get it
hihi
|
|
|
|
|
This referes to Chris's Grid Control.
How can I lock the CGridCellCombo box from typed user input. I just want a list box. Only selecting, no typing.
Thank You,
DS
|
|
|
|
|
I'm not sure but I think it is derived from CComboBox and you would do it the same. If it is there was mention of that not to long ago in this forum.
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
Change the style of the cell like this :
CGridCellCombo *pCell = (CGridCellCombo*) m_ListZone.GetCell( pItem->iRow + 1, 0 );
pCell->SetStyle(CBS_DROPDOWNLIST);
Hope this help
|
|
|
|
|
Hi, I have a stupid question.
How to make a timer? For example, I want to check the waiting time. If my program has been waiting for 1000 millisecond already, terminate the program.
Thanks
|
|
|
|
|
Anonymous wrote:
If my program has been waiting for 1000 millisecond already, terminate the program.
What du you mean by waiting?
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
|
|
|
|
|
For example, due to some reasons I want to "force" my program to pause for 1000 millisecond.......how can i count this 1000ms, and let it go again after 1000ms.
e.g.
if (x=10)
{
pause for 1000ms
continue to do stuff here....
}
thanks!!!!
|
|
|
|
|
with Sleep() you can pause the timer.
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
|
|
|
|
|
with SetTimer() you can create timer.
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
|
|
|
|
|
I think i describe my question wrongly.
I need a timer to count how long the program has been waiting:
e.g.
if (x=10)
{
pause indefinitely
if (timer = 1000ms) //function pause for 1000 ms already
continue to do stuff here....
}
How can i implement this timer??? Any example!????
Thanks!!!!
|
|
|
|
|
oh,yes
For doing this I think you can't use timer.You have to create thread.I don't know how
but you can look into CMutex and other thread class in MSDN for its information.
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
|
|
|
|
|
If you are just interested in the SDK, use:
SetTimer(hWnd, nID, 1000, NULL);
hWnd will be the handle to where you would like the timer event sent, and nID is the id code for this timer event. The 1000 is the timeout interval between each timer event. You can ignore the last parameter for now, this is for a timerProc callback function.
Then Create a WM_TIMER handler to catch the message, you should check the wParam value to make sure that it is the timer that you are interested in. This becomes important when you create more than one timer.
When you want to get rid of your timer call:
KillTimer(hWnd, nID);
|
|
|
|
|
Hi there,
I wrote a help by Html Help Workshop,
I maked Index and Content for the Help.
I wanna call the HTML help pages in my program,
I know, i must use HtmlHelp function.
In one of parameters of the function i must enter Keyword !
But i didn't make any Keyword in my HTML help,
How can i make a Keyword in my HTML helps ???
In my HTML help project i saw [MAP] part !
What is it ?
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
|
|
|
|
|
I have a CString array called abc[10000]. This array is initialized in a OnOK() with value "none". However, when I begin a thread, and this thread called another function "testing()".......the array becomes empty.....so i got error message when I access this array in testing().
I've tried to declared this array in stdAfx.h and .cpp, and also its own .h file....but doesn't work too.........
Please help.....
p.s.: I got the similar problem when i use vector array (that's why i choose to declare abc array to abc[10000].)
|
|
|
|
|
I figure out myself....just a stupid mistake. I should declare the array in StdAfx.h/cpp.
|
|
|
|
|
Hi,
I have an application which I open a dialog box. The dialog box has a button IDC_ANALYSIS with the message handler onOpenanalysis which when pressed opens another dialog box using:
void CEpgActive::OnOpenanalysis()
{
CEpgAnalysis dlgEpgAnalysis(this);
int nRetCode = dlgEpgAnalysis.DoModal();
}
How can I modify this code (if this is the code i should modify!) can I get it so that the 1st dialog is cleared from the screen and only the second dialog is displayed?
Thanks a lot in advance,
Joe
|
|
|
|
|
void CEpgActive::OnOpenanalysis()
{
ShowWindow(SW_HIDE);
CEpgAnalysis dlgEpgAnalysis(this);
int nRetCode = dlgEpgAnalysis.DoModal();
ShowWindow(SW_SHOW);
}
Nish
Oh, I don't know why she's
leaving, or where she's gonna go
I guess she's got her reasons but I just don't wanna know
'Cos for 24 years I've been living next door to Alice
24 years just waitin' for a chance
To tell her how I feel and maybe get a second glance
Now I gotta get used to not living next door to Alice
|
|
|
|
|
Please help me . . .
I have a very simple Question. I want to use MSFlexGrid from Windows API, C++. I can not use VC++ and also VC editor.
From where I am find sample on that.
Thanx in advance.
|
|
|
|