|
Use AssocQueryString() .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
As simple as possible, thanks...
|
|
|
|
|
Anyone know how to do this?
That's the icon that appears in the main part of the taskbar, not the system tray/notification area usually in the bottom right-hand corner of the desktop.
Presumably this is the same icon that appears in the top-left corner of the application's main window, the IDR_MAINFRAME icon in an MFC app. Thing is, I need to be able to change it at run-time, not compile-time.
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
did you have a look at the Code generated by the Wizard into OnInitDialog ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Actually, it's an MDI app. But your comment made me realize I could just call SetIcon() for the main window.
I am such a FREAKING MORON sometimes!!! Talk about overlooking the obvious
Thanks
The two most common elements in the universe are Hydrogen and stupidity. - Harlan Ellison
Awasu 2.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
|
Hi!
How to select not only all columns (LVS_EX_FULLROWSELECT), but also rest of window to border without fake column?
Example:
3 columns and 3 items (rows)
3 columns have widths - 100, 100, 100.
All ctrl window have width - 400
when I select, f.e., 2nd row - selection rectangle width is 300. How to select 400?
For drawing my control I'm using OwnerDraw
I tried to draw rectangle after last column with selection color, but nothing happends.
<br />
if((nColumn == m_columncount - 1) && bReallySelected)<br />
{<br />
CRect rc(rcSubItem.right, rcSubItem.top, rcWindow.right, rcSubItem.bottom);<br />
pDC->FillRect(rc, &CBrush(GetSysColor(COLOR_HIGHLIGHT)));<br />
DrawGrid(pDC, &rc);<br />
}<br />
where rcWindow = GetClientRect();
rcSubItem = GetSubItemRect(nItem, nColumn);
If try a InvalidateRect(rc) into code - I can see rectangle only when I resizing columns, after that rectangle clears by bg color.
DrawGrid draws a lines (without LVS_EX_GRIDLINES) and all continous lines in outside of rectangle, that bounds all items (column and rows) are not repainting (when resize column lines leave a trace)
But if set LVS_EX_GRIDLINES style (and don't draw lines) "system" lines drawing normally.
I think, maybe, lines and rest of selection draw in other routine?
Where system draws a lines?
|
|
|
|
|
Error occured when i am using GDI+ library in VC++.
but i am include all the necessary thing for the GDI+
i paste the error which i got it , from the editor
reply early
e:\12\mahadlg\gdiplusinit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier
e:\12\mahadlg\gdiplusinit.h(32) : error C2065: 'token' : undeclared identifier
e:\12\mahadlg\gdiplusinit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to data
e:\12\mahadlg\gdiplusinit.h(32) : error C2071: 'NotificationHookProc' : illegal storage class
e:\12\mahadlg\gdiplusinit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'
e:\12\mahadlg\gdiplusinit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to data
e:\12\mahadlg\gdiplusinit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
e:\12\mahadlg\gdiplusinit.h(33) : error C2059: syntax error : ')'
e:\12\mahadlg\gdiplusinit.h(86) : error C2059: syntax error : 'const'
e:\12\mahadlg\gdiplusinit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'
e:\12\mahadlg\gdiplusinit.h(95) : warning C4229: anachronism used : modifiers on data are ignored
e:\12\mahadlg\gdiplusinit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
e:\12\mahadlg\gdiplusinit.h(95) : error C2059: syntax error : ')'
send reply
|
|
|
|
|
You have to update your header files by getting a newer version of the platform SDK. ULONG_PTR is a typedef of unsigned long and is declared in the file BaseTsd.h The oldest file I have it in came in the February 2001 PSDK, which is also the first PSDK that included GDI+ IIRC.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
hi Arends,
i download the new version of platform SDK.
and i include those files in my tools->options->directory
as C:\program files\Microsoft SDK\Include
but now also it get some errors
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(32) : error C2065: 'ULONG_PTR' : undeclared identifier
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(32) : error C2065: 'token' : undeclared identifier
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(32) : error C2165: 'left-side modifier' : cannot modify pointers to data
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(32) : error C2071: 'NotificationHookProc' : illegal storage class
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(33) : error C2146: syntax error : missing ')' before identifier 'token'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(33) : error C2165: 'left-side modifier' : cannot modify pointers to data
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(33) : error C2071: 'NotificationUnhookProc' : illegal storage class
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(33) : error C2059: syntax error : ')'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(86) : error C2059: syntax error : 'const'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(95) : error C2146: syntax error : missing ')' before identifier 'token'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(95) : warning C4229: anachronism used : modifiers on data are ignored
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(95) : error C2182: 'GdiplusShutdown' : illegal use of type 'void'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusInit.h(95) : error C2059: syntax error : ')'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2639) : warning C4229: anachronism used : modifiers on data are ignored
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2639) : error C2440: 'initializing' : cannot convert from 'int' to 'enum Gdiplus::Status'
Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2644) : error C2146: syntax error : missing ')' before identifier 'token'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2644) : warning C4229: anachronism used : modifiers on data are ignored
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2644) : error C2182: 'GdiplusNotificationUnhook' : illegal use of type 'void'
C:\PROGRAM FILES\MICROSOFT SDK\INCLUDE\GdiplusFlat.h(2644) : error C2059: syntax error : ')'
reply early
send reply
|
|
|
|
|
maharaja pandian wrote: 'ULONG_PTR' : undeclared identifier
maharaja pandian wrote: i download the new version of platform SDK.
and i include those files in my tools->options->directory
as C:\program files\Microsoft SDK\Include
The fact that ULONG_PTR is undeclared is your first clue. It means that your compiler is still using the old version of BaseTsd.h. What you have to do is move the PSDK include directory to the top of the list of directories. You probably added it to the bottom of the list. The compiler searches the directories listed from the top to the bottom.
Do the same with the lib files, you do not want your program linking to the old lib files.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
Hi there,
I am using a code in VC++ (Console Win32 Application) used to connect to MYSQL. This was a successful attempt So what I think is no problem with library includes but as I tried the same code with MFC (Dialog based Application ) it returned the following linker errors:
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_query@8
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_close@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_free_result@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_num_rows@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_fetch_row@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_num_fields@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_fetch_field@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_store_result@4
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_select_db@8
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_real_connect@32
DlgAddUser.obj : error LNK2001: unresolved external symbol _mysql_init@4
Debug/Job_Scheduler.exe : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.
Please help me in this regard as soon as possible.
Best Regards
Asif Rogers
|
|
|
|
|
Have you added the LibMySQL.lib file to your list of libraries to be linked to your project? Try placing this in your file:
#include "MySql.h"
#pragma comment(lib, "LibMySQL.lib") It's been a while since I have played with MySQL, so I may be off base here.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I'm novice at GDI programming.
I've been working on the program which caputres the screen and saves it as a Jpeg image.
I made it. However It is really inefficient, I thought.
here is my work flow.
1. Get compatible screen DC.
2. Get compatible bitmap on it.
3. Write Bmp header and body using bitmap above.
4. Convert the bmp to Jpeg.
5. Delete bmp file.
What I mostly want to know is..
Should I make bmp file to get Jpeg image?
Could you recommend better way?
thanks.
|
|
|
|
|
consider using GDI+ there are many tutorials here in CP
-prakash
|
|
|
|
|
When we create multiple desktops using CreateDesktop, I want to hook the the Start->LogOff button and shutdown the desktops gracefully rather than logging out. Any idea how we can hook the Logoff button?
thanks!
|
|
|
|
|
Does the SetEvent function queue events? For example, if I signal the event 10 times in a row, will a waiting thread wakeup from a waitforsingleobject 10 times? The event is setup as automatic.
Thanks in Advance...
|
|
|
|
|
No the thread will wakeup in the first time itself. the significance of a singal is in waiting state only.
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
No, SetEvent just sets the event to the signalled state, so the number of times you call SetEvent doesn't matter.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Try a semaphore if this is the desired behavior.
Bob Ciora
|
|
|
|
|
Thanks - Semaphore works great. Thanks for the info... Regards.
|
|
|
|
|
I have a set of menus in MyFrame, and for some reason I move the
ON_COMMAND()
ON_UPDATE_COMMAND_UI()
of one of them to another module. The problem is its menu item is automatically enabled initially. All the other menu item's message map local to the MyFrame are disabled. How can the previous menu item be disabled?
Here's what MSDN says about update handler
If the framework does not find an ON_UPDATE_COMMAND_UI entry during command routing, it automatically enables the user-interface object if there is an ON_COMMAND entry somewhere with the same command ID. Otherwise, it disables the user-interface object. Therefore, to ensure that a user-interface object is enabled, supply a handler for the command the object generates or supply an update handler for it.
It is possible to disable the default disabling of user-interface objects. For more information, see the m_bAutoMenuEnable member of class CFrameWnd.
So I guess initially the Framwork doesn't find the specific ON_UPDATE_COMMAND_UI macro in MyFrame, that menu item was enabled. And I tried m_bAutoMenuEnable, that doen't work either.
|
|
|
|
|
Hi,
How can I show a WMF file in a non-mfc application?
I need to handle the zooming also.
Thank you.
- NS -
|
|
|
|
|
The tooltips of slider control is the current positon if you set the "Tooltips" property True. How can I set a special tooltips of a slider control? Just like "The current positon: 13". Thank you!
There are innumerable stars in the sky, the smallest is me!
|
|
|
|
|
Hello,
I've created a subclass of the Button class and I can't figure out why my OnPaintBackground method never gets called. Have any of you ever encountered this problem?
Gus
|
|
|
|