|
(GetDlgItem(IDC_MY_EDIT))->EnableWindow(FALSE);
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
HI!
Maybe someone can help me out!
I got:
Stuct OPENFILENAME
ofn.lpstrFile = szFileName;//char[]
I need to convert szFileName to const WCHAR*
for this GDI+ Consrtuctor:
Image( const WCHAR *filename,
BOOL useEmbeddedColorManagement
);
Thanks
lemi
|
|
|
|
|
If you have UNICODE and _UNICODE defined, I think all you'd need to do is make szFileName be a WCHAR too, since lpstrFile will be pointing to a LPWSTR .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Last but not the Least, you can try wcstombs and mbstowcs too!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
In a Visual Studio 6.0 project, I am not getting any more than a single WM_NOTIFY to my CChildView for the child CHeaderCtrl - I want notification in the CChildView when the dividers are altered - meaning the column widths are changed.
I created a default MFC SDI CMainFrame/CChildView program without document support.
I added a CHeaderCtrl as a member of the CChildView, and override the Create of CChildView to create the header control. The header control appearrs to be crewated correctly.
if( !m_wndHeaderCtrl.Create(HDS_HOTTRACK|HDS_FULLDRAG|WS_CHILD|WS_VISIBLE, rect, this, MHDR_CTRL_ID) ){<br />
TRACE0("Failed to create header control window\n");<br />
return FALSE;<br />
}
I used ClassWizard to override the OnChildNotify , but I don't get any messages after the windows are created.
Any ideas?
|
|
|
|
|
Override OnNotify instead
BOOL CChildView::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) <br />
{<br />
switch( wParam ){<br />
<br />
case MHDR_CTRL_ID:{<br />
NMHDR* pNMHDR = (NMHDR*)lParam;<br />
switch( pNMHDR->code ){<br />
case HDN_ENDTRACK:<br />
TRACE0("Header control end track message\n");<br />
break;<br />
}<br />
}break;<br />
}<br />
<br />
<br />
return CWnd ::OnNotify(wParam, lParam, pResult);<br />
}
|
|
|
|
|
In Windows XP applications (especially MS Office), sometimes instead of spitting out an annoying message box at you, the application just shows a yellow bubble with an informational warning in it that doesn't prevent you from doing what you are doing and doesn't require you to press any buttons (the bubble is like the one that says "Windows updates are ready to install" in System Tasks), it automatically fades after a few seconds. Since I've seen it so often in Windows XP, I was just wondering if there was an easy way to tell windows to make one of those with desired text. By an easy way I mean something as easy as telling windows to make a message box? Thanks.
|
|
|
|
|
Anonymous wrote:
a yellow bubble with an informational warning in it
Also known as a tool tip control. There are plenty of MSDN examples that you can search for.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Check out EM_SHOWBALLOONTIP - it's easy to use.
|
|
|
|
|
|
If any one know how HyperTerminal communicate with COM port , please share with me .
( I know that HyperTerminal don't use ReadFile and WriteFile API to communicate with COM port. )
Thanks .
|
|
|
|
|
a make a program (chk.exe) with Visual C++ 7, and i want to check from this program if another process (doct.exe) is already running. If doct.exe is running then do nothing, but if does't then i want to terminate(exit)chk.exe How can i do this
|
|
|
|
|
Is EnumProcesses() , or the Process32First() /Process32Next() pair of any help?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks but... i am very veryyy new in C++ and i need i little more help...
|
|
|
|
|
|
|
thanks... this really help :->
|
|
|
|
|
PaloukiLook wrote:
thanks
My Pleasure
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi,
I have a vstudio.net application with a main window and many windows a user may or may not open. These are modeless dialog Windows. How can I store the position, size, etc., of all the Windows that are opened when I close the application. The user may have any number of Windows opened, or may decide to close some. If the user opens the application file again...I want all the windows that were opened to reappear in the same positions and size, etc., on the desktop. I dont want to use the registry, but hope that I can use serialization.
Thanks.
Jerry
|
|
|
|
|
I've always used GetWindowPlacement for this, but I always saved it to the registry as binary data. Writing a serialization routine for the WINDOWPLACEMENT struct shouldn't be too hard.
I found this sample on MSKB, don't know if it uses registry or not.
MDIRest.exe Saves and Restores Window Size & Position
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|
|
Hello every 1
If i had a (string Date_Time; ) and it stroe date and time like that
xx/xx/xxxx xx:xx:xx all in 1 string
the first 10 char are the date , then a space , the 8 char of time
any way , i wana make a new string which have only the date..( string Date;)
so i need a string which read from string Date_Time; until the first space..
i was trying
cin.getline(Date,' ');
but it did not work
Waiting for your replies,
ANA BAHY
|
|
|
|
|
you can read one character at a time: put everything before the first space into the 'date' and everything after the space but before the end of the line into the 'time'.
or, you can read the whole line, search the string for the space and then use string::substr to extract the 'date' and the 'time' substrings.
or, you can read the whole string and use something like string::erase to chop off the 'time' part of the string : str.erase(10);
Cleek | Image Toolkits | Thumbnail maker
|
|
|
|
|
Thanks for the help , but i am not good at all , so could u help me a littile bet more??
now i have a s
String Date_Time;
if i used cout<
|
|
|
|
|
If you know the date will always be 10 characters, use the substr function.
<br />
std::string dateTime = "2000/10/31 12:00";<br />
std::string dateOnly = dateTime.substr(0, 10);<br />
substr(m, n) will return n characters starting at the m zero-based character.
if you're using MFC, use CString::Left. (or Mid)
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
|
|
|
|