|
I'm getting undeclared identifier errors at compile time for CreateWaitableTimer and SetWaitableTimer. I have Winbase.h included and Kernel32.lib is of course already inherited. What am I doing wrong???
|
|
|
|
|
Friends,
I got a data grid control. The query i executed returned six fields. So when i give my recordset object to "datagrid" control, it shows six fields. I only want to show my desired fields in "datagrid" and not "all" those that are present in the recordset. How can i do so ?
Imtiaz
|
|
|
|
|
Hi!
This is surely an easy q for you but I don't really know how to implement my function.
I'd like to have a func like:
bool IsTimeBetweenTimes( CTime currTime, CTime start, CTime end );
I'd like to know if "currTime" is between "start" and "end".
I'm going to cal this funktion a very lot of times.
Any tips how to tackle my problem is good. - Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
bool IsTimeBetweenTimes
(CTime currTime,
CTime start,
CTime end)
{
if ((start < currTime) && (currTime < end))
return true;
return (false);
} /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
or..
bool IsTimeBetweenTimes(CTime currTime, CTime start, CTime end) {
return start <= currTime && curTime < end;
} :compressed-grin:
Anyway, the range endpoints is open for debate. I believe low <= x < high is the most correct one as it's directly applicable to time ranges as we use them in "real life".
--
Arigato gozaimashida!
|
|
|
|
|
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi
i want to hide the application icon which comes in when you press alt+tab window. if there are more then one window you can navigate to your application by pressing Alt+tab and selecting your application from there. i dont want my application icon to be there.
Regards
Swarup
|
|
|
|
|
Hi,
I created an SDI scrollview app, and the text displays OK initially. However when it is scrolled down and then back up the text doesn't get restored properly. Also if the app is covered up and then restored the window is blank. Most of the work is done in OnInitialUpdate and OnDraw.
void CViewDocView::OnDraw(CDC* pDC)
{
UINT status;
CViewDocDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
m_nLinesTotal = pDoc->GetDocumentLength();
if (m_nLinesTotal != 0)
{
// Initialize the position of text in the window.
UINT position = 0;
CFont* pOldFont = pDC->SelectObject (&m_fontScreen);
for (UINT i=0; i<=m_nLinesTotal; i++) {
CString string;
status = pDoc->GetLine( string );
pDC->TextOut(2, position, string);
position += m_cyScreen;
}
pDC->SelectObject (pOldFont);
}
}
void CViewDocView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CViewDocDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
SetScrollSizes (MM_TEXT, CSize (0, pDoc->GetDocumentLength() * m_cyScreen),
CSize (0, m_cyScreen * 10), CSize (0, m_cyScreen));
ScrollToPosition (CPoint (0, 0));
}
The font is set up in OnCreate() and the font height from GetTextMetrics() is assigned to m_cyScreen.
Thanks in advance
|
|
|
|
|
hello !
I'm using a CListCtrl that I'm sorting by clicking on columns...
But also i want to cancel the sorting and to return to the original state (the one that was after I added the data to the control)
How can I do this ? Can it be done ?
Cheers...
|
|
|
|
|
Does anyone here use the VC+ Express 2005 beta?
I just installed everything according to the instructions, along with the DirectX 9 SDK. When I try to build the samples included with the SDK, I find that some include files are missing, for example "Windows.h" I checked the search paths and they are correct, but the files are not on my drive.
Do I have to purchase the full version, or am I doing something wrong?
|
|
|
|
|
VC express is not complete at all. It's so crippled it's amazing it even starts.
--
Arigato gozaimashida!
|
|
|
|
|
Hi all,
I'm working in VC++6.0 and Win98, the question is:
Howto get an window's processlist and detect parent process of any process?
Thanks in advance!
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
|
Do you guys know where could i get some video and audio advices (like a specialised forum or something like that) ?
|
|
|
|
|
If you're planning to use the DirectX APIs, the MSDN newsgroups are a great resource.
MSDN Newsgroups
The DirectX discussion groups at GameDev.Net are quite interesting as well, though there's more talk related to video than audio.
GameDev.Net Discussion Groups
Identify the APIs/platform/framework you're planning on using and search for related forums(fora?)
Hope that helps!
|
|
|
|
|
|
I have a DLL function that gives an HBITMAP back to the calling application. I would like to store this off in a separate variable for use in WM_PAINT messages. What is the proper way to copy off this handle? I suppose I could copy into a memory DC, then extract it again, but that seems like too much work just to copy the bitmap data. Is there another way?
|
|
|
|
|
|
Hello,
I have a dialog with several controls on it. I want to make the controls non-editable based on some condition (the user would press a pushbutton to make them editable) is there any way that I can do this without setting the appropriate property for each control?
I know that I can do this by setting the appropriate property for each control on the dialog but I am looking for a way that I can do this in one ( or some ) function call in the dialog level so all controls become un-editable.
Best regards
|
|
|
|
|
you need to update each control individually.
unless you have millions of controls, it's not that big a problem.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Unfortunately, nothing like this is built in.
http://www.codeproject.com/buttonctrl/groupcheck123.asp
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I try to write programm with GDI+, put i noticed one problem - my screen is flicking even if i use the doublebuffer. What am i doing wrong??? When i used GDI and BitBlt function, everything was perfect.
I use GDI plus this way:
Graphics gr(dc.m_hdc);
Bitmap bm = new Bitmap(sizex,sizey);
Graphics gmem = Graphics::FromImage(bm);
gmem->DrawSomething();
gr.DrawImage(dc,0,0);
And another question - what about text drawn in any angle??? Is it necessery to uset rotatetransform function???
|
|
|
|
|
There is webpage which returns a string.
https://www.helloworld.com/getkey.html?a=someparam
after supplying appropriate parameter "a" it issues a plain text response and displays page with something like this answer=abc bdg
I want to write vc++ proggy which will request this string and then get the text response. Which functions do I use to request key and collect the text data from this link?
|
|
|
|
|
I have a modeless dialog that i use for chatting in my application, and have an 'Always on top' checkbox for it. This works, but if I minimize the main application, both dialogs disappear. How can I also make the dialog stay visible even if the main app is minimized?
[insert witty comment here]
bdiamond
|
|
|
|
|
Make the dialog a child of the desktop, not your main window.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|