Click here to Skip to main content
15,923,273 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: make jar file Pin
kakan25-Sep-06 19:53
professionalkakan25-Sep-06 19:53 
GeneralRe: make jar file Pin
S Douglas25-Sep-06 23:09
professionalS Douglas25-Sep-06 23:09 
QuestionProblem with static in c programming Pin
EzraYap25-Sep-06 6:13
EzraYap25-Sep-06 6:13 
QuestionRe: Problem with static in c programming Pin
jhwurmbach25-Sep-06 6:22
jhwurmbach25-Sep-06 6:22 
AnswerRe: Problem with static in c programming Pin
EzraYap25-Sep-06 6:46
EzraYap25-Sep-06 6:46 
AnswerRe: Problem with static in c programming Pin
toxcct25-Sep-06 6:48
toxcct25-Sep-06 6:48 
AnswerRe: Problem with static in c programming Pin
Zac Howland25-Sep-06 8:18
Zac Howland25-Sep-06 8:18 
QuestionCommand-line code merged with GUI Pin
mikhailxyohman25-Sep-06 5:19
mikhailxyohman25-Sep-06 5:19 
Alright, I have my GUI written in C and the other document is in command-line and written in C++. I'd like to the command-line code into my GUI on a click of a certain menu item(ID_CONVERT_DEAD) and I do not know how to do so.


LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)//Window Procedure<br />
{<br />
switch(msg)<br />
{<br />
case WM_CREATE://Creates the File and Convert to.. menus.<br />
{<br />
HMENU hMenu, hSubMenu;<br />
HICON hIcon, hIconSm;<br />
<br />
hMenu = CreateMenu();<br />
<br />
hSubMenu = CreatePopupMenu();<br />
AppendMenu(hSubMenu, MF_STRING, ID_FILE_EXIT, "E&xit");<br />
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&File");<br />
<br />
<br />
hSubMenu = CreatePopupMenu();<br />
AppendMenu(hSubMenu, MF_STRING, ID_CONVERT_MM, "&MessengerMate");<br />
AppendMenu(hSubMenu, MF_STRING, ID_CONVERT_MIDDLE, "&Middle_Man(Coming Soon..)");<br />
AppendMenu(hMenu, MF_STRING | MF_POPUP, (UINT)hSubMenu, "&Convert to..");<br />
<br />
SetMenu(hwnd, hMenu);<br />
<br />
<br />
hIcon= LoadImage(NULL, "RidV.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);<br />
if(hIcon)<br />
SendMessage(hwnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);<br />
else<br />
MessageBox(hwnd, "Could not load large icon!", "Error", MB_OK | MB_ICONERROR);<br />
<br />
hIconSm= LoadImage(NULL, "RidV16.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE);<br />
if(hIconSm)<br />
SendMessage(hwnd, WM_SETICON, ICON_SMALL, (LPARAM)hIconSm);<br />
else<br />
MessageBox(hwnd, "Could not load small icon!", "Error", MB_OK | MB_ICONERROR);<br />
}<br />
break;<br />
case WM_COMMAND:<br />
switch(LOWORD(wParam))<br />
{<br />
break;<br />
<br />
case ID_FILE_EXIT://Commands for Menu items go in the specified menu item.<br />
PostMessage(hwnd, WM_CLOSE, 0, 0);<br />
break;<br />
case ID_CONVERT_MM:<br />
<br />
break;<br />
case ID_CONVERT_MIDDLE:<br />
<br />
break;<br />
}<br />
<br />
break;<br />
case WM_CLOSE://Default reaction when users press the "x" button or Alt-F4<br />
DestroyWindow(hwnd);<br />
break;<br />
case WM_DESTROY://Destroys all windows including child windows(We have none, yet.)<br />
PostQuitMessage(0);<br />
break;<br />
default:<br />
return DefWindowProc(hwnd, msg, wParam, lParam);<br />
}<br />
return 0;<br />
}


All this info is just to give you an idea of what I want to do since I'm not too sure what the technical term for the procedure is. Also, whenever I move the installer out of the directory that the icons are in, it'll produce the errors and i'm wondering how to fix it to where no matter where the installer is, it shows the icons. I've already tried googling and searching through every C/C++ site out there on how about to do this but as I didn't know exactly what I was looking for I wasted hours so I decided to come to this message board for help.

Any help is greatly appreciated.
AnswerRe: Command-line code merged with GUI Pin
toxcct25-Sep-06 5:30
toxcct25-Sep-06 5:30 
GeneralRe: Command-line code merged with GUI Pin
mikhailxyohman25-Sep-06 5:40
mikhailxyohman25-Sep-06 5:40 
GeneralRe: Command-line code merged with GUI Pin
toxcct25-Sep-06 6:49
toxcct25-Sep-06 6:49 
GeneralRe: Command-line code merged with GUI Pin
mikhailxyohman25-Sep-06 9:42
mikhailxyohman25-Sep-06 9:42 
QuestionHow to solve this problem? Pin
zouchao111225-Sep-06 4:40
zouchao111225-Sep-06 4:40 
AnswerRe: How to solve this problem? Pin
Mohammad A Gdeisat25-Sep-06 9:45
Mohammad A Gdeisat25-Sep-06 9:45 
GeneralRe: How to solve this problem? Pin
zouchao111225-Sep-06 14:31
zouchao111225-Sep-06 14:31 
GeneralRe: How to solve this problem? Pin
Mohammad A Gdeisat25-Sep-06 20:07
Mohammad A Gdeisat25-Sep-06 20:07 
Questionadding cbutton to a cstatusbar Pin
PrabhuDev25-Sep-06 4:10
PrabhuDev25-Sep-06 4:10 
AnswerRe: adding cbutton to a cstatusbar Pin
Sarath C25-Sep-06 5:05
Sarath C25-Sep-06 5:05 
GeneralRe: adding cbutton to a cstatusbar Pin
PrabhuDev12-Nov-06 6:49
PrabhuDev12-Nov-06 6:49 
QuestionC++ MDI and CreateProcess Pin
Christopher Stratmann25-Sep-06 4:07
Christopher Stratmann25-Sep-06 4:07 
AnswerRe: C++ MDI and CreateProcess Pin
led mike25-Sep-06 4:34
led mike25-Sep-06 4:34 
GeneralRe: C++ MDI and CreateProcess Pin
Christopher Stratmann25-Sep-06 4:53
Christopher Stratmann25-Sep-06 4:53 
GeneralRe: C++ MDI and CreateProcess Pin
led mike25-Sep-06 5:23
led mike25-Sep-06 5:23 
GeneralRe: C++ MDI and CreateProcess Pin
Christopher Stratmann25-Sep-06 5:38
Christopher Stratmann25-Sep-06 5:38 
GeneralRe: C++ MDI and CreateProcess Pin
led mike25-Sep-06 5:54
led mike25-Sep-06 5:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.